/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/askpass-fifo.c

  • Committer: Teddy Hogeborn
  • Date: 2011-04-03 00:46:51 UTC
  • Revision ID: teddy@fukt.bsnet.se-20110403004651-yyrzgwwkoq4ts2vi
* mandos: Never call .Reset() on a defunct Avahi entry group.
  (AvahiService.remove): Only do group.Reset(), as before.
  (AvahiService.add): Only create new group if necessary.
  (AvahiService.cleanup): Also do group.Free() if a group exists.
  (AvahiService.server_state_changed): Call .cleanup() on errors.
                                       Also log error parameter, if
                                       passed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
  ret = mkfifo(passfifo, S_IRUSR | S_IWUSR);
52
52
  if(ret == -1){
53
53
    int e = errno;
54
 
    error(0, errno, "mkfifo");
55
54
    switch(e){
56
55
    case EACCES:
57
56
    case ENOTDIR:
58
57
    case ELOOP:
59
 
      return EX_OSFILE;
 
58
      error(EX_OSFILE, errno, "mkfifo");
60
59
    case ENAMETOOLONG:
61
60
    case ENOSPC:
62
61
    case EROFS:
63
62
    default:
64
 
      return EX_OSERR;
 
63
      error(EX_OSERR, errno, "mkfifo");
65
64
    case ENOENT:
66
 
      return EX_UNAVAILABLE;    /* no "/lib/cryptsetup"? */
 
65
      /* no "/lib/cryptsetup"? */
 
66
      error(EX_UNAVAILABLE, errno, "mkfifo");
67
67
    case EEXIST:
68
68
      break;                    /* not an error */
69
69
    }