diff options
author | Simo Sorce <idra@samba.org> | 2006-12-01 15:06:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:17 -0500 |
commit | cb0402c2d3941a813e33b2b5e07c54b9ff644ca4 (patch) | |
tree | 799a448568dc233247089b8068bd119d9c3f65b7 /source3/auth/auth_server.c | |
parent | ef8d6bf5f700dcfeec7919203da9c357c4f21e3f (diff) | |
download | samba-cb0402c2d3941a813e33b2b5e07c54b9ff644ca4.tar.gz samba-cb0402c2d3941a813e33b2b5e07c54b9ff644ca4.tar.bz2 samba-cb0402c2d3941a813e33b2b5e07c54b9ff644ca4.zip |
r19980: Implement pam account stack checks when obey pam restrictions is true.
It was missing for security=server/domain/ads
Simo.
(This used to be commit 550f651499c22c3c11594a0a39061a8a9b438d82)
Diffstat (limited to 'source3/auth/auth_server.c')
-rw-r--r-- | source3/auth/auth_server.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index 7ffea1ca11..8a8ecfa575 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -383,7 +383,15 @@ use this machine as the password server.\n")); if ( (pass = smb_getpwnam( NULL, user_info->internal_username, real_username, True )) != NULL ) { - nt_status = make_server_info_pw(server_info, pass->pw_name, pass); + /* if a real user check pam account restrictions */ + /* only really perfomed if "obey pam restriction" is true */ + nt_status = smb_pam_accountcheck(pass->pw_name); + if ( !NT_STATUS_IS_OK(nt_status)) { + DEBUG(1, ("PAM account restriction prevents user login\n")); + } else { + + nt_status = make_server_info_pw(server_info, pass->pw_name, pass); + } TALLOC_FREE(pass); } else |