diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 23:09:39 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 23:09:39 +0200 |
commit | a42c2a846d854d5b1ad42e27ee7091c72d2b5080 (patch) | |
tree | 2278f8fca96c02a0c7f97a40fb85f9e8a4b2deeb /src/qmail-authuser.c | |
parent | e6e9663d40f7aab9e1982dddcaa11386551ad182 (diff) |
convert to the meson build system
Diffstat (limited to 'src/qmail-authuser.c')
-rw-r--r-- | src/qmail-authuser.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/qmail-authuser.c b/src/qmail-authuser.c index c26d61b..ce18a19 100644 --- a/src/qmail-authuser.c +++ b/src/qmail-authuser.c @@ -21,16 +21,21 @@ #include "stralloc.h" #include "wait.h" -#include "auto_qmail.h" #include "control.h" #include "global.h" -#include "hasspnam.h" -#include "hasuserpw.h" #include "hmac_md5.h" #include "md5.h" #include "sha1.h" #include "sha256.h" +#ifdef USE_CONFIG + #include "fehsqm-config.h" +#else + #include "auto_qmail.h" + #include "hasspnam.h" + #include "hasuserpw.h" +#endif + #ifdef HASGETSPNAM #include <shadow.h> static struct spwd *spw; @@ -47,12 +52,13 @@ static struct userpw *upw; #define DOVECOT_SERVICE "-x" #define POP_USER "qmail-pop3d" -/** @file qmail-authuser.c -@return 0: ok - 1: credentials failure - 2: qmail-authuser is misused - 110: can't read controls - 111: temporary problem checking the password +/** + @file qmail-authuser.c + @return 0: ok + 1: credentials failure + 2: qmail-authuser is misused + 110: can't read controls + 111: temporary problem checking the password */ static struct passwd *pw; @@ -171,7 +177,7 @@ int auth_unix(char *user, char *response) stored = upw->upw_passwd; else if (errno == ETXTBSY) exit(111); -#elif HASGETSPNAM +#elif defined(HASGETSPNAM) spw = getspnam(user); if (spw) stored = spw->sp_pwdp; |