diff options
Diffstat (limited to 'src/qmail-authuser.c')
-rw-r--r-- | src/qmail-authuser.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/qmail-authuser.c b/src/qmail-authuser.c index ce18a19..1f31df6 100644 --- a/src/qmail-authuser.c +++ b/src/qmail-authuser.c @@ -1,7 +1,7 @@ #include <pwd.h> #include <unistd.h> -#include <stdio.h> +#include <errno.h> #include <crypt.h> @@ -9,13 +9,9 @@ #include "byte.h" #include "case.h" #include "constmap.h" -#include "error.h" #include "fd.h" -#include "fmt.h" -#include "open.h" #include "pathexec.h" #include "prot.h" -#include "scan.h" #include "sig.h" #include "str.h" #include "stralloc.h" @@ -86,7 +82,7 @@ stralloc shell = {0}; cram-md5/apop: (1,5) */ -void exit(int fail) +static void exit(int fail) { int i; @@ -94,7 +90,7 @@ void exit(int fail) _exit(fail); } -int dig_ascii(char *digascii, const char *digest, const int len) +static int dig_ascii(char *digascii, const char *digest, const int len) { static const char hextab[] = "0123456789abcdef"; int j; @@ -108,7 +104,7 @@ int dig_ascii(char *digascii, const char *digest, const int len) return (2 * j); // 2*len } -int auth_sha1(char *pwdhash, char *response) +static int auth_sha1(char *pwdhash, char *response) { unsigned char digest[20]; unsigned char digascii[41]; @@ -119,7 +115,7 @@ int auth_sha1(char *pwdhash, char *response) return str_diffn(digascii, pwdhash, 40); } -int auth_sha256(char *pwdhash, char *response) +static int auth_sha256(char *pwdhash, char *response) { unsigned char digest[32]; unsigned char digascii[65]; @@ -130,7 +126,7 @@ int auth_sha256(char *pwdhash, char *response) return str_diffn(digascii, pwdhash, 64); } -int auth_md5(char *pwdhash, char *response) +static int auth_md5(char *pwdhash, char *response) { MD5_CTX ctx; unsigned char digest[16]; @@ -144,7 +140,7 @@ int auth_md5(char *pwdhash, char *response) return str_diffn(digascii, pwdhash, 32); } -int auth_hash(char *password, char *response) +static int auth_hash(char *password, char *response) { switch (str_len(password)) { case 32: return auth_md5(password, response); @@ -154,7 +150,7 @@ int auth_hash(char *password, char *response) } } -int auth_unix(char *user, char *response) +static int auth_unix(char *user, char *response) { char *encrypted = 0; char *stored = 0; @@ -199,7 +195,7 @@ int auth_unix(char *user, char *response) return r; } -int auth_apop(unsigned char *password, unsigned char *response, unsigned char *challenge) +static int auth_apop(unsigned char *password, unsigned char *response, unsigned char *challenge) { MD5_CTX context; unsigned char digest[16]; @@ -214,7 +210,7 @@ int auth_apop(unsigned char *password, unsigned char *response, unsigned char *c return (str_diff(digascii, response)); } -int auth_cram(unsigned char *password, unsigned char *response, unsigned char *challenge) +static int auth_cram(unsigned char *password, unsigned char *response, unsigned char *challenge) { unsigned char digest[16]; unsigned char digascii[33]; @@ -225,7 +221,7 @@ int auth_cram(unsigned char *password, unsigned char *response, unsigned char *c return (str_diff(digascii, response) && str_diff(password, response)); } -int auth_dovecot(char *user, char *response, char *socket, char *service) +static int auth_dovecot(char *user, char *response, char *socket, char *service) { int wstat; int child; @@ -261,7 +257,7 @@ int auth_dovecot(char *user, char *response, char *socket, char *service) return wait_exitcode(wstat); } -int auth_wrapper(char *pam, char *arg1, char *arg2, char *auth, int len) +static int auth_wrapper(char *pam, char *arg1, char *arg2, char *auth, int len) { int wstat; int child; |