/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/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2015-07-09 20:32:52 UTC
  • Revision ID: teddy@recompile.se-20150709203252-u10p7trfsxc1a9yp
Install client Diffie-Hellman parameters into initramfs.

* debian/control (Package: mandos-client/Recommends): Added
  "gnutls-bin | openssl" (to generate DH parameters).
* debian/mandos-client.postinst (create_dh_params): New function
                                                    called on package
                                                    configure.
* plugins.d/mandos-client.c (main): Bug fix: Work around Debian bug
                                    #633582 also for the
                                    "client-dhparams.pem" file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2546
2546
        }
2547
2547
      }
2548
2548
      
2549
 
      if(strcmp(dh_params_file, PATHDIR "/dhparams.pem" ) == 0){
 
2549
      if(strcmp(dh_params_file, PATHDIR "/client-dhparams.pem" )
 
2550
         == 0){
2550
2551
        int dhparams_fd = open(dh_params_file, O_RDONLY);
2551
2552
        if(dhparams_fd == -1){
2552
2553
          perror_plus("open");
2746
2747
      errno = bring_up_interface(interface, delay);
2747
2748
      if(not interface_was_up){
2748
2749
        if(errno != 0){
2749
 
          fprintf_plus(stderr, "Failed to bring up interface \"%s\":"
2750
 
                       " %s\n", interface, strerror(errno));
 
2750
          perror_plus("Failed to bring up interface");
2751
2751
        } else {
2752
2752
          errno = argz_add(&interfaces_to_take_down,
2753
2753
                           &interfaces_to_take_down_size,