summaryrefslogtreecommitdiff
path: root/usr.sbin/sysmerge/sysmerge.sh
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2012-08-28 05:42:08 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2012-08-28 05:42:08 +0000
commit725d54f304e9915ae6f7ce7a481640c896d309d6 (patch)
tree2109a0158451162c70ece11dc44244e37e8fa8bf /usr.sbin/sysmerge/sysmerge.sh
parent32f23fc1b858563651a26205fd7de2365091dda9 (diff)
Always compare master.passwd(5) and group(5) regardless of their sums:
this is a sanity check to ensure no system user(s)/group(s) are missing. ok sthen@
Diffstat (limited to 'usr.sbin/sysmerge/sysmerge.sh')
-rw-r--r--usr.sbin/sysmerge/sysmerge.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh
index c41616052e5..aa89dcce0d8 100644
--- a/usr.sbin/sysmerge/sysmerge.sh
+++ b/usr.sbin/sysmerge/sysmerge.sh
@@ -1,6 +1,6 @@
#!/bin/ksh -
#
-# $OpenBSD: sysmerge.sh,v 1.88 2012/08/20 14:10:30 ajacoutot Exp $
+# $OpenBSD: sysmerge.sh,v 1.89 2012/08/28 05:42:07 ajacoutot Exp $
#
# Copyright (c) 2008, 2009, 2010, 2011, 2012 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 1998-2003 Douglas Barton <DougB@FreeBSD.org>
@@ -127,7 +127,11 @@ do_populate() {
cksum -c ${DESTDIR}/${DBDIR}/${i} 2>/dev/null | grep OK | awk '{ print $2 }' | sed 's/[:]//')
for _r in ${_R}; do
if [ -f ${DESTDIR}/${_r} -a -f ${TEMPROOT}/${_r} ]; then
- rm -f ${TEMPROOT}/${_r}
+ # sanity check: _always_ compare master.passwd(5) and group(5)
+ # we don't want to have missing system user(s) and/or group(s)
+ if [ ${_r} != ./etc/master.passwd -a ${_r} != ./etc/group ]; then
+ rm -f ${TEMPROOT}/${_r}
+ fi
fi
done
fi