summaryrefslogtreecommitdiffstats
path: root/source3/smbd/sesssetup.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-11-02 01:07:46 +0100
committerVolker Lendecke <vl@samba.org>2008-11-02 09:22:40 +0100
commita31fab81568ed2b4314ea05740423aceb5d7c977 (patch)
tree8b4c061cc881025cdf8ccb5de9cdcad796c2b555 /source3/smbd/sesssetup.c
parent2bd5ac86ffc9f7610b0205092e4cc9cdccb4752f (diff)
downloadsamba-a31fab81568ed2b4314ea05740423aceb5d7c977.tar.gz
samba-a31fab81568ed2b4314ea05740423aceb5d7c977.tar.xz
samba-a31fab81568ed2b4314ea05740423aceb5d7c977.zip
Simplify params of srvstr_pull_buf_talloc()
Now that "req" is available everywhere, use it. Rename srvstr_pull_buf_talloc() to srvstr_pull_req()
Diffstat (limited to 'source3/smbd/sesssetup.c')
-rw-r--r--source3/smbd/sesssetup.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 4123783eda8..6981764e229 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -1175,7 +1175,6 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
user_struct *vuser = NULL;
NTSTATUS status = NT_STATUS_OK;
uint16 smbpid = req->smbpid;
- uint16 smb_flag2 = req->flags2;
DEBUG(3,("Doing spnego session setup\n"));
@@ -1206,16 +1205,16 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
p2 = (char *)req->inbuf + smb_vwv13 + data_blob_len;
- p2 += srvstr_pull_buf_talloc(talloc_tos(), req->inbuf, smb_flag2,
- &tmp, p2, STR_TERMINATE);
+ p2 += srvstr_pull_req_talloc(talloc_tos(), req, &tmp, p2,
+ STR_TERMINATE);
native_os = tmp ? tmp : "";
- p2 += srvstr_pull_buf_talloc(talloc_tos(), req->inbuf, smb_flag2,
- &tmp, p2, STR_TERMINATE);
+ p2 += srvstr_pull_req_talloc(talloc_tos(), req, &tmp, p2,
+ STR_TERMINATE);
native_lanman = tmp ? tmp : "";
- p2 += srvstr_pull_buf_talloc(talloc_tos(), req->inbuf, smb_flag2,
- &tmp, p2,STR_TERMINATE);
+ p2 += srvstr_pull_req_talloc(talloc_tos(), req, &tmp, p2,
+ STR_TERMINATE);
primary_domain = tmp ? tmp : "";
DEBUG(3,("NativeOS=[%s] NativeLanMan=[%s] PrimaryDomain=[%s]\n",
@@ -1472,9 +1471,8 @@ void reply_sesssetup_and_X(struct smb_request *req)
plaintext_password.data[passlen1] = 0;
}
- srvstr_pull_buf_talloc(talloc_tos(), req->inbuf, req->flags2,
- &tmp, req->buf + passlen1,
- STR_TERMINATE);
+ srvstr_pull_req_talloc(talloc_tos(), req, &tmp,
+ req->buf + passlen1, STR_TERMINATE);
user = tmp ? tmp : "";
domain = "";
@@ -1592,23 +1590,19 @@ void reply_sesssetup_and_X(struct smb_request *req)
p += passlen1 + passlen2;
- p += srvstr_pull_buf_talloc(talloc_tos(), req->inbuf,
- req->flags2, &tmp, p,
+ p += srvstr_pull_req_talloc(talloc_tos(), req, &tmp, p,
STR_TERMINATE);
user = tmp ? tmp : "";
- p += srvstr_pull_buf_talloc(talloc_tos(), req->inbuf,
- req->flags2, &tmp, p,
+ p += srvstr_pull_req_talloc(talloc_tos(), req, &tmp, p,
STR_TERMINATE);
domain = tmp ? tmp : "";
- p += srvstr_pull_buf_talloc(talloc_tos(), req->inbuf,
- req->flags2, &tmp, p,
+ p += srvstr_pull_req_talloc(talloc_tos(), req, &tmp, p,
STR_TERMINATE);
native_os = tmp ? tmp : "";
- p += srvstr_pull_buf_talloc(talloc_tos(), req->inbuf,
- req->flags2, &tmp, p,
+ p += srvstr_pull_req_talloc(talloc_tos(), req, &tmp, p,
STR_TERMINATE);
native_lanman = tmp ? tmp : "";
@@ -1621,8 +1615,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
byte_count = SVAL(req->inbuf, smb_vwv13);
if ( PTR_DIFF(p, save_p) < byte_count) {
- p += srvstr_pull_buf_talloc(talloc_tos(), req->inbuf,
- req->flags2, &tmp, p,
+ p += srvstr_pull_req_talloc(talloc_tos(), req, &tmp, p,
STR_TERMINATE);
primary_domain = tmp ? tmp : "";
} else {