}
#ifdef HAS_SHADOW
if ((pw->pw_passwd && pw->pw_passwd[0] == '@'
- && pw_auth (pw->pw_passwd+1, pw->pw_name, PW_LOGIN, NULL))
+ && pw_auth (pw->pw_passwd+1, pw->pw_name, PW_LOGIN))
|| !valid (passwd, pw)) {
return (UPAP_AUTHNAK);
}
int pw_auth (const char *cipher,
const char *user,
- int reason,
- /*@null@*/const char *input)
+ int reason)
{
int retval;
char prompt[1024];
char *clear = NULL;
const char *cp;
const char *encrypted;
+ const char *input = NULL;
#ifdef SKEY
bool use_skey = false;
return 0;
}
- /*
- * There are even programs for changing the user name ...
- */
-
- if ((PW_CHANGE == reason) && (NULL != input)) {
- return 0;
- }
-
/*
* WARNING:
*
* get the cleartext password for us.
*/
- if ((PW_FTP != reason) && (PW_REXEC != reason) && (NULL == input)) {
+ if ((PW_FTP != reason) && (PW_REXEC != reason)) {
cp = getdef_str ("LOGIN_STRING");
if (NULL == cp) {
cp = _(PROMPT);
#ifndef USE_PAM
int pw_auth (const char *cipher,
const char *user,
- int flag,
- /*@null@*/const char *input);
+ int flag);
#endif /* !USE_PAM */
/*
if (NULL != sp) {
passwd = sp->sp_pwdp;
}
- if (pw_auth (passwd, user, PW_LOGIN, NULL) != 0) {
+ if (pw_auth(passwd, user, PW_LOGIN) != 0) {
SYSLOG ((LOG_WARN, "incorrect password for `%s'", user));
(void) sleep (1);
fprintf (log_get_logfd(), _("Incorrect password for %s.\n"), user);
goto auth_ok;
}
- if (pw_auth (user_passwd, username, reason, NULL) == 0) {
+ if (pw_auth(user_passwd, username, reason) == 0) {
goto auth_ok;
}
* all). --marekm
*/
if (streq(user_passwd, "")) {
- pw_auth ("!", username, reason, NULL);
+ pw_auth("!", username, reason);
}
/*
* The first character of an administrator defined method is an '@'
* character.
*/
- if (pw_auth (password, name, PW_SU, NULL) != 0) {
+ if (pw_auth(password, name, PW_SU) != 0) {
SYSLOG (((pw->pw_uid != 0)? LOG_NOTICE : LOG_WARN,
"Authentication failed for %s", name));
fprintf(stderr, _("%s: Authentication failure\n"), Prog);