summaryrefslogtreecommitdiffstats
path: root/pw/pw_user.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-09-12 08:24:25 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-09-12 08:24:25 +0000
commit17f7f400f6dbf25f9155ce177eea1092f54d2f25 (patch)
tree4ae31c3bc2914aa900fa803056fc66589271109e /pw/pw_user.c
parent405476b14c422483c28c44621a1a652a499baa49 (diff)
downloadpw-darwin-17f7f400f6dbf25f9155ce177eea1092f54d2f25.tar.gz
pw-darwin-17f7f400f6dbf25f9155ce177eea1092f54d2f25.tar.zst
pw-darwin-17f7f400f6dbf25f9155ce177eea1092f54d2f25.zip
Regression: fix pw usermod -d
Mark the user has having been edited if -d option is passed to usermod and so the request change of home directory actually happen PR: 203052 Reported by: lenzi.sergio@gmail.com MFC after: 2 days
Diffstat (limited to 'pw/pw_user.c')
-rw-r--r--pw/pw_user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index 61d468a..f133147 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -1694,6 +1694,7 @@ pw_user_mod(int argc, char **argv, char *arg1)
if (homedir && strcmp(pwd->pw_dir, homedir) != 0) {
pwd->pw_dir = homedir;
+ edited = true;
if (fstatat(conf.rootfd, pwd->pw_dir, &st, 0) == -1) {
if (!createhome)
warnx("WARNING: home `%s' does not exist",