The Samba-Bugzilla – Attachment 5495 Details for
Bug 7188
Logic error in check of total_data for call_trans2mkdir()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 3.5.x.
look (text/plain), 2.01 KB, created by
Jeremy Allison
on 2010-03-12 18:32:31 UTC
(
hide
)
Description:
Patch for 3.5.x.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2010-03-12 18:32:31 UTC
Size:
2.01 KB
patch
obsolete
>diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index 1870cbc..09b1621 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -1062,12 +1062,7 @@ static void call_trans2open(connection_struct *conn, > } > > /* Any data in this call is an EA list. */ >- if (total_data && (total_data != 4) && !lp_ea_support(SNUM(conn))) { >- reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED); >- goto out; >- } >- >- if (total_data != 4) { >+ if (total_data && (total_data != 4)) { > if (total_data < 10) { > reply_nterror(req, NT_STATUS_INVALID_PARAMETER); > goto out; >@@ -1086,9 +1081,11 @@ static void call_trans2open(connection_struct *conn, > reply_nterror(req, NT_STATUS_INVALID_PARAMETER); > goto out; > } >- } else if (IVAL(pdata,0) != 4) { >- reply_nterror(req, NT_STATUS_INVALID_PARAMETER); >- goto out; >+ >+ if (!lp_ea_support(SNUM(conn))) { >+ reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED); >+ goto out; >+ } > } > > status = SMB_VFS_CREATE_FILE( >@@ -7916,19 +7913,14 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req, > return; > } > >- /* Any data in this call is an EA list. */ >- if (total_data && (total_data != 4) && !lp_ea_support(SNUM(conn))) { >- reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED); >- goto out; >- } >- > /* > * OS/2 workplace shell seems to send SET_EA requests of "null" > * length (4 bytes containing IVAL 4). > * They seem to have no effect. Bug #3212. JRA. > */ > >- if (total_data != 4) { >+ if (total_data && (total_data != 4)) { >+ /* Any data in this call is an EA list. */ > if (total_data < 10) { > reply_nterror(req, NT_STATUS_INVALID_PARAMETER); > goto out; >@@ -7947,6 +7939,11 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req, > reply_nterror(req, NT_STATUS_INVALID_PARAMETER); > goto out; > } >+ >+ if (!lp_ea_support(SNUM(conn))) { >+ reply_nterror(req, NT_STATUS_EAS_NOT_SUPPORTED); >+ goto out; >+ } > } > /* If total_data == 4 Windows doesn't care what values > * are placed in that field, it just ignores them.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 7188
: 5495