summaryrefslogtreecommitdiff
path: root/src/qmail-authuser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmail-authuser.c')
-rw-r--r--src/qmail-authuser.c26
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;