setuidgid: accept numeric UID, and new option -g GID,GID1,GID2,...
[coreutils/ericb.git] / tests / umask-check
blobbb0fa388131caf2be26f5bd6d8b29607985753f9
1 # -*- sh -*-
2 # Disable the current test if umask doesn't work as usual.
4 # Copyright (C) 2005 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19 # This test should be run in the temporary directory that ends
20 # up being removed via the trap commands.
22 umask 022
23 touch file1 file2
24 chmod 644 file2
25 perms=`ls -l file1 file2 | sed 's/ .*//' | uniq`
26 rm -f file1 file2
28 case $perms in
30 '*)
31   cat <<EOF >&2
32 $0: Since it looks like you're running this test in a directory with
33 something other than the usual umask semantics, we're skipping this test.
34 EOF
35   (exit 77); exit 77
36 esac