[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make install using "-j"
From: |
Ralf Wildenhues |
Subject: |
Re: make install using "-j" |
Date: |
Fri, 23 Jun 2006 17:10:02 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
Hello Paul,
* Paul Eggert wrote on Thu, Jun 22, 2006 at 11:09:16PM CEST:
> Anyway, to get back to install-sh: it needs a similar patch, so your
> email prompted me to write it. As a side effect I think this patch
> works around both bugs you reported. So I propose the following
> Automake patch instead. Does it work for you?
Not really, because this:
> posix_mkdir=false
> - if $mkdirprog -m $test_mode -p -- / >/dev/null 2>&1; then
> - posix_mkdir=true
> + if $mkdirprog $mkdir_mode -p -- / >/dev/null 2>&1; then
> + posix_mkdir=:
still falsely thinks the HP-UX mkdir is Posix conforming. Shown below
an extreme example of the failure to deny permissions.
And if I hard-code posix_mkdir to false in the last statement shown
above, then using a umask of 777 and a mode of 000 fails, as shown
further below.
(Anyway I'd be very hesitant to pull such a large change into Autoconf
at the moment; luckily this isn't too important for the in-Autoconf copy
of install-sh.)
Cheers, and thanks for working on this,
Ralf
$ (umask 777; sh -x ./install-sh -m 000 -d a/b/c )
[...]
+ test 4 -ne 0
+ mode=000
+ shift
+ shift
+ continue
+ test 2 -ne 0
+ dir_arg=true
+ shift
+ continue
+ test 1 -ne 0
+ break
+ test 1 -ne 0
+ test -z true
+ test 1 -eq 0
+ test -z true
+ test -n true
+ dst=a/b/c
+ dstdir=a/b/c
+ test -d a/b/c
+ dstdir_status=1
+ obsolete_mkdir_used=false
+ test 1 != 0
+ + umask
umask=0777
+ mkdir_umask=0777
+ test -n true
+ mkdir_mode=-m000
+ posix_mkdir=false
+ mkdir -m000 -p -- /
+ 1> /dev/null 2>& 1
+ posix_mkdir=:
+ :
+ umask 0777
+ exec mkdir -m000 -p -- a/b/c
+ :
+ test -n true
+ test -z
+ test -z
+ test false = false
$ ls -ld a a/b a/b/c
drwxrwxrwx 3 rwild rwild 512 Jun 23 07:28 a
drwxrwxrwx 3 rwild rwild 512 Jun 23 07:28 a/b
d--------- 2 rwild rwild 512 Jun 23 07:28 a/b/c
$ $EDITOR ./install-sh # set posix_mkdir=false
$ (umask 777; sh -x ./install-sh -m 000 -d a/b/c )
[...]
+ test -d a/b/c
+ dstdir_status=1
+ obsolete_mkdir_used=false
+ test 1 != 0
+ + umask
umask=0777
+ mkdir_umask=0777
+ test -n true
+ mkdir_mode=-m000
+ posix_mkdir=false
+ mkdir -m000 -p -- /
+ 1> /dev/null 2>& 1
+ posix_mkdir=false
+ false
+ prefix=
+ 2> /dev/null
+ posix_glob=true
+ oIFS=
+ IFS=/
+ true
+ set -f
+ set fnord a b c
+ shift
+ true
+ set +f
+ IFS=
+ prefixes=
+ test -z a
+ prefix=a
+ test -d a
+ false
+ qprefix=a
+ prefixes= 'a'
+ prefix=a/
+ test -z b
+ prefix=a/b
+ test -d a/b
+ false
+ qprefix=a/b
+ prefixes= 'a' 'a/b'
+ prefix=a/b/
+ test -z c
+ prefix=a/b/c
+ test -d a/b/c
+ false
+ qprefix=a/b/c
+ prefixes= 'a' 'a/b' 'a/b/c'
+ prefix=a/b/c/
+ test -n 'a' 'a/b' 'a/b/c'
+ umask 0777
+ eval $doit_exec $mkdirprog 'a' 'a/b' 'a/b/c'
+ exec mkdir a a/b a/b/c
mkdir: cannot access a: Permission denied
mkdir: cannot access a/b: Permission denied
+ test -d a/b/c
+ exit 1