/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/password-prompt.c

  • Committer: Teddy Hogeborn
  • Date: 2014-02-16 03:56:48 UTC
  • Revision ID: teddy@recompile.se-20140216035648-i6rjq2mp8jicxudo
Allow self-tests to run without needing /dev/log.

* mandos (main): Only open /dev/log on initlogger() call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
/* Needed for conflict resolution */
73
73
const char plymouth_name[] = "plymouthd";
74
74
 
 
75
__attribute__((format (gnu_printf, 2, 3), nonnull(1)))
 
76
int fprintf_plus(FILE *stream, const char *format, ...){
 
77
  va_list ap;
 
78
  va_start (ap, format);
 
79
  
 
80
  TEMP_FAILURE_RETRY(fprintf(stream, "Mandos plugin %s: ",
 
81
                             program_invocation_short_name));
 
82
  return (int)TEMP_FAILURE_RETRY(vfprintf(stream, format, ap));
 
83
}
 
84
 
75
85
/* Function to use when printing errors */
76
86
__attribute__((format (gnu_printf, 3, 4)))
77
87
void error_plus(int status, int errnum, const char *formatstring,