From eb9ee6b2961b32a5e96ddad948e3d40e9a6f265a Mon Sep 17 00:00:00 2001 From: millert Date: Tue, 16 May 2023 21:28:46 +0000 Subject: [PATCH] useradd: use "cp" instead of "pax" to copy dot files There are some minor semantic differences but nothing that should affect files in /etc/skel. OK op@ --- usr.sbin/user/user.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/user/user.c b/usr.sbin/user/user.c index d299e1360a0..fcf86ae67bb 100644 --- a/usr.sbin/user/user.c +++ b/usr.sbin/user/user.c @@ -1,4 +1,4 @@ -/* $OpenBSD: user.c,v 1.129 2023/05/15 17:00:24 millert Exp $ */ +/* $OpenBSD: user.c,v 1.130 2023/05/16 21:28:46 millert Exp $ */ /* $NetBSD: user.c,v 1.69 2003/04/14 17:40:07 agc Exp $ */ /* @@ -171,7 +171,7 @@ enum { #define MKDIR "/bin/mkdir" #define MV "/bin/mv" #define NOLOGIN "/sbin/nologin" -#define PAX "/bin/pax" +#define CP "/bin/cp" #define RM "/bin/rm" #define UNSET_INACTIVE "Null (unset)" @@ -311,8 +311,8 @@ copydotfiles(char *skeldir, char *dir) if (n == 0) { warnx("No \"dot\" initialisation files found"); } else { - (void) asystem("cd %s && %s -rw -pe %s . %s", - skeldir, PAX, (verbose) ? "-v" : "", dir); + (void) asystem("%s -a %s %s/. %s", + CP, (verbose) ? "-v" : "", skeldir, dir); } return n; } -- 2.20.1