From a42c2a846d854d5b1ad42e27ee7091c72d2b5080 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Wed, 3 Jul 2024 23:09:39 +0200 Subject: convert to the meson build system --- src/qmail-authuser.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'src/qmail-authuser.c') 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 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; -- cgit v1.2.3