From 4eb7ef6b612a98e1d71a2a0dfde7d695223a4360 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 23 Sep 2001 05:16:03 +0000 Subject: Fix up NT_STATUS return for session setups, Win2k objects to anything other than NT_STATUS_LOGON_FAILURE. This also brings us (almost) back in line with their implementation. Kill off SMBENCRYPT() macro Kill off 'nt smb support' paramater - tridge okayed this one. Andrew Bartlett (This used to be commit 67947bf6e31ee9758f8a2186f83031ba21b716f2) --- source3/param/loadparm.c | 3 --- source3/smbd/negprot.c | 10 ++++------ source3/smbd/reply.c | 6 +++--- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index e8831f652a..1ead342ebe 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -775,7 +775,6 @@ static struct parm_struct parm_table[] = { {"read raw", P_BOOL, P_GLOBAL, &Globals.bReadRaw, NULL, NULL, 0}, {"write raw", P_BOOL, P_GLOBAL, &Globals.bWriteRaw, NULL, NULL, 0}, - {"nt smb support", P_BOOL, P_GLOBAL, &Globals.bNTSmbSupport, NULL, NULL, 0}, {"nt pipe support", P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0}, {"nt acl support", P_BOOL, P_GLOBAL, &Globals.bNTAclSupport, NULL, NULL, 0}, {"announce version", P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL, NULL, 0}, @@ -1273,7 +1272,6 @@ static void init_globals(void) Globals.bPamPasswordChange = False; Globals.bPasswdChatDebug = False; Globals.bUnicode = True; /* Do unicode on the wire by default */ - Globals.bNTSmbSupport = True; /* Do NT SMB's by default. */ Globals.bNTPipeSupport = True; /* Do NT pipes by default. */ Globals.bNTAclSupport = True; /* Use NT ACLs by default. */ Globals.bStatCache = True; /* use stat cache by default */ @@ -1557,7 +1555,6 @@ FN_GLOBAL_BOOL(lp_bind_interfaces_only, &Globals.bBindInterfacesOnly) FN_GLOBAL_BOOL(lp_pam_password_change, &Globals.bPamPasswordChange) FN_GLOBAL_BOOL(lp_unix_password_sync, &Globals.bUnixPasswdSync) FN_GLOBAL_BOOL(lp_passwd_chat_debug, &Globals.bPasswdChatDebug) -FN_GLOBAL_BOOL(lp_nt_smb_support, &Globals.bNTSmbSupport) FN_GLOBAL_BOOL(lp_unicode, &Globals.bUnicode) FN_GLOBAL_BOOL(lp_nt_pipe_support, &Globals.bNTPipeSupport) FN_GLOBAL_BOOL(lp_nt_acl_support, &Globals.bNTAclSupport) diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 9ebb0b7350..b065cab53e 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -66,7 +66,7 @@ static int reply_lanman1(char *outbuf) { int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0); int secword=0; - BOOL doencrypt = SMBENCRYPT(); + BOOL doencrypt = lp_encrypted_passwords(); time_t t = time(NULL); if (lp_security()>=SEC_USER) secword |= 1; @@ -103,7 +103,7 @@ static int reply_lanman2(char *outbuf) { int raw = (lp_readraw()?1:0) | (lp_writeraw()?2:0); int secword=0; - BOOL doencrypt = SMBENCRYPT(); + BOOL doencrypt = lp_encrypted_passwords(); time_t t = time(NULL); struct cli_state *cli = NULL; char cryptkey[8]; @@ -162,7 +162,7 @@ static int reply_nt1(char *outbuf) CAP_LEVEL_II_OPLOCKS|CAP_STATUS32; int secword=0; - BOOL doencrypt = SMBENCRYPT(); + BOOL doencrypt = lp_encrypted_passwords(); time_t t = time(NULL); struct cli_state *cli = NULL; char cryptkey[8]; @@ -193,9 +193,7 @@ static int reply_nt1(char *outbuf) } } - if (lp_nt_smb_support()) { - capabilities |= CAP_NT_SMBS|CAP_RPC_REMOTE_APIS; - } + capabilities |= CAP_NT_SMBS|CAP_RPC_REMOTE_APIS; if (lp_large_readwrite() && (SMB_OFF_T_BITS == 64)) { capabilities |= CAP_LARGE_READX|CAP_LARGE_WRITEX|CAP_W2K_SMBS; diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index e3c7c9b856..64662a54e2 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -496,7 +496,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int fstring native_lanman; BOOL guest=False; static BOOL done_sesssetup = False; - BOOL doencrypt = SMBENCRYPT(); + BOOL doencrypt = lp_encrypted_passwords(); START_PROFILE(SMBsesssetupX); *smb_apasswd = 0; @@ -745,8 +745,8 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int guest = True; } else { - return ERROR_NT(nt_status); - } + return ERROR_NT(NT_STATUS_LOGON_FAILURE); + } } if (!strequal(user,lp_guestaccount(-1)) && -- cgit