Date: Mon, 25 Aug 2008 09:41:28 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 148368 for review Message-ID: <200808250941.m7P9fSLl083575@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=148368 Change 148368 by trasz@trasz_traszkan on 2008/08/25 09:40:54 Tests for passing multiple file names to setfacl(1). Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/TODO#45 edit .. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/tools-nfs4.test#7 edit .. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/tools-posix.test#4 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/TODO#45 (text+ko) ==== @@ -2,9 +2,6 @@ - Add support for NFS4 ACLs to tar(1). -- Add unit test to verify correct operation if several file names - are given to getfacl(1) and setfacl(1). - - Clean up #defines. For example, make VREAD_NAMED_ATTRS equal to ACL_READ_NAMED_ATTRS, so there is no need for translation between the two in kern/subr_acl_nfs4.c. ==== //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/tools-nfs4.test#7 (text+ko) ==== @@ -150,8 +150,6 @@ $ rm yyy -# XXX: Test mv. Need more than one filesystem for that. - # Test removing entries by... by example? $ setfacl -x everyone@::deny xxx $ getfacl -n xxx @@ -177,8 +175,67 @@ > everyone@:-wxp---A-W-Co-:------:deny > everyone@:r-----a-R-c--s:------:allow +$ ls -l xxx | cut -d' ' -f1 +> -rw-r--r-- + +# Check setfacl(1) and getfacl(1) with multiple files. +$ touch xxx yyy zzz + +$ ls -l xxx yyy zzz | cut -d' ' -f1 +> -rw-r--r-- +> -rw-r--r-- +> -rw-r--r-- + +$ setfacl -m u:42:x:allow,g:43:w:allow nnn xxx yyy zzz +> setfacl: nnn: acl_get_file() failed: No such file or directory + +$ ls -l nnn xxx yyy zzz | cut -d' ' -f1 +> ls: nnn: No such file or directory +> -rw-r--r--+ +> -rw-r--r--+ +> -rw-r--r--+ + +$ getfacl -nq nnn xxx yyy zzz +> getfacl: nnn: stat() failed: No such file or directory +> user:42:--x-----------:------:allow +> group:43:-w------------:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow +> +> user:42:--x-----------:------:allow +> group:43:-w------------:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow +> +> user:42:--x-----------:------:allow +> group:43:-w------------:------:allow +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ setfacl -b nnn xxx yyy zzz +> setfacl: nnn: acl_get_file() failed: No such file or directory + +$ ls -l nnn xxx yyy zzz | cut -d' ' -f1 +> ls: nnn: No such file or directory +> -rw-r--r-- +> -rw-r--r-- +> -rw-r--r-- + +$ rm xxx yyy zzz + # Test applying mode to an ACL. -$ rm xxx $ touch xxx $ setfacl -a0 user:42:r:allow,user:43:w:deny,user:43:w:allow,user:44:x:allow -x everyone@::allow xxx $ chmod 600 xxx ==== //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/tools-posix.test#4 (text+ko) ==== @@ -83,8 +83,6 @@ $ rm yyy -# XXX: Test mv. Need more than one filesystem for that. - # Test removing entries by... by example? $ setfacl -m u:42:r,g:43:w xxx $ setfacl -x u:42: xxx @@ -124,7 +122,59 @@ $ ls -l xxx | cut -d' ' -f1 > -rw-r--r-- +# Check setfacl(1) and getfacl(1) with multiple files. +$ touch xxx yyy zzz + +$ ls -l xxx yyy zzz | cut -d' ' -f1 +> -rw-r--r-- +> -rw-r--r-- +> -rw-r--r-- + +$ setfacl -m u:42:x,g:43:w nnn xxx yyy zzz +> setfacl: nnn: acl_get_file() failed: No such file or directory + +$ ls -l nnn xxx yyy zzz | cut -d' ' -f1 +> ls: nnn: No such file or directory +> -rw-rwxr--+ +> -rw-rwxr--+ +> -rw-rwxr--+ + +$ getfacl -nq nnn xxx yyy zzz +> getfacl: nnn: stat() failed: No such file or directory +> user::rw- +> user:42:--x +> group::r-- +> group:43:-w- +> mask::rwx +> other::r-- +> +> user::rw- +> user:42:--x +> group::r-- +> group:43:-w- +> mask::rwx +> other::r-- +> +> user::rw- +> user:42:--x +> group::r-- +> group:43:-w- +> mask::rwx +> other::r-- + +$ setfacl -b nnn xxx yyy zzz +> setfacl: nnn: acl_get_file() failed: No such file or directory + +$ ls -l nnn xxx yyy zzz | cut -d' ' -f1 +> ls: nnn: No such file or directory +> -rw-r--r--+ +> -rw-r--r--+ +> -rw-r--r--+ + +$ rm xxx yyy zzz + # Check whether chmod actually does what it should do. +$ touch xxx $ setfacl -m u:42:rwx,g:43:rwx xxx $ chmod 600 xxx $ getfacl -n xxx
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808250941.m7P9fSLl083575>