1999-03-28 14:39:34 +00:00
|
|
|
#!/bin/sh
|
2006-08-17 19:58:17 +00:00
|
|
|
# Test "chmod =x" and the like.
|
|
|
|
|
|
2011-01-01 11:37:32 +01:00
|
|
|
# Copyright (C) 1999-2000, 2002, 2004-2011 Free Software Foundation, Inc.
|
2006-08-17 19:58:17 +00:00
|
|
|
|
2007-07-23 14:35:58 +02:00
|
|
|
# This program is free software: you can redistribute it and/or modify
|
2006-08-17 19:58:17 +00:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-07-23 14:35:58 +02:00
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
2006-08-17 19:58:17 +00:00
|
|
|
# (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
|
2007-07-23 14:35:58 +02:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1999-03-28 14:39:34 +00:00
|
|
|
|
2010-11-14 11:05:05 +01:00
|
|
|
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
2010-11-17 21:35:31 +01:00
|
|
|
print_ver_ chmod
|
1999-03-28 14:39:34 +00:00
|
|
|
|
2000-11-23 14:32:09 +00:00
|
|
|
file=f
|
2007-09-06 17:34:49 +02:00
|
|
|
touch $file || framework_failure
|
1999-03-28 14:39:34 +00:00
|
|
|
|
|
|
|
|
umask 005
|
2005-04-28 16:31:32 +00:00
|
|
|
for mode in =x =xX =Xx =x,=X =X,=x; do
|
|
|
|
|
chmod a=r,$mode $file || fail=1
|
|
|
|
|
case "`ls -l $file`" in
|
|
|
|
|
---x--x---*) ;;
|
|
|
|
|
*) fail=1; echo "after \`chmod $mode $file':"; ls -l $file ;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
1999-03-28 14:39:34 +00:00
|
|
|
|
2008-09-07 10:31:27 +02:00
|
|
|
Exit $fail
|