summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralex <alex@openbsd.org>1999-09-20 19:31:40 +0000
committeralex <alex@openbsd.org>1999-09-20 19:31:40 +0000
commit7bbe9e7da3588dc4b1f76b0d90bbecfd69e889b3 (patch)
tree4ffca37f195e6aaf6c01d19ac5c09d85c87bea70
parentFormatting (diff)
downloadwireguard-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.sh8
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