diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2020-06-25 10:41:49 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-06-25 10:41:49 +0100 |
commit | 1077d3c3f960c4e5a157c51815b8009f5114ab1a (patch) | |
tree | f75c4dcad89e050957dfb7718abc18fa17073395 /src | |
parent | bec94709e708f087fe7fa456bec95d4e63edc3ed (diff) |
Build: guards on openat()
Diffstat (limited to 'src')
-rw-r--r-- | src/OS/os.h-Linux | 2 | ||||
-rw-r--r-- | src/src/functions.h | 2 | ||||
-rw-r--r-- | src/src/transports/queuefile.c | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/OS/os.h-Linux b/src/OS/os.h-Linux index c705e5cd2..ba5f13450 100644 --- a/src/OS/os.h-Linux +++ b/src/OS/os.h-Linux @@ -71,7 +71,7 @@ then change the 0 to 1 in the next block. */ # define LLONG_MAX LONG_LONG_MAX #endif -#if _POSIX_C_SOURCE >= 200809L || _ATFILE_SOUCE +#if _POSIX_C_SOURCE >= 200809L || _ATFILE_SOURCE # define EXIM_HAVE_OPENAT #endif diff --git a/src/src/functions.h b/src/src/functions.h index 110d4db19..54de974c6 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -1104,6 +1104,7 @@ log_write(0, LOG_MAIN|LOG_PANIC, "Tainted filename '%s'", pathname); errno = EACCES; return -1; } +#ifdef EXIM_HAVE_OPENAT static inline int exim_openat(int dirfd, const char *pathname, int flags) { @@ -1120,6 +1121,7 @@ log_write(0, LOG_MAIN|LOG_PANIC, "Tainted filename '%s'", pathname); errno = EACCES; return -1; } +#endif static inline FILE * exim_fopen(const char *pathname, const char *mode) diff --git a/src/src/transports/queuefile.c b/src/src/transports/queuefile.c index 21ed3527f..259bfd941 100644 --- a/src/src/transports/queuefile.c +++ b/src/src/transports/queuefile.c @@ -11,6 +11,10 @@ #include "../exim.h" #include "queuefile.h" +#ifndef EXIM_HAVE_OPENAT +# error queuefile transport reqires openat() support +#endif + /* Options specific to the appendfile transport. They must be in alphabetic order (note that "_" comes before the lower case letters). Some of them are stored in the publicly visible instance block - these are flagged with the |