diff options
author | Alex Feldman <alex@cvs.openbsd.org> | 1999-09-20 19:31:41 +0000 |
---|---|---|
committer | Alex Feldman <alex@cvs.openbsd.org> | 1999-09-20 19:31:41 +0000 |
commit | f3a99480922699d18b1b6d81435ebbebed3aa3e7 (patch) | |
tree | e32899661e1c35a65119117975ae11f9687cf298 /libexec/makewhatis | |
parent | 7a9562beeeb4df4b8cab879277a7dde72dfbe631 (diff) |
Don't install whatis.db as root:bin when uid != 0. phil@psidev.net
Diffstat (limited to 'libexec/makewhatis')
-rw-r--r-- | libexec/makewhatis/makewhatis.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libexec/makewhatis/makewhatis.sh b/libexec/makewhatis/makewhatis.sh index 0b33d93b75a..58261765f02 100644 --- a/libexec/makewhatis/makewhatis.sh +++ b/libexec/makewhatis/makewhatis.sh @@ -6,7 +6,7 @@ # # Public domain. # -# $OpenBSD: makewhatis.sh,v 1.7 1999/09/19 23:15:02 alex Exp $ +# $OpenBSD: makewhatis.sh,v 1.8 1999/09/20 19:31:40 alex Exp $ # PATH=/usr/bin:/bin; export PATH @@ -47,7 +47,11 @@ for MANDIR in $MANDIRS; do sort -u -o $WHATIS $WHATIS - install -o root -g bin -m 444 $WHATIS "$MANDIR/whatis.db" + if expr `id -u` \= 0 >/dev/null; then + install -o root -g bin -m 444 $WHATIS "$MANDIR/whatis.db" + else + install -m 444 $WHATIS "$MANDIR/whatis.db" + fi done rm -f $LIST $WHATIS |