summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_netlog.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-06-29 22:50:49 +0000
committerJeremy Allison <jra@samba.org>1998-06-29 22:50:49 +0000
commit06e42fa8659483495055eb3aab1982ebf3d0efa3 (patch)
tree5afeb9cb14c43cbaa418f0bc2291fce42ea1a4c5 /source3/rpc_server/srv_netlog.c
parentfdb124c1cd0e91fa2a5f1c993a1df12fb866cca9 (diff)
downloadsamba-06e42fa8659483495055eb3aab1982ebf3d0efa3.tar.gz
samba-06e42fa8659483495055eb3aab1982ebf3d0efa3.tar.bz2
samba-06e42fa8659483495055eb3aab1982ebf3d0efa3.zip
nmbd_elections.c: Removed force elections code to bring into line with 1.9.18.
nmbd_namelistdb.c: Added comment for Chris. nmbd_subnetdb.c: Went back to Chris's comparison code as with the make_nmb_name change it all works now. lib/rpc/server/srv_netlog.c: Ensure we return 'account disabled' for disabled accounts, rather than crashing. Jeremy. (This used to be commit 4ab3d1682789319965a55edb37212b7671a743bb)
Diffstat (limited to 'source3/rpc_server/srv_netlog.c')
-rw-r--r--source3/rpc_server/srv_netlog.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c
index 8bcf1682bc..cb22cfddf0 100644
--- a/source3/rpc_server/srv_netlog.c
+++ b/source3/rpc_server/srv_netlog.c
@@ -252,7 +252,8 @@ static BOOL get_md4pw(char *md4pw, char *mach_name, char *mach_acct)
smb_pass = getsmbpwnam(mach_acct);
unbecome_root(True);
- if (smb_pass != NULL)
+ if ((smb_pass) != NULL && !(smb_pass->acct_ctrl & ACB_DISABLED) &&
+ (smb_pass->smb_nt_passwd != NULL))
{
memcpy(md4pw, smb_pass->smb_nt_passwd, 16);
dump_data(5, md4pw, 16);
@@ -656,9 +657,9 @@ static void api_net_sam_logon( int uid,
unbecome_root(True);
if (smb_pass == NULL)
- {
status = 0xC0000000 | NT_STATUS_NO_SUCH_USER;
- }
+ else if (smb_pass->acct_ctrl & ACB_DISABLED)
+ status = 0xC0000000 | NT_STATUS_ACCOUNT_DISABLED;
}
/* validate password. */