/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/password-request.c

  • Committer: Teddy Hogeborn
  • Date: 2008-08-14 21:03:26 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080814210326-u58d7rj78g3i0ed4
* plugins.d/password-request.c (init_gnutls_global): Renamed
                               "pubkeyfile" to "pubkeyfilename" and
                               "seckeyfile" to "seckeyfilename".
  (combinepath): Changed to use asprintf instead of malloc and memcpy.

  (main): Renamed "pubkeyfile" to "pubkeyname", renamed "seckeyfile"
          to "seckeyname" and created new non-const variables
          "pubkeyfilename" and "seckeyfilename".

* mandos (AvahiService.__init__): Bug fix: initialize
                                  "self.max_renames".
  (AvahiService.rename): Bug fix: use "self.name" instead of "name".

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
}
303
303
 
304
304
static const char * safer_gnutls_strerror (int value) {
305
 
  const char *ret = gnutls_strerror (value); /* Spurious warning */
 
305
  const char *ret = gnutls_strerror (value);
306
306
  if (ret == NULL)
307
307
    ret = "(unknown)";
308
308
  return ret;
341
341
  /* OpenPGP credentials */
342
342
  gnutls_certificate_allocate_credentials(&mc->cred);
343
343
  if (ret != GNUTLS_E_SUCCESS){
344
 
    fprintf (stderr, "GnuTLS memory error: %s\n", /* Spurious
345
 
                                                     warning */
 
344
    fprintf (stderr, "GnuTLS memory error: %s\n",
346
345
             safer_gnutls_strerror(ret));
347
346
    gnutls_global_deinit ();
348
347
    return -1;
476
475
    fprintf(stderr, "Binding to interface %s\n", interface);
477
476
  }
478
477
  
479
 
  memset(&to, 0, sizeof(to));
 
478
  memset(&to, 0, sizeof(to));   /* Spurious warning */
480
479
  to.in6.sin6_family = AF_INET6;
481
480
  /* It would be nice to have a way to detect if we were passed an
482
481
     IPv4 address here.   Now we assume an IPv6 address. */
662
661
                             flags,
663
662
                             void* userdata) {
664
663
  mandos_context *mc = userdata;
665
 
  assert(r);
 
664
  assert(r);                    /* Spurious warning */
666
665
  
667
666
  /* Called whenever a service has been resolved successfully or
668
667
     timed out */
704
703
                             flags,
705
704
                             void* userdata) {
706
705
  mandos_context *mc = userdata;
707
 
  assert(b);
 
706
  assert(b);                    /* Spurious warning */
708
707
  
709
708
  /* Called whenever a new services becomes available on the LAN or
710
709
     is removed from the LAN */
898
897
        exitcode = EXIT_FAILURE;
899
898
        goto end;
900
899
      }
901
 
      strcpy(network.ifr_name, interface);
 
900
      strcpy(network.ifr_name, interface); /* Spurious warning */
902
901
      ret = ioctl(sd, SIOCGIFFLAGS, &network);
903
902
      if(ret == -1){
904
903
        perror("ioctl SIOCGIFFLAGS");