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:
@@ -597,9 +597,7 @@ port_help(void)
|
|||||||
boolean
|
boolean
|
||||||
authorize_wizard_mode(void)
|
authorize_wizard_mode(void)
|
||||||
{
|
{
|
||||||
struct passwd *pw = get_unix_pw();
|
if (sysopt.wizards && sysopt.wizards[0]) {
|
||||||
|
|
||||||
if (pw && sysopt.wizards && sysopt.wizards[0]) {
|
|
||||||
if (check_user_string(sysopt.wizards))
|
if (check_user_string(sysopt.wizards))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -956,9 +956,7 @@ port_help(void)
|
|||||||
boolean
|
boolean
|
||||||
authorize_wizard_mode(void)
|
authorize_wizard_mode(void)
|
||||||
{
|
{
|
||||||
struct passwd *pw = get_unix_pw();
|
if (sysopt.wizards && sysopt.wizards[0]) {
|
||||||
|
|
||||||
if (pw && sysopt.wizards && sysopt.wizards[0]) {
|
|
||||||
if (check_user_string(sysopt.wizards))
|
if (check_user_string(sysopt.wizards))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user