summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-12-01 15:05:18 +0100
committerVolker Lendecke <vl@sernet.de>2007-12-05 13:45:11 +0100
commit177bf9a877b8ed20d9abe8ada32b8d82ff9a6149 (patch)
treebe66571f78a57f55f99d6e9b99f2c212f85d3387
parentadb8d1b17911b5c7009e292917ccc209961fdde2 (diff)
downloadsamba-177bf9a877b8ed20d9abe8ada32b8d82ff9a6149.tar.gz
samba-177bf9a877b8ed20d9abe8ada32b8d82ff9a6149.tar.bz2
samba-177bf9a877b8ed20d9abe8ada32b8d82ff9a6149.zip
Move pulling the ea list out of the way
(This used to be commit 753e640f49125c319d7b8f2db262e273a1727691)
-rw-r--r--source3/smbd/nttrans.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index aed237fc65..c19ba6519f 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1269,7 +1269,6 @@ static void call_nt_transact_create(connection_struct *conn,
struct timespec a_timespec;
struct timespec m_timespec;
struct ea_list *ea_list = NULL;
- char *pdata = NULL;
NTSTATUS status;
size_t param_len;
struct case_semantics_state *case_state = NULL;
@@ -1344,6 +1343,14 @@ static void call_nt_transact_create(connection_struct *conn,
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
return;
}
+
+ /* We have already checked that ea_len <= data_count here. */
+ ea_list = read_nttrans_ea_list(talloc_tos(), data + sd_len,
+ ea_len);
+ if (ea_list == NULL) {
+ reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ return;
+ }
}
srvstr_get_path(ctx, params, req->flags2, &fname,
@@ -1539,19 +1546,6 @@ static void call_nt_transact_create(connection_struct *conn,
}
#endif
- if (ea_len) {
- pdata = data + sd_len;
-
- /* We have already checked that ea_len <= data_count here. */
- ea_list = read_nttrans_ea_list(talloc_tos(), pdata,
- ea_len);
- if (!ea_list ) {
- TALLOC_FREE(case_state);
- reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return;
- }
- }
-
/*
* If it's a request for a directory open, deal with it separately.
*/