Fix a logic error in 96651906de42 which prevented sudo from using
the PAM-supplied prompt. Bug #799
This commit is contained in:
@@ -435,7 +435,10 @@ use_pam_prompt(const char *pam_prompt)
|
|||||||
size_t user_len;
|
size_t user_len;
|
||||||
debug_decl(use_pam_prompt, SUDOERS_DEBUG_AUTH)
|
debug_decl(use_pam_prompt, SUDOERS_DEBUG_AUTH)
|
||||||
|
|
||||||
if (!def_passprompt_override) {
|
/* Always use sudo prompt if passprompt_override is set. */
|
||||||
|
if (def_passprompt_override)
|
||||||
|
debug_return_bool(false);
|
||||||
|
|
||||||
/* If sudo prompt matches "^Password: ?$", use PAM prompt. */
|
/* If sudo prompt matches "^Password: ?$", use PAM prompt. */
|
||||||
if (PROMPT_IS_PASSWORD(def_prompt))
|
if (PROMPT_IS_PASSWORD(def_prompt))
|
||||||
debug_return_bool(true);
|
debug_return_bool(true);
|
||||||
@@ -455,8 +458,9 @@ use_pam_prompt(const char *pam_prompt)
|
|||||||
(cp[12] == '\0' || (cp[12] == ' ' && cp[13] == '\0')))
|
(cp[12] == '\0' || (cp[12] == ' ' && cp[13] == '\0')))
|
||||||
debug_return_bool(false);
|
debug_return_bool(false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
debug_return_bool(false);
|
/* Otherwise, use the PAM prompt. */
|
||||||
|
debug_return_bool(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user