mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Rename the even_root option to allow_root.
Sponsored by: DARPA, NAI Labs
This commit is contained in:
parent
2af8b6958a
commit
fd994fa945
2 changed files with 6 additions and 7 deletions
|
|
@ -56,7 +56,6 @@ In terms of the
|
|||
parameter, this is the
|
||||
.Dq Li auth
|
||||
feature.
|
||||
It also provides a null function for session management.
|
||||
.Ss Self Authentication Module
|
||||
The Self authentication component
|
||||
.Pq Fn pam_sm_authenticate ,
|
||||
|
|
@ -64,11 +63,11 @@ returns success if and only if the target user's user ID is identical
|
|||
with the current real user ID.
|
||||
If the current real user ID is non-zero, authentication will fail,
|
||||
unless the
|
||||
.Cm even_root
|
||||
.Cm allow_root
|
||||
option was specified.
|
||||
.Pp
|
||||
The following options may be passed to the authentication module:
|
||||
.Bl -tag -width ".Cm even_root"
|
||||
.Bl -tag -width ".Cm allow_root"
|
||||
.It Cm debug
|
||||
.Xr syslog 3
|
||||
debugging information at
|
||||
|
|
@ -78,7 +77,7 @@ level.
|
|||
suppress warning messages to the user.
|
||||
These messages include reasons why the user's authentication attempt
|
||||
was declined.
|
||||
.It Cm even_root
|
||||
.It Cm allow_root
|
||||
do not automatically fail if the current real user ID is 0.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
|
|
|
|||
|
|
@ -53,11 +53,11 @@ __FBSDID("$FreeBSD$");
|
|||
#include <security/pam_mod_misc.h>
|
||||
|
||||
enum {
|
||||
PAM_OPT_EVEN_ROOT = PAM_OPT_STD_MAX,
|
||||
PAM_OPT_ALLOW_ROOT = PAM_OPT_STD_MAX,
|
||||
};
|
||||
|
||||
static struct opttab other_options[] = {
|
||||
{ "even_root", PAM_OPT_EVEN_ROOT },
|
||||
{ "allow_root", PAM_OPT_ALLOW_ROOT },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, int argc, const char
|
|||
PAM_RETURN(PAM_AUTH_ERR);
|
||||
|
||||
uid = getuid();
|
||||
if (uid == 0 && !pam_test_option(&options, PAM_OPT_EVEN_ROOT, NULL))
|
||||
if (uid == 0 && !pam_test_option(&options, PAM_OPT_ALLOW_ROOT, NULL))
|
||||
PAM_RETURN(PAM_AUTH_ERR);
|
||||
|
||||
if (uid == (uid_t)pwd->pw_uid)
|
||||
|
|
|
|||
Loading…
Reference in a new issue