diff options
author | Jeremy Allison <jra@samba.org> | 2013-07-09 15:59:53 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-07-19 17:52:43 +1000 |
commit | 66fb5eeb968e12049381337d7c01401815537a34 (patch) | |
tree | d13eff4971da50061bc629e01f3c10b6345a7def | |
parent | fe542fc170053a370092fcf442075dc44189f23e (diff) | |
download | samba-66fb5eeb968e12049381337d7c01401815537a34.tar.gz |
Ensure we can't create a file using TRANS2_OPEN 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>
-rw-r--r-- | source3/smbd/trans2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 7f0aaf982b2..916686c535f 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1253,6 +1253,20 @@ static void call_trans2open(connection_struct *conn, reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED); goto out; } + + if (ea_list_has_invalid_name(ea_list)) { + int param_len = 30; + *pparams = (char *)SMB_REALLOC(*pparams, param_len); + if(*pparams == NULL ) { + reply_nterror(req, NT_STATUS_NO_MEMORY); + goto out; + } + params = *pparams; + memset(params, '\0', param_len); + send_trans2_replies(conn, req, STATUS_INVALID_EA_NAME, + params, param_len, NULL, 0, max_data_bytes); + goto out; + } } status = SMB_VFS_CREATE_FILE( |