diff options
author | 1999-09-20 19:31:40 +0000 | |
---|---|---|
committer | 1999-09-20 19:31:40 +0000 | |
commit | 7bbe9e7da3588dc4b1f76b0d90bbecfd69e889b3 (patch) | |
tree | 4ffca37f195e6aaf6c01d19ac5c09d85c87bea70 | |
parent | Formatting (diff) | |
download | wireguard-openbsd-7bbe9e7da3588dc4b1f76b0d90bbecfd69e889b3.tar.xz wireguard-openbsd-7bbe9e7da3588dc4b1f76b0d90bbecfd69e889b3.zip |
Don't install whatis.db as root:bin when uid != 0. phil@psidev.net
-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 |