svn commit: samba r4017 - in trunk/source/smbd: .
jra at samba.org
jra at samba.org
Tue Nov 30 06:41:49 GMT 2004
Author: jra
Date: 2004-11-30 06:41:45 +0000 (Tue, 30 Nov 2004)
New Revision: 4017
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4017
Log:
Fix for bug found by Steve French client code (cifsfs) on
POSIX ACL set. You need to *get* a permset_t pointer from the entry before
any of the permset code will accept it as a valid value
Jeremy.
Modified:
trunk/source/smbd/posix_acls.c
Changeset:
Modified: trunk/source/smbd/posix_acls.c
===================================================================
--- trunk/source/smbd/posix_acls.c 2004-11-30 06:41:38 UTC (rev 4016)
+++ trunk/source/smbd/posix_acls.c 2004-11-30 06:41:45 UTC (rev 4017)
@@ -3489,12 +3489,21 @@
goto fail;
}
+ /* Get the permset pointer from the new ACL entry. */
+ if (SMB_VFS_SYS_ACL_GET_PERMSET(conn, the_entry, &the_permset) == -1) {
+ DEBUG(0,("create_posix_acl_from_wire: Failed to get permset on entry %u. (%s)\n",
+ i, strerror(errno) ));
+ goto fail;
+ }
+
+ /* Map from wire to permissions. */
if (!unix_ex_wire_to_permset(conn, CVAL(pdata,(i*SMB_POSIX_ACL_ENTRY_SIZE)+1), &the_permset)) {
DEBUG(0,("create_posix_acl_from_wire: invalid permset %u on entry %u.\n",
CVAL(pdata,(i*SMB_POSIX_ACL_ENTRY_SIZE) + 1), i ));
goto fail;
}
+ /* Now apply to the new ACL entry. */
if (SMB_VFS_SYS_ACL_SET_PERMSET(conn, the_entry, the_permset) == -1) {
DEBUG(0,("create_posix_acl_from_wire: Failed to add permset on entry %u. (%s)\n",
i, strerror(errno) ));
More information about the samba-cvs
mailing list