/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: 2019-02-11 06:14:29 UTC
  • Revision ID: teddy@recompile.se-20190211061429-n6n5zk29iatshlb3
Fix Debian package dependencies

* debian/control (Build-Depends): Changed GnuTLS dependencies to
                                  "libgnutls30 (>= 3.3.0),
                                  libgnutls28-dev (>= 3.6.6) |
                                  libgnutls28-dev (<< 3.6.0)".  (We
                                  can't depend on the virtual package
                                  "gnutls-dev", since we need the
                                  version restrictions.)
  (Package: mandos/Depends): Remove dependency on libgnutls28-dev
                             package.
  (Package: mandos/Suggests): New; set to "libc6-dev,
                              c-compiler". (Used to find value of
                              "SO_BINDTODEVICE").
  (Package: mandos-client/Depends): Don't depend on openssl anymore;
                                    instead depend on either a
                                    gnutls-bin (>= 3.6.6) (in which
                                    case TLS key generation will
                                    work), or on libgnutls30 (<<
                                    3.6.0) (in which case TLS key
                                    generation will not be needed).

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-2019, 2021 Teddy Hogeborn
6
 
 * Copyright © 2008-2019, 2021 Björn Påhlsson
 
5
 * Copyright © 2008-2018 Teddy Hogeborn
 
6
 * Copyright © 2008-2018 Björn Påhlsson
7
7
 * 
8
8
 * This file is part of Mandos.
9
9
 * 
23
23
 * Contact the authors at <mandos@recompile.se>.
24
24
 */
25
25
 
26
 
#define _GNU_SOURCE             /* vasprintf(),
27
 
                                   program_invocation_short_name */
28
 
#include <sys/types.h>          /* uid_t, gid_t, getuid(), getgid(),
29
 
                                   setgid(), setuid() */
30
 
#include <unistd.h>             /* uid_t, gid_t, ssize_t, getuid(),
31
 
                                   getgid(), setgid(), setuid(),
32
 
                                   read(), close(), write(),
33
 
                                   STDOUT_FILENO */
34
 
#include <stdarg.h>             /* va_list, va_start(), vfprintf() */
35
 
#include <stdio.h>              /* vasprintf(), fprintf(), stderr,
36
 
                                   vfprintf() */
37
 
#include <errno.h>              /* program_invocation_short_name,
38
 
                                   errno, EACCES, ENOTDIR, ELOOP,
 
26
#define _GNU_SOURCE             /* TEMP_FAILURE_RETRY() */
 
27
#include <sys/types.h>          /* uid_t, gid_t, ssize_t */
 
28
#include <sys/stat.h>           /* mkfifo(), S_IRUSR, S_IWUSR */
 
29
#include <iso646.h>             /* and */
 
30
#include <errno.h>              /* errno, EACCES, ENOTDIR, ELOOP,
39
31
                                   ENAMETOOLONG, ENOSPC, EROFS,
40
32
                                   ENOENT, EEXIST, EFAULT, EMFILE,
41
33
                                   ENFILE, ENOMEM, EBADF, EINVAL, EIO,
42
34
                                   EISDIR, EFBIG */
43
 
#include <string.h>             /* strerror() */
44
35
#include <error.h>              /* error() */
45
 
#include <stdlib.h>             /* free(), realloc(), EXIT_SUCCESS */
46
 
#include <sys/stat.h>           /* mkfifo(), S_IRUSR, S_IWUSR */
47
 
#include <sysexits.h>           /* EX_OSFILE, EX_OSERR,
 
36
#include <stdio.h>              /* fprintf(), vfprintf(),
 
37
                                   vasprintf() */
 
38
#include <stdlib.h>             /* EXIT_FAILURE, NULL, size_t, free(),
 
39
                                   realloc(), EXIT_SUCCESS */
 
40
#include <fcntl.h>              /* open(), O_RDONLY */
 
41
#include <unistd.h>             /* read(), close(), write(),
 
42
                                   STDOUT_FILENO */
 
43
#include <sysexits.h>           /* EX_OSERR, EX_OSFILE,
48
44
                                   EX_UNAVAILABLE, EX_IOERR */
49
 
#include <fcntl.h>              /* open(), O_RDONLY */
50
 
#include <stddef.h>             /* NULL, size_t */
 
45
#include <string.h>             /* strerror() */
 
46
#include <stdarg.h>             /* va_list, va_start(), ... */
51
47
 
52
48
uid_t uid = 65534;
53
49
gid_t gid = 65534;