Wrap valid_shell and add to sudo_pwutil_set_backend().

This will make it possible to support a different getusershell()
implementation for testsudoers in the future.
This commit is contained in:
Todd C. Miller
2023-09-09 14:48:25 -06:00
parent d18ee8e0e7
commit 2fdb4db339
7 changed files with 19 additions and 8 deletions

View File

@@ -454,7 +454,7 @@ again:
* Returns true if the specified shell is allowed by /etc/shells, else false.
*/
bool
valid_shell(const char *shell)
PREFIX(valid_shell)(const char *shell)
{
const char *entry;
debug_decl(valid_shell, SUDOERS_DEBUG_NSS);
@@ -471,4 +471,3 @@ valid_shell(const char *shell)
debug_return_bool(false);
}