Remove pw check in authorize_wizard_mode

Now that CHECK_PLNAME is a sysconf option, it can be possible to
authorize wizard mode even if get_unix_pw() fails to return the user's
login name, so I think the call to check_user_string() should go out
either way in case that's what's happening.
This commit is contained in:
Michael Meyer
2023-10-20 13:26:54 -04:00
committed by PatR
parent 484cd86ce3
commit 4f405b77ce
2 changed files with 2 additions and 6 deletions

View File

@@ -597,9 +597,7 @@ port_help(void)
boolean
authorize_wizard_mode(void)
{
struct passwd *pw = get_unix_pw();
if (pw && sysopt.wizards && sysopt.wizards[0]) {
if (sysopt.wizards && sysopt.wizards[0]) {
if (check_user_string(sysopt.wizards))
return TRUE;
}

View File

@@ -956,9 +956,7 @@ port_help(void)
boolean
authorize_wizard_mode(void)
{
struct passwd *pw = get_unix_pw();
if (pw && sysopt.wizards && sysopt.wizards[0]) {
if (sysopt.wizards && sysopt.wizards[0]) {
if (check_user_string(sysopt.wizards))
return TRUE;
}