/mandos/release

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

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2008-09-26 18:03:10 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080926180310-6npcdb9v7sl60zlf
* plugins.d/usplash.c (usplash_write): Move "cmd_line_len" up.
  (main): Bug fix: Check result of "readlink".  Bug fix: do not write
          if "buf" is empty.  Bug fix:  Free "buf".  Bug fix: Free
          "cmdline".  Bug fix: Check result of "execv".  Bug fix: free
          "cmdline_argv".

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 * "browse_callback", and parts of "main".
10
10
 * 
11
11
 * Everything else is
12
 
 * Copyright © 2007-2008 Teddy Hogeborn & Björn Påhlsson
 
12
 * Copyright © 2008 Teddy Hogeborn & Björn Påhlsson
13
13
 * 
14
14
 * This program is free software: you can redistribute it and/or
15
15
 * modify it under the terms of the GNU General Public License as
315
315
  
316
316
  /* Seek back to the beginning of the GPGME plaintext data buffer */
317
317
  if (gpgme_data_seek(dh_plain, (off_t) 0, SEEK_SET) == -1){
318
 
    perror("pgpme_data_seek");
 
318
    perror("gpgme_data_seek");
319
319
    plaintext_length = -1;
320
320
    goto decrypt_end;
321
321
  }
451
451
  
452
452
  gnutls_certificate_free_credentials(mc->cred);
453
453
  gnutls_global_deinit();
 
454
  gnutls_dh_params_deinit(mc->dh_params);
454
455
  return -1;
455
456
}
456
457
 
830
831
                          .dh_bits = 1024, .priority = "SECURE256"
831
832
                          ":!CTYPE-X.509:+CTYPE-OPENPGP" };
832
833
    bool gnutls_initalized = false;
833
 
    bool pgpme_initalized = false;
 
834
    bool gpgme_initalized = false;
834
835
    
835
836
    {
836
837
      struct argp_option options[] = {
977
978
    }
978
979
    
979
980
    if(not init_gpgme(&mc, pubkey, seckey, tempdir)){
980
 
      fprintf(stderr, "pgpme_initalized failed\n");
 
981
      fprintf(stderr, "gpgme_initalized failed\n");
981
982
      exitcode = EXIT_FAILURE;
982
983
      goto end;
983
984
    } else {
984
 
      pgpme_initalized = true;
 
985
      gpgme_initalized = true;
985
986
    }
986
987
    
987
988
    if_index = (AvahiIfIndex) if_nametoindex(interface);
1098
1099
    if (gnutls_initalized){
1099
1100
      gnutls_certificate_free_credentials(mc.cred);
1100
1101
      gnutls_global_deinit ();
 
1102
      gnutls_dh_params_deinit(mc.dh_params);
1101
1103
    }
1102
1104
    
1103
 
    if(pgpme_initalized){
 
1105
    if(gpgme_initalized){
1104
1106
      gpgme_release(mc.ctx);
1105
1107
    }
1106
1108
    
1133
1135
            free(fullname);
1134
1136
          }
1135
1137
        }
 
1138
        closedir(d);
1136
1139
      }
1137
1140
      ret = rmdir(tempdir);
1138
1141
      if(ret == -1){