diff --git a/pwauth/auth_aix.c b/pwauth/auth_aix.c index 31405fb..2e98c47 100644 --- a/pwauth/auth_aix.c +++ b/pwauth/auth_aix.c @@ -47,7 +47,7 @@ * status code. (This version for systems with a getuserpw() call.) */ -int check_auth(char *login, char *passwd) +int check_auth(const char *login, const char *passwd) { char *cpass; struct userpw *upwd= getuserpw(login); @@ -85,7 +85,7 @@ int check_auth(char *login, char *passwd) * interface and return a status code. */ -int check_auth(char *login, char *passwd) +int check_auth(const char *login, const char *passwd) { char *cpass; char *message; diff --git a/pwauth/auth_bsd.c b/pwauth/auth_bsd.c index b5e9004..40247a0 100644 --- a/pwauth/auth_bsd.c +++ b/pwauth/auth_bsd.c @@ -49,7 +49,7 @@ * (This version for systems with only a getpwnam() call.) */ -int check_auth(char *login, char *passwd) +int check_auth(const char *login, const char *passwd) { char *cpass; struct passwd *pwd= getpwnam(login); diff --git a/pwauth/auth_hpux.c b/pwauth/auth_hpux.c index c19ce54..1e38d4a 100644 --- a/pwauth/auth_hpux.c +++ b/pwauth/auth_hpux.c @@ -45,7 +45,7 @@ * (This version for systems with a getprpwnam() call.) */ -int check_auth(char *login, char *passwd) +int check_auth(const char *login, const char *passwd) { char *cpass; struct pr_passwd *pwd= getprpwnam(login); diff --git a/pwauth/auth_mdw.c b/pwauth/auth_mdw.c index b0a4f7b..d58f6e9 100644 --- a/pwauth/auth_mdw.c +++ b/pwauth/auth_mdw.c @@ -38,8 +38,8 @@ #include #endif #include /* is -I/usr/local/include on gcc command? */ -char *kg_pwhash(char *clear, char *user, char *result, int resultlen); -char *pw_encrypt(); +char *kg_pwhash(const char *clear, const char *user, char *result, int resultlen); +char *pw_encrypt(const char *clear, const char *salt); #endif /* SHADOW_MDW */ #ifdef SHADOW_MDW @@ -50,7 +50,7 @@ char *pw_encrypt(); * (This version for systems with kg_pwhash() call.) */ -int check_auth(char *login, char *passwd) +int check_auth(const char *login, const char *passwd) { char *cpass; char bf[40]; diff --git a/pwauth/auth_openbsd.c b/pwauth/auth_openbsd.c index d0571ec..f2ae285 100644 --- a/pwauth/auth_openbsd.c +++ b/pwauth/auth_openbsd.c @@ -45,7 +45,7 @@ * (This version for systems with auth_usercheck() call.) */ -int check_auth(char *login, char *passwd) +int check_auth(const char *login, const char *passwd) { auth_session_t *as; login_cap_t *lc; diff --git a/pwauth/auth_pam.c b/pwauth/auth_pam.c index 9f301d9..fa1699a 100644 --- a/pwauth/auth_pam.c +++ b/pwauth/auth_pam.c @@ -56,8 +56,8 @@ /* Application data structure passed to PAM_conv: */ struct ad_user { - char *login; - char *passwd; + const char *login; + const char *passwd; }; /* The pam_unix.so library in Solaris 2.6 fails to pass along appdata_ptr @@ -150,7 +150,7 @@ int PAM_conv (int num_msg, const struct pam_message **msg, * (This version for systems using PAM.) */ -int check_auth(char *login, char *passwd) +int check_auth(const char *login, const char *passwd) { #ifndef PAM_SOLARIS_26 struct ad_user user_info= {login, passwd}; diff --git a/pwauth/auth_sun.c b/pwauth/auth_sun.c index 461d1bb..b1da9f8 100644 --- a/pwauth/auth_sun.c +++ b/pwauth/auth_sun.c @@ -38,8 +38,8 @@ #include #endif #include -struct spwd *getspnam(); -char *crypt(); +struct spwd *getspnam(const char *name); +char *crypt(const char *key, const char *salt); #endif /* SHADOW_SUN */ #ifdef SHADOW_JFH @@ -47,8 +47,8 @@ char *crypt(); #include #endif #include /* this may be hidden in /usr/local/include */ -struct spwd *getspnam(); -char *pw_encrypt(); +struct spwd *getspnam(const char *name); +char *pw_encrypt(const char *clear, const char *salt); #endif /* SHADOW_JFH */ #if defined(SHADOW_JFH) || defined(SHADOW_SUN) @@ -59,7 +59,7 @@ char *pw_encrypt(); * (This version for systems with getspnam() call.) */ -int check_auth(char *login, char *passwd) +int check_auth(const char *login, const char *passwd) { char *cpass; struct spwd *spwd= getspnam(login); diff --git a/pwauth/checkfaillog.c b/pwauth/checkfaillog.c index c282a86..eee3728 100644 --- a/pwauth/checkfaillog.c +++ b/pwauth/checkfaillog.c @@ -44,7 +44,8 @@ int main(int argc, char **argv) { int i, j; int reset= 0, verbose= 1; - char *user= NULL, *msg= NULL; + char *user= NULL; + const char *msg= NULL; uid_t uid= getuid(); /* Parse command line */ diff --git a/pwauth/fail_check.c b/pwauth/fail_check.c index 7006fbb..a4169de 100644 --- a/pwauth/fail_check.c +++ b/pwauth/fail_check.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "config.h" #include "fail_log.h" @@ -52,7 +53,7 @@ * failures since last login. Last was