/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-03-23 22:12:57 UTC
  • Revision ID: teddy@recompile.se-20140323221257-9lkufevfdn4kwoq6
Use openat() etc. in plugin-runner.  Also one less useless warning.

* plugin-runner.c (main): Only print warning about failure to work
                          around Debian bug #633582 if the plugin
                          directory actually exists.  Use openat(),
                          fstat(), faccessat(), and eliminate
                          asprintf().

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
  
83
83
  va_start(ap, formatstring);
84
84
  ret = vasprintf(&text, formatstring, ap);
85
 
  if (ret == -1){
 
85
  if(ret == -1){
86
86
    fprintf(stderr, "Mandos plugin %s: ",
87
87
            program_invocation_short_name);
88
88
    vfprintf(stderr, formatstring, ap);
212
212
  struct dirent **direntries = NULL;
213
213
  int ret;
214
214
  ret = scandir("/proc", &direntries, is_plymouth, alphasort);
215
 
  if (ret == -1){
 
215
  if(ret == -1){
216
216
    error_plus(1, errno, "scandir");
217
217
  }
218
218
  free(direntries);
303
303
    fprintf(stderr, "Starting %s\n", argv[0]);
304
304
  }
305
305
 
306
 
  if (conflict_detection()){
 
306
  if(conflict_detection()){
307
307
    if(debug){
308
308
      fprintf(stderr, "Stopping %s because of conflict\n", argv[0]);
309
309
    }