/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 plugin-runner.c

  • Committer: Teddy Hogeborn
  • Date: 2009-09-05 17:20:46 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090905172046-s92efz3m1j4c1sti
* plugins-runner.c (main): Bug fix: Close config file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  -*- coding: utf-8 -*- */
 
1
/*  -*- coding: utf-8; mode: c; mode: orgtbl -*- */
2
2
/*
3
3
 * Mandos plugin runner - Run Mandos plugins
4
4
 *
210
210
/*
211
211
 * Based on the example in the GNU LibC manual chapter 13.13 "File
212
212
 * Descriptor Flags".
213
 
 * *Note File Descriptor Flags:(libc)Descriptor Flags.
 
213
 | [[info:libc:Descriptor%20Flags][File Descriptor Flags]] |
214
214
 */
215
215
static int set_cloexec_flag(int fd){
216
216
  int ret = fcntl(fd, F_GETFD, 0);
617
617
        custom_argv[custom_argc] = NULL;
618
618
      }
619
619
    }
 
620
    do{
 
621
      ret = fclose(conffp);
 
622
    }while(ret == EOF and errno == EINTR);
 
623
    if(ret == EOF){
 
624
      perror("fclose");
 
625
      exitstatus = EXIT_FAILURE;
 
626
      goto fallback;
 
627
    }
620
628
    free(org_line);
621
629
  } else {
622
630
    /* Check for harmful errors and go to fallback. Other errors might