]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
buildsystem: use 'chmod a-w' instead of 'chmod -w'
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Fri, 23 Jan 2015 17:05:17 +0000 (12:05 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 23 Jan 2015 17:05:19 +0000 (12:05 -0500)
commit1ceb8093dc595bb395b0a5d8abab779b3912095f
tree8c306894b997087f7848ec3d3c52fc90500dae6b
parent36769c606c270094df0431cbcab9932905adcedc
buildsystem: use 'chmod a-w' instead of 'chmod -w'

'chmod -w' is not portable and can break the build:

| chmod: chmod: ss_err.h: new permissions are r--rw-r--, not r--r--r--
| ss_err.h: new permissions are r--rw-r--, not r--r--r--
| chmod: ss_err.c: new permissions are r--rw-r--, not r--r--r--
| make[2]: *** [ss_err.h] Error 1

This happens because 'chmod -w' is affected by umask. Issue can be
reproduced e.g. by

$ mkdir /tmp/foo
$ setfacl -m d:m:rwx /tmp/foo

$ umask 022
$ touch /tmp/foo/x
$ chmod -w /tmp/foo/x
chmod: /tmp/foo/x: new permissions are r--rw-r--, not r--r--r--

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/et/compile_et.sh.in
lib/ss/mk_cmds.sh.in