diff options
author | Jeremy Allison <jra@samba.org> | 2004-11-30 06:41:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:27 -0500 |
commit | 01533404b11661d1cfa74b73d6bc4def1ba0bb8d (patch) | |
tree | 52382b2f811b076db994c390b7ceccac07fb85aa /source3/smbd | |
parent | 93435b50961018c1710f4ce1acb715dc2b1a6dcb (diff) | |
download | samba-01533404b11661d1cfa74b73d6bc4def1ba0bb8d.tar.gz samba-01533404b11661d1cfa74b73d6bc4def1ba0bb8d.tar.bz2 samba-01533404b11661d1cfa74b73d6bc4def1ba0bb8d.zip |
r4016: 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.
(This used to be commit 7e78059948612fa9f5d179a1e3f5f59e7ad5e456)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/posix_acls.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index ab46bae346..d30cf62e7c 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -3489,12 +3489,21 @@ static SMB_ACL_T create_posix_acl_from_wire(connection_struct *conn, uint16 num_ 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) )); |