/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-09-05 07:11:24 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080905071124-9dq11jq5rfd6zfxf
* Makefile: Changed to use symbolic instead of octal modes throughout.
  (KEYDIR): New variable for the key directory.
  (install-server): Bug fix: remove "--parents" from install args.
  (install-client): Bug fix: - '' -  Also create key directory.  Do
                    not chmod plugin dir.  Create custom plugin directory
                    if not the same as normal plugin directory.  Add
                    "--dir" option to "mandos-keygen".  Add note about
                    running "mandos-keygen --password".
  (uninstall-server): Do not depend on the installed server binary,
                      since this made it impossible to do a purge
                      after an uninstall.
  (purge-client): Shred seckey.txt.  Use $(KEYDIR).

* README: Improved wording.

* initramfs-tools-hook: Use a loop to find prefix.  Also find keydir.
                        Remove "${DESTDIR}" from "copy_exec".  Do not
                        try to copy literal "*" if no custom plugins
                        are found.  Copy key files from keydir, not
                        config dir.  Only repair mode on directories
                        that actually exist.  Do not run chmod if
                        nothing needs repairing.

* plugin-runner.conf: New file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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("gpgme_data_seek");
 
318
    perror("pgpme_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);
455
454
  return -1;
456
455
}
457
456
 
831
830
                          .dh_bits = 1024, .priority = "SECURE256"
832
831
                          ":!CTYPE-X.509:+CTYPE-OPENPGP" };
833
832
    bool gnutls_initalized = false;
834
 
    bool gpgme_initalized = false;
 
833
    bool pgpme_initalized = false;
835
834
    
836
835
    {
837
836
      struct argp_option options[] = {
935
934
    }
936
935
    
937
936
    if(not init_gpgme(&mc, pubkey, seckey, tempdir)){
938
 
      fprintf(stderr, "gpgme_initalized failed\n");
 
937
      fprintf(stderr, "pgpme_initalized failed\n");
939
938
      exitcode = EXIT_FAILURE;
940
939
      goto end;
941
940
    } else {
942
 
      gpgme_initalized = true;
 
941
      pgpme_initalized = true;
943
942
    }
944
943
    
945
944
    /* If the interface is down, bring it up */
1099
1098
    if (gnutls_initalized){
1100
1099
      gnutls_certificate_free_credentials(mc.cred);
1101
1100
      gnutls_global_deinit ();
1102
 
      gnutls_dh_params_deinit(mc.dh_params);
1103
1101
    }
1104
1102
 
1105
 
    if(gpgme_initalized){
 
1103
    if(pgpme_initalized){
1106
1104
      gpgme_release(mc.ctx);
1107
1105
    }
1108
1106
 
1135
1133
            free(fullname);
1136
1134
          }
1137
1135
        }
1138
 
        closedir(d);
1139
1136
      }
1140
1137
      ret = rmdir(tempdir);
1141
1138
      if(ret == -1){