Hello,
pam_wheel authentication module seems to be broken in -current. Look at
this (from src/lib/libpam/modules/pam_wheel):
PAM_EXTERN int
pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc, const char **argv)
{
struct options options;
struct passwd *pwd;
struct group *grp;
int retval;
const char *user;
char *use_group;
pam_std_option(options, other_options, argc, argv);
PAM_LOG(Options processed);
if (pam_test_option(options, PAM_OPT_AUTH_AS_SELF, NULL))
pwd = getpwnam(getlogin());
else {
retval = pam_get_user(pamh, user, NULL);
if (retval != PAM_SUCCESS)
PAM_RETURN(retval);
pwd = getpwnam(user);
}
PAM_LOG(Got user: %s, user);
/* Ignore if already uid 0 */
if (pwd-pw_uid)
PAM_RETURN(PAM_IGNORE);
PAM_LOG(Not superuser);
This piece obviously has at least two errors. First, if PAM_OPT_AUTH_AS_SELF
is true, then value of user is undefined. It should probably log
pwd-pw_name instead. Second, check for root must of course be reversed
and become if (!pwd-pw_uid).
The way it works now, it always returns PAM_IGNORE for all non-root users,
which causes in allowing su for anyone who knows root password.
Or am I missing something again ? 8=)
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message