Hello,
I'm not able to make suiddir + acl inheritance to work together.
Looking at function ufs_mkdir in sys/ufs/ufs/ufs/vnops.c
I think that in fisrt step mechanism of suiddir sets owner and
group of new directory and later ACL mechanism has not rights to
inherit acl settings from parent directory.
Am I right?
And is it feature or bug?
(FreeBSD 5.3-RELEASE)
Session illustrating problem follows.
su-2.05b$ mount
...
...
/dev/ar0s1e on /samba (ufs, NFS exported, local, suiddir, soft-updates,
acls)
su-2.05b# cd /samba
su-2.05b# mkdir abc
su-2.05b# chown samba:samba abc
su-2.05b# chmod 4700 abc
su-2.05b# setfacl -m u:rumik:rwx abc
su-2.05b# su rumik
su-2.05b$ mkdir abc/dir1
su-2.05b$ touch abc/file1
su-2.05b$ ls -l abc
total 2
drwsr-xr-x 2 samba samba 512 Feb 8 14:34 dir1
-rw-r--r-- 1 samba samba 0 Feb 8 14:34 file1
su-2.05b$ exit
exit
su-2.05b# setfacl -d -m u::rwx,g::---,o::---,u:rumik:rwx abc
su-2.05b# su rumik
su-2.05b$ mkdir dir2
mkdir: dir2: Permission denied
su-2.05b$ touch file2
touch: file2: Permission denied
su-2.05b$ exit
vita