From owner-svn-src-all@FreeBSD.ORG Mon Apr 13 13:51:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77BAB106566B; Mon, 13 Apr 2009 13:51:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B8428FC13; Mon, 13 Apr 2009 13:51:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3DDprN4073485; Mon, 13 Apr 2009 13:51:53 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3DDprAS073484; Mon, 13 Apr 2009 13:51:53 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200904131351.n3DDprAS073484@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 13 Apr 2009 13:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191000 - head/tools/regression/acltools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 13:51:54 -0000 Author: trasz Date: Mon Apr 13 13:51:53 2009 New Revision: 191000 URL: http://svn.freebsd.org/changeset/base/191000 Log: Add a few more regression tests for POSIX.1e ACLs. Modified: head/tools/regression/acltools/tools-posix.test Modified: head/tools/regression/acltools/tools-posix.test ============================================================================== --- head/tools/regression/acltools/tools-posix.test Mon Apr 13 13:41:44 2009 (r190999) +++ head/tools/regression/acltools/tools-posix.test Mon Apr 13 13:51:53 2009 (r191000) @@ -42,6 +42,51 @@ $ getfacl xxx $ ls -l xxx | cut -d' ' -f1 > -rw-rw-r--+ +# Same as above, but for symlinks. +$ ln -s xxx lll +$ getfacl -h lll +> # file: lll +> # owner: root +> # group: wheel +> user::rwx +> group::r-x +> other::r-x + +$ getfacl -qh lll +> user::rwx +> group::r-x +> other::r-x + +$ getfacl -q lll +> user::rw- +> user:42:r-- +> group::r-- +> group:43:-w- +> mask::rw- +> other::r-- + +$ setfacl -hm u:44:x,g:45:w lll +$ getfacl -h lll +> # file: lll +> # owner: root +> # group: wheel +> user::rwx +> user:44:--x +> group::r-x +> group:45:-w- +> mask::rwx +> other::r-x + +# XXX: Why doesn't ls(1) print '+' for symbolic links with ACL set? +$ ls -l lll | cut -d' ' -f1 +> lrwxrwxr-x + +# Check whether the original file is left untouched. +$ ls -l xxx | cut -d' ' -f1 +> -rw-rw-r--+ + +$ rm lll + # Test removing entries. $ setfacl -x user:42: xxx $ getfacl xxx @@ -173,6 +218,15 @@ $ ls -l nnn xxx yyy zzz | cut -d' ' -f1 > -rw-r--r--+ > -rw-r--r--+ +$ setfacl -bn nnn xxx yyy zzz +> setfacl: stat() of nnn 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. @@ -210,14 +264,21 @@ $ getfacl -q ddd > group::r-x > other::r-x +$ ls -l | grep ddd | cut -d' ' -f1 +> drwxr-xr-x + $ getfacl -dq ddd -$ setfacl -d -m u::rwx,g::rx,o::rx,mask::rwx ddd +$ setfacl -dm u::rwx,g::rx,o::rx,mask::rwx ddd $ getfacl -dq ddd > user::rwx > group::r-x > mask::rwx > other::r-x +# No change - ls(1) output doesn't take into account default ACLs. +$ ls -l | grep ddd | cut -d' ' -f1 +> drwxr-xr-x + $ setfacl -dm g:42:rwx,u:42:r ddd $ setfacl -dm g::w ddd $ getfacl -dq ddd @@ -236,8 +297,59 @@ $ getfacl -dq ddd > mask::rw- > other::r-x -> # XXX: Test inheritance. +$ ls -l | grep ddd | cut -d' ' -f1 +> drwxr-xr-x $ rmdir ddd $ rm xxx +# Test inheritance. +$ mkdir ddd + +$ touch ddd/xxx +$ getfacl -q ddd/xxx +> user::rw- +> group::r-- +> other::r-- + +$ mkdir ddd/ddd +$ getfacl -q ddd/ddd +> user::rwx +> group::r-x +> other::r-x + +$ rmdir ddd/ddd +$ rm ddd/xxx + +$ setfacl -dm u::rwx,g::rx,o::rx,mask::rwx ddd +$ setfacl -dm g:42:rwx,u:43:r ddd +$ getfacl -dq ddd +> user::rwx +> user:43:r-- +> group::r-x +> group:42:rwx +> mask::rwx +> other::r-x + +$ touch ddd/xxx +$ getfacl -q ddd/xxx +> user::rw- +> user:43:r-- +> group::r-x # effective: r-- +> group:42:rwx # effective: r-- +> mask::r-- +> other::r-- + +$ mkdir ddd/ddd +$ getfacl -q ddd/ddd +> user::rwx +> user:43:r-- +> group::r-x +> group:42:rwx # effective: r-x +> mask::r-x +> other::r-x + +$ rmdir ddd/ddd +$ rm ddd/xxx +$ rmdir ddd +