]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Ignore ACL designation.
authorJim Meyering <jim@meyering.net>
Sun, 30 Jan 2005 14:29:03 +0000 (14:29 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 30 Jan 2005 14:29:03 +0000 (14:29 +0000)
tests/rwx-to-mode

index 740e77a0e5590b9d0223cfd6de4b0bdff2b93c5c..e58b73d40d6c743b51a2927af845c0f40f1c3469 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Convert an ls-style permission string, like drwxr----x and -rw-r-x-wx
 # to the equivalent chmod --mode (-m) argument, (=,u=rwx,g=r,o=x and
-# =,u=rw,g=rx,o=wx).
+# =,u=rw,g=rx,o=wx).  Ignore ACLs.
 
 case $# in
   1) rwx=$1;;
@@ -12,6 +12,7 @@ esac
 
 case $rwx in
   [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]) ;;
+  [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]+) ;;
   *) echo "$0: invalid mode string: $rwx" 1>&2; exit 1;;
 esac