• Steve French's avatar
    setfacl removes part of ACL when setting POSIX ACLs to Samba · afaf7f61
    Steve French authored
    commit b1d93356 upstream.
    
    setfacl over cifs mounts can remove the default ACL when setting the
    (non-default part of) the ACL and vice versa (we were leaving at 0
    rather than setting to -1 the count field for the unaffected
    half of the ACL.  For example notice the setfacl removed
    the default ACL in this sequence:
    
    steven@steven-GA-970A-DS3:~/cifs-2.6$ getfacl /mnt/test-dir ; setfacl
    -m default:user:test:rwx,user:test:rwx /mnt/test-dir
    getfacl: Removing leading '/' from absolute path names
    user::rwx
    group::r-x
    other::r-x
    default:user::rwx
    default:user:test:rwx
    default:group::r-x
    default:mask::rwx
    default:other::r-x
    
    steven@steven-GA-970A-DS3:~/cifs-2.6$ getfacl /mnt/test-dir
    getfacl: Removing leading '/' from absolute path names
    user::rwx
    user:test:rwx
    group::r-x
    mask::rwx
    other::r-x
    Signed-off-by: default avatarSteve French <smfrench@gmail.com>
    Acked-by: default avatarJeremy Allison <jra@samba.org>
    [bwh: Backported to 3.2: adjust context]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    Cc: Rui Xiang <rui.xiang@huawei.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    afaf7f61
cifssmb.c 192 KB