svn commit: samba r11389 - in branches/SAMBA_3_0/source/smbd: .
jra at samba.org
jra at samba.org
Sat Oct 29 00:27:17 GMT 2005
Author: jra
Date: 2005-10-29 00:27:16 +0000 (Sat, 29 Oct 2005)
New Revision: 11389
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11389
Log:
Attempt to fix bug #3212 - ignore bogus OS/2 EA set values on
trans2_mkdir/trans2_open/trans2_setfilepathingo.
Jeremy.
Modified:
branches/SAMBA_3_0/source/smbd/trans2.c
Changeset:
Modified: branches/SAMBA_3_0/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/trans2.c 2005-10-28 23:28:37 UTC (rev 11388)
+++ branches/SAMBA_3_0/source/smbd/trans2.c 2005-10-29 00:27:16 UTC (rev 11389)
@@ -804,11 +804,11 @@
}
/* Any data in this call is an EA list. */
- if (total_data && !lp_ea_support(SNUM(conn))) {
+ if (total_data && (total_data != 4) && !lp_ea_support(SNUM(conn))) {
return ERROR_NT(NT_STATUS_EAS_NOT_SUPPORTED);
}
- if (total_data) {
+ if (total_data != 4) {
if (total_data < 10) {
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
@@ -828,6 +828,8 @@
talloc_destroy(ctx);
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
+ } else if (IVAL(pdata,0) != 4) {
+ return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
fsp = open_file_ntcreate(conn,fname,&sbuf,
@@ -3736,6 +3738,17 @@
TALLOC_CTX *ctx = NULL;
if (total_data < 10) {
+
+ /* OS/2 workplace shell seems to send SET_EA requests of "null"
+ length. They seem to have no effect. Bug #3212. JRA */
+
+ if ((total_data == 4) && (IVAL(pdata,0) == 4)) {
+ /* We're done. We only get EA info in this call. */
+ SSVAL(params,0,0);
+ send_trans2_replies(outbuf, bufsize, params, 2, *ppdata, 0);
+ return(-1);
+ }
+
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
@@ -4489,11 +4502,17 @@
}
/* Any data in this call is an EA list. */
- if (total_data && !lp_ea_support(SNUM(conn))) {
+ if (total_data && (total_data != 4) && !lp_ea_support(SNUM(conn))) {
return ERROR_NT(NT_STATUS_EAS_NOT_SUPPORTED);
}
- if (total_data) {
+ /*
+ * 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 < 10) {
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
@@ -4513,6 +4532,8 @@
talloc_destroy(ctx);
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
+ } else if (IVAL(pdata,0) != 4) {
+ return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
if (check_name(directory,conn)) {
More information about the samba-cvs
mailing list