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

  • Committer: Teddy Hogeborn
  • Date: 2008-08-12 19:47:50 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080812194750-uebbpk9ynxt3sjnt
* initramfs-tools-hook (gpg): Added "--no-random-seed-file" and
                              "--no-default-keyring".  Bug fix: moved
                              "--import" to end.

* mandos-keygen (gpg): Added "--no-options".

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
  char *plus_options = NULL;
204
204
  char **plus_argv = NULL;
205
205
 
206
 
  errno = 0;
207
 
  
208
206
  /* Establish a signal handler */
209
207
  sigemptyset(&sigchld_action.sa_mask);
210
208
  ret = sigaddset(&sigchld_action.sa_mask, SIGCHLD);
457
455
    char *filename = malloc(d_name_len + strlen(plugindir) + 2);
458
456
    if (filename == NULL){
459
457
      perror("malloc");
460
 
      exitstatus = EXIT_FAILURE;
461
 
      goto end;
 
458
      continue;
462
459
    }
463
460
    strcpy(filename, plugindir); /* Spurious warning */
464
461
    strcat(filename, "/");      /* Spurious warning */
467
464
    ret = stat(filename, &st);
468
465
    if (ret == -1){
469
466
      perror("stat");
470
 
      exitstatus = EXIT_FAILURE;
471
 
      goto end;
 
467
      free(filename);
 
468
      continue;
472
469
    }
473
470
    
474
471
    if (not S_ISREG(st.st_mode) or (access(filename, X_OK) != 0)){
523
520
    }
524
521
    // Starting a new process to be watched
525
522
    pid_t pid = fork();
 
523
    if(pid == -1){
 
524
      perror("fork");
 
525
      exitstatus = EXIT_FAILURE;
 
526
      goto end;
 
527
    }
526
528
    if(pid == 0){
527
529
      /* this is the child process */
528
530
      ret = sigaction(SIGCHLD, &old_sigchld_action, NULL);
715
717
 end:
716
718
  
717
719
  if(process_list == NULL or exitstatus != EXIT_SUCCESS){
718
 
    /* Fallback if all plugins failed or an error occured */
 
720
    /* Fallback if all plugins failed, none are found or an error occured */
719
721
    bool bret;
720
722
    fprintf(stderr, "Going to fallback mode using getpass(3)\n");
721
723
    char *passwordbuffer = getpass("Password: ");