]> Dogcows Code - chaz/tar/blobdiff - tests/ignfail.sh
(dump_file0): Fix bug introduced 2004-02-21.
[chaz/tar] / tests / ignfail.sh
index 32bb60277db12ab3e5017be7b400f7337a61c001..ec0fb104584982a95017d86bee10577c8d6857fc 100755 (executable)
@@ -1,4 +1,22 @@
 #! /bin/sh
+# This file is part of GNU tar testsuite.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
 # Unreadable directories yielded error despite --ignore-failed-read.
 
 . ./preset
@@ -6,7 +24,10 @@
 
 > check-uid
 set - x`ls -l check-uid`
-if test $3 = root; then
+uid_name="$3"
+set - x`ls -ln check-uid`
+uid_number="$3"
+if test "$uid_name" = root || test "$uid_number" = 0; then
 
   # The test is meaningless for super-user.
   rm check-uid
@@ -47,15 +68,15 @@ else
 
    err="\
 -----
-tar: Cannot add file file: Permission denied
+tar: file: Cannot open: Permission denied
 tar: Error exit delayed from previous errors
 -----
-tar: Cannot add file file: Permission denied
+tar: file: Warning: Cannot open: Permission denied
 -----
-tar: Cannot add directory directory: Permission denied
+tar: directory: Cannot savedir: Permission denied
 tar: Error exit delayed from previous errors
 -----
-tar: Cannot add directory directory: Permission denied
+tar: directory: Warning: Cannot savedir: Permission denied
 "
 
 fi
This page took 0.024975 seconds and 4 git commands to generate.