/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 at bsnet
  • Date: 2011-12-24 19:43:48 UTC
  • mfrom: (505.1.27 teddy)
  • Revision ID: teddy@fukt.bsnet.se-20111224194348-0buonmve2dnwcnzw
Merge from Teddy

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
 
171
171
/* Function to use when printing errors */
172
172
void perror_plus(const char *print_text){
173
 
  int e = errno;
174
173
  fprintf(stderr, "Mandos plugin %s: ",
175
174
          program_invocation_short_name);
176
 
  errno = e;
177
175
  perror(print_text);
178
176
}
179
177
 
180
 
__attribute__((format (gnu_printf, 2, 3)))
181
178
int fprintf_plus(FILE *stream, const char *format, ...){
182
179
  va_list ap;
183
180
  va_start (ap, format);
1473
1470
          _exit(EX_OSERR);
1474
1471
        }
1475
1472
        free(delaystring);
1476
 
        if(execl(fullname, direntry->d_name, mode, NULL) == -1){
1477
 
          perror_plus("execl");
1478
 
          _exit(EXIT_FAILURE);
1479
 
        }
 
1473
        ret = execl(fullname, direntry->d_name, mode, NULL);
 
1474
        perror_plus("execl");
1480
1475
      } else {
1481
1476
        int status;
1482
1477
        if(TEMP_FAILURE_RETRY(waitpid(hook_pid, &status, 0)) == -1){