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

Documentation changes:

* DBUS-API: New file documenting the server D-Bus interface.

* clients.conf: Add examples of new approval settings.

* debian/mandos.docs: Added "DBUS-API".

* mandos-clients.conf.xml (OPTIONS): Added "approved_by_default",
                                     "approval_delay", and
                                     "approval_duration".
* mandos.xml (D-BUS INTERFACE): Refer to the "DBUS-API" file.
  (BUGS): Remove mention of lack of a remote query interface.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Askpass-FIFO - Read a password from a FIFO and output it
4
4
 * 
5
 
 * Copyright © 2008-2011 Teddy Hogeborn
6
 
 * Copyright © 2008-2011 Björn Påhlsson
 
5
 * Copyright © 2008,2009 Teddy Hogeborn
 
6
 * Copyright © 2008,2009 Björn Påhlsson
7
7
 * 
8
8
 * This program is free software: you can redistribute it and/or
9
9
 * modify it under the terms of the GNU General Public License as
51
51
  ret = mkfifo(passfifo, S_IRUSR | S_IWUSR);
52
52
  if(ret == -1){
53
53
    int e = errno;
 
54
    error(0, errno, "mkfifo");
54
55
    switch(e){
55
56
    case EACCES:
56
57
    case ENOTDIR:
57
58
    case ELOOP:
58
 
      error(EX_OSFILE, errno, "mkfifo");
 
59
      return EX_OSFILE;
59
60
    case ENAMETOOLONG:
60
61
    case ENOSPC:
61
62
    case EROFS:
62
63
    default:
63
 
      error(EX_OSERR, errno, "mkfifo");
 
64
      return EX_OSERR;
64
65
    case ENOENT:
65
 
      /* no "/lib/cryptsetup"? */
66
 
      error(EX_UNAVAILABLE, errno, "mkfifo");
 
66
      return EX_UNAVAILABLE;    /* no "/lib/cryptsetup"? */
67
67
    case EEXIST:
68
68
      break;                    /* not an error */
69
69
    }