diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-09-12 08:24:25 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-09-12 08:24:25 +0000 |
commit | ec4f7bd978f65c8ed81399f309002a0ad7e9aea4 (patch) | |
tree | b554dd09a338109d42a51d0c3e41d39271f4f335 /usr.sbin/pw | |
parent | 05081ecd111e66f83639404560d0f91a6df08630 (diff) | |
download | src-ec4f7bd978f65c8ed81399f309002a0ad7e9aea4.tar.gz src-ec4f7bd978f65c8ed81399f309002a0ad7e9aea4.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
Notes
Notes:
svn path=/head/; revision=287701
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 61d468ab059a..f13314750e1b 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/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", |