summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-07-09 15:54:39 -0700
committerAndrew Bartlett <abartlet@samba.org>2013-07-19 17:52:44 +1000
commit4a4360070589a314667166f86c395878659123e1 (patch)
tree9cc43d84e952abc4719de2d873fcb2c28c1fa025 /source3
parent66fb5eeb968e12049381337d7c01401815537a34 (diff)
downloadsamba-4a4360070589a314667166f86c395878659123e1.tar.gz
samba-4a4360070589a314667166f86c395878659123e1.tar.bz2
samba-4a4360070589a314667166f86c395878659123e1.zip
Ensure we can't create a file using NTTRANS with an invalid EA list.
Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 516b826796..1c3e3b8a45 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1142,6 +1142,26 @@ static void call_nt_transact_create(connection_struct *conn,
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
goto out;
}
+
+ if (ea_list_has_invalid_name(ea_list)) {
+ /* Realloc the size of parameters and data we will return */
+ if (flags & EXTENDED_RESPONSE_REQUIRED) {
+ /* Extended response is 32 more byyes. */
+ param_len = 101;
+ } else {
+ param_len = 69;
+ }
+ params = nttrans_realloc(ppparams, param_len);
+ if(params == NULL) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ goto out;
+ }
+
+ memset(params, '\0', param_len);
+ send_nt_replies(conn, req, STATUS_INVALID_EA_NAME,
+ params, param_len, NULL, 0);
+ goto out;
+ }
}
srvstr_get_path(ctx, params, req->flags2, &fname,