allowing smbcacls to modify the acl when it's not allowed to
modify the owner
Martin Dorey
mdorey at bluearc.com
Wed Jun 4 00:57:18 GMT 2003
Combined patch attached (ie sent in a form that might not get mangled by
mail).
--
*********************************************************************
This e-mail and any attachment is confidential. It may only be read, copied and used by the intended recipient(s). If you are not the intended recipient(s), you may not copy, use, distribute, forward, store or disclose this e-mail or any attachment. If you are not the intended recipient(s) or have otherwise received this e-mail in error, you should destroy it and any attachment and notify the sender by reply e-mail or send a message to sysadmin at bluearc.com
*********************************************************************
-------------- next part --------------
Index: source/libsmb/clitrans.c
===================================================================
RCS file: /cvsroot/samba/source/libsmb/clitrans.c,v
retrieving revision 1.20
diff -u -r1.20 clitrans.c
--- source/libsmb/clitrans.c 15 Mar 2003 06:43:37 -0000 1.20
+++ source/libsmb/clitrans.c 4 Jun 2003 00:56:13 -0000
@@ -433,10 +433,8 @@
* to a trans call. This is not an error and should not
* be treated as such.
*/
- if (cli_is_dos_error(cli)) {
- cli_dos_error(cli, &eclass, &ecode);
- if (cli->nt_pipe_fnum == 0 || !(eclass == ERRDOS && ecode == ERRmoredata))
- return(False);
+ if (NT_STATUS_IS_ERR(cli_nt_error(cli))) {
+ return(False);
}
/* parse out the lengths */
@@ -543,11 +541,8 @@
CVAL(cli->inbuf,smb_com)));
return(False);
}
- if (cli_is_dos_error(cli)) {
- cli_dos_error(cli, &eclass, &ecode);
- if(cli->nt_pipe_fnum == 0 ||
- !(eclass == ERRDOS && ecode == ERRmoredata))
- return(False);
+ if (NT_STATUS_IS_ERR(cli_nt_error(cli))) {
+ return(False);
}
/* parse out the total lengths again - they can shrink! */
if (SVAL(cli->inbuf,smb_ntr_TotalDataCount) < total_data)
Index: source/utils/smbcacls.c
===================================================================
RCS file: /cvsroot/samba/source/utils/smbcacls.c,v
retrieving revision 1.89
diff -u -r1.89 smbcacls.c
--- source/utils/smbcacls.c 10 May 2003 11:47:29 -0000 1.89
+++ source/utils/smbcacls.c 4 Jun 2003 00:56:13 -0000
@@ -680,7 +680,7 @@
sort_acl(old->dacl);
/* Create new security descriptor and set it */
- sd = make_sec_desc(ctx,old->revision, old->owner_sid, old->grp_sid,
+ sd = make_sec_desc(ctx,old->revision, NULL, NULL,
NULL, old->dacl, &sd_size);
fnum = cli_nt_create(cli, filename, CREATE_ACCESS_WRITE);
More information about the samba-technical
mailing list