/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: 2009-09-07 07:48:59 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090907074859-nv2nni1wwib5hi10
* plugin-runner.c: Minor stylistic changes.

* plugins.d/askpass-fifo.c: Changed contact information and did minor
                            stylistic changes.

* plugins.d/mandos-client.c: Minor stylistic changes.

* plugins.d/password-prompt.c: Changed contact information.

* plugins.d/splashy.c: Changed contact information.
  (main): Changed error handling design.  Bug fix: Will now be much
          more tolerant against signals.  Bug fix: Will now re-raise
          signal received.

* plugins.d/usplash.c: Changed contact information and did minor
                       stylistic changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * along with this program.  If not, see
20
20
 * <http://www.gnu.org/licenses/>.
21
21
 * 
22
 
 * Contact the authors at <https://www.fukt.bsnet.se/~belorn/> and
23
 
 * <https://www.fukt.bsnet.se/~teddy/>.
 
22
 * Contact the authors at <mandos@fukt.bsnet.se>.
24
23
 */
25
24
 
26
25
#define _GNU_SOURCE             /* TEMP_FAILURE_RETRY() */
29
28
#include <iso646.h>             /* and */
30
29
#include <errno.h>              /* errno, EEXIST */
31
30
#include <stdio.h>              /* perror() */
32
 
#include <stdlib.h>             /* EXIT_FAILURE, NULL, size_t, free(), 
 
31
#include <stdlib.h>             /* EXIT_FAILURE, NULL, size_t, free(),
33
32
                                   realloc(), EXIT_SUCCESS */
34
33
#include <fcntl.h>              /* open(), O_RDONLY */
35
34
#include <unistd.h>             /* read(), close(), write(),
62
61
  {
63
62
    size_t buf_allocated = 0;
64
63
    const size_t blocksize = 1024;
65
 
    do{
 
64
    do {
66
65
      if(buf_len + blocksize > buf_allocated){
67
66
        char *tmp = realloc(buf, buf_allocated + blocksize);
68
67
        if(tmp == NULL){
81
80
        return EXIT_FAILURE;
82
81
      }
83
82
      buf_len += (size_t)sret;
84
 
    }while(sret != 0);
 
83
    } while(sret != 0);
85
84
  }
86
85
  
87
86
  /* Close FIFO */