summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-09-06 13:37:11 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-09-06 13:37:11 +0000
commit789d51b42ceb2d99658c72bf55904083d451fcab (patch)
treec965fd3d8f658760a9573f095bd5c213e61a9304 /source3/smbd
parent94d6c0e8952ce220d2ca3ef4f97e10517595fcbf (diff)
downloadsamba-789d51b42ceb2d99658c72bf55904083d451fcab.tar.gz
samba-789d51b42ceb2d99658c72bf55904083d451fcab.tar.bz2
samba-789d51b42ceb2d99658c72bf55904083d451fcab.zip
This is the 'easy' parts of the trusted domains patch n+3 patch from
Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl> It includes a conversion of make_user_info*() to NTSTATUS and some minor changes to other files. It also picks up on a nasty segfault that can occour in some security=domain cases. Andrew Bartlett (This used to be commit d1e1fc3e4bf72717b3593685f0ea5750d676952a)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/sesssetup.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index c37c655fd1..3dc9fe9208 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -439,14 +439,14 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf,
auth_flags |= AUTH_FLAG_NTLM_RESP;
} else if (nthash.length > 24) {
auth_flags |= AUTH_FLAG_NTLMv2_RESP;
- }
+ };
+
+ nt_status = make_user_info_map(&user_info, user, workgroup, machine,
+ lmhash, nthash, plaintext_password,
+ auth_flags, True);
- if (!make_user_info_map(&user_info,
- user, workgroup,
- machine,
- lmhash, nthash,
- plaintext_password,
- auth_flags, True)) {
+ /* it looks a bit weird, but this function returns int type... */
+ if (!NT_STATUS_IS_OK(nt_status)) {
return ERROR_NT(NT_STATUS_NO_MEMORY);
}
@@ -621,7 +621,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
NTSTATUS nt_status;
BOOL doencrypt = global_encrypted_passwords_negotiated;
-
+
START_PROFILE(SMBsesssetupX);
ZERO_STRUCT(lm_resp);
@@ -776,11 +776,9 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
nt_status = check_guest_password(&server_info);
} else if (doencrypt) {
- if (!make_user_info_for_reply_enc(&user_info,
- user, domain,
- lm_resp, nt_resp)) {
- nt_status = NT_STATUS_NO_MEMORY;
- } else {
+ nt_status = make_user_info_for_reply_enc(&user_info, user, domain,
+ lm_resp, nt_resp);
+ if (NT_STATUS_IS_OK(nt_status)) {
nt_status = negprot_global_auth_context->check_ntlm_password(negprot_global_auth_context,
user_info,
&server_info);