summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2017-05-31 07:55:30 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2017-05-31 07:55:30 +0000
commit11b7b397f679487fb3f377247cc323c681a93ba8 (patch)
tree06348825df4cd2ec485a8458b04909acdd9e4127
parente330c946ab6b05d5f7cedbf2fcf14032610e12e3 (diff)
Change cp -pR to pax copy mode with -k when copying /etc/skel. This way
we keep existing files in the user's home directory that might have been installed from siteXX.tgz. Found the hard way by Erling Westenvik. Thanks to trondd for helpful analysis. "If that's what it does, I'm all for it" halex
-rw-r--r--distrib/miniroot/install.sub4
1 files changed, 2 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 1db72e699db..7ac1f670448 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1011 2017/05/28 09:24:56 rpe Exp $
+# $OpenBSD: install.sub,v 1.1012 2017/05/31 07:55:29 tb Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -2919,7 +2919,7 @@ do_install(){
_home=/mnt$_home
mkdir -p $_home
- (cd /mnt/etc/skel; cp -pR . $_home)
+ (cd /mnt/etc/skel; pax -rw -k -pe . $_home)
(umask 077 && sed "s,^To: root\$,To: ${ADMIN_NAME} <${ADMIN}>," \
/mnt/var/mail/root >/mnt/var/mail/$ADMIN )
chown -R 1000:1000 $_home /mnt/var/mail/$ADMIN