}
/* 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);
}
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,
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);
}
}
/* 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);
}
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)) {