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

* plugins.d/mandos-client.c (fprintf_plus): Check format string.
  (run_network_hooks): Check for execl() failure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
  perror(print_text);
176
176
}
177
177
 
 
178
__attribute__((format (gnu_printf, 2, 3)))
178
179
int fprintf_plus(FILE *stream, const char *format, ...){
179
180
  va_list ap;
180
181
  va_start (ap, format);
1470
1471
          _exit(EX_OSERR);
1471
1472
        }
1472
1473
        free(delaystring);
1473
 
        ret = execl(fullname, direntry->d_name, mode, NULL);
1474
 
        perror_plus("execl");
 
1474
        if(execl(fullname, direntry->d_name, mode, NULL) == -1){
 
1475
          perror_plus("execl");
 
1476
          _exit(EXIT_FAILURE);
 
1477
        }
1475
1478
      } else {
1476
1479
        int status;
1477
1480
        if(TEMP_FAILURE_RETRY(waitpid(hook_pid, &status, 0)) == -1){