X-Git-Url: http://andersk.mit.edu/gitweb/gssapi-openssh.git/blobdiff_plain/240debe08a8b143890d868c5d8ca9333e1817fc9..c5b7701b92cc5d0096e6a7d4e70da7398c1ff69c:/openssh/auth.c diff --git a/openssh/auth.c b/openssh/auth.c index 1b060ea..68e350b 100644 --- a/openssh/auth.c +++ b/openssh/auth.c @@ -115,11 +115,11 @@ allowed_user(struct passwd * pw) /* grab passwd field for locked account check */ #ifdef USE_SHADOW if (spw != NULL) -#if defined(HAVE_LIBIAF) && !defined(BROKEN_LIBIAF) +#ifdef USE_LIBIAF passwd = get_iaf_password(pw); #else passwd = spw->sp_pwdp; -#endif /* HAVE_LIBIAF && !BROKEN_LIBIAF */ +#endif /* USE_LIBIAF */ #else passwd = pw->pw_passwd; #endif @@ -141,9 +141,9 @@ allowed_user(struct passwd * pw) if (strstr(passwd, LOCKED_PASSWD_SUBSTR)) locked = 1; #endif -#if defined(HAVE_LIBIAF) && !defined(BROKEN_LIBIAF) +#ifdef USE_LIBIAF free(passwd); -#endif /* HAVE_LIBIAF && !BROKEN_LIBIAF */ +#endif /* USE_LIBIAF */ if (locked) { logit("User %.100s not allowed because account is locked", pw->pw_name); @@ -269,7 +269,7 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info) method, authctxt->valid ? "" : "invalid user ", (authctxt->user && authctxt->user[0]) ? - authctxt->user : "", + authctxt->user : "unknown", get_remote_ipaddr(), get_remote_port(), info); @@ -325,7 +325,7 @@ auth_root_allowed(char *method) * * This returns a buffer allocated by xmalloc. */ -static char * +char * expand_authorized_keys(const char *filename, struct passwd *pw) { char *file, ret[MAXPATHLEN]; @@ -488,7 +488,7 @@ getpwnamallow(const char *user) pw = getpwnam(user); if (pw == NULL) { logit("Invalid user %.100s from %.100s", - (user && user[0]) ? user : "", + (user && user[0]) ? user : "unknown", get_remote_ipaddr()); #ifdef CUSTOM_FAILED_LOGIN record_failed_login(user, @@ -571,8 +571,8 @@ fakepw(void) fake.pw_passwd = "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK"; fake.pw_gecos = "NOUSER"; - fake.pw_uid = privsep_pw->pw_uid; - fake.pw_gid = privsep_pw->pw_gid; + fake.pw_uid = privsep_pw == NULL ? (uid_t)-1 : privsep_pw->pw_uid; + fake.pw_gid = privsep_pw == NULL ? (gid_t)-1 : privsep_pw->pw_gid; #ifdef HAVE_PW_CLASS_IN_PASSWD fake.pw_class = ""; #endif