summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_pipe.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-09-16 06:35:35 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-09-16 06:35:35 +0000
commitdec3cbcaf097a3d6fab9359e001279447a5f4def (patch)
tree6bfdbdcf71359c9126cc9c2d934e90a3d35106d9 /source3/rpc_server/srv_pipe.c
parent9bae3609ac791b7cccdddc2cba4431d78eff60ef (diff)
downloadsamba-dec3cbcaf097a3d6fab9359e001279447a5f4def.tar.gz
samba-dec3cbcaf097a3d6fab9359e001279447a5f4def.tar.bz2
samba-dec3cbcaf097a3d6fab9359e001279447a5f4def.zip
Fix up workstaion and kickoff time checks, moved to auth_smbpasswd.c where
they can have general effect. Fixed up workstaion support in the rest of samba, so that we can do these checks. Pass through the workstation for cli_net_logon(), if supplied. (This used to be commit 7f04a139b2ee34b4c282590509cdf21395815a7a)
Diffstat (limited to 'source3/rpc_server/srv_pipe.c')
-rw-r--r--source3/rpc_server/srv_pipe.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 4a09410e81..8629592c4c 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -302,6 +302,7 @@ static BOOL api_pipe_ntlmssp_verify(pipes_struct *p, RPC_AUTH_NTLMSSP_RESP *ntlm
rpcstr_pull(domain, ntlmssp_resp->domain, sizeof(fstring), ntlmssp_resp->hdr_domain.str_str_len*2, 0);
rpcstr_pull(wks, ntlmssp_resp->wks, sizeof(fstring), ntlmssp_resp->hdr_wks.str_str_len*2, 0);
} else {
+ /* What charset are these meant to be in? */
fstrcpy(user_name, ntlmssp_resp->user);
fstrcpy(domain, ntlmssp_resp->domain);
fstrcpy(wks, ntlmssp_resp->wks);
@@ -328,24 +329,24 @@ static BOOL api_pipe_ntlmssp_verify(pipes_struct *p, RPC_AUTH_NTLMSSP_RESP *ntlm
if((strlen(user_name) == 0) &&
(ntlmssp_resp->hdr_nt_resp.str_str_len==0))
- {
+ {
guest_user = True;
-
- fstrcpy(pipe_user_name, lp_guestaccount(-1));
+
+ fstrcpy(pipe_user_name, lp_guestaccount(-1));
DEBUG(100,("Null user in NTLMSSP verification. Using guest = %s\n", pipe_user_name));
smb_passwd_ptr = null_smb_passwd;
-
+
} else {
/*
* Pass the user through the NT -> unix user mapping
* function.
*/
-
+
fstrcpy(pipe_user_name, user_name);
(void)map_username(pipe_user_name);
-
+
/*
* Do the length checking only if user is not NULL.
*/
@@ -368,7 +369,8 @@ static BOOL api_pipe_ntlmssp_verify(pipes_struct *p, RPC_AUTH_NTLMSSP_RESP *ntlm
become_root();
p->ntlmssp_auth_validated =
- NT_STATUS_IS_OK(pass_check_smb_with_chal(pipe_user_name, NULL, domain,
+ NT_STATUS_IS_OK(pass_check_smb_with_chal(pipe_user_name, NULL,
+ domain, wks,
(uchar*)p->challenge,
lm_owf, lm_pw_len,
nt_owf, nt_pw_len));
@@ -391,13 +393,6 @@ failed authentication on named pipe %s.\n", domain, pipe_user_name, wks, p->name
unbecome_root();
- /* Quit if the account was disabled. */
- if((pdb_get_acct_ctrl(sampass) & ACB_DISABLED) || !pdb_get_lanman_passwd(sampass)) {
- DEBUG(1,("Account for user '%s' was disabled.\n", pipe_user_name));
- pdb_free_sam(sampass);
- return False;
- }
-
if(!pdb_get_nt_passwd(sampass)) {
DEBUG(1,("Account for user '%s' has no NT password hash.\n", pipe_user_name));
pdb_free_sam(sampass);