summaryrefslogtreecommitdiff
path: root/source3/auth/auth_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/auth/auth_server.c')
-rw-r--r--source3/auth/auth_server.c10
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