summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw/pw_user.c
diff options
context:
space:
mode:
authordavidn <davidn@FreeBSD.org>2000-07-03 12:13:10 +0000
committerdavidn <davidn@FreeBSD.org>2000-07-03 12:13:10 +0000
commit93ab0f907270a62cce17f212d8d2abda4cd7de4c (patch)
tree8bce98e66d0e0511413ecd13c23116cfef762ad4 /usr.sbin/pw/pw_user.c
parentd442d3e2a65f0273a960546034ce05a27dc47461 (diff)
downloadFreeBSD-src-93ab0f907270a62cce17f212d8d2abda4cd7de4c.zip
FreeBSD-src-93ab0f907270a62cce17f212d8d2abda4cd7de4c.tar.gz
Fix breakage introduced by bypassing update for additional 'mod'
functionality when nothing had actually changed; -d changes would not set the 'something had changed flag'. Actually test for a change in homedir. PR: bin/19649
Diffstat (limited to 'usr.sbin/pw/pw_user.c')
-rw-r--r--usr.sbin/pw/pw_user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index bd574c6..e8a3b07 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/pw/pw_user.c
@@ -532,6 +532,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
}
if ((arg = getarg(args, 'd')) != NULL) {
+ edited = strcmp(pwd->pw_dir, arg->val) != 0;
if (stat(pwd->pw_dir = arg->val, &st) == -1) {
if (getarg(args, 'm') == NULL && strcmp(pwd->pw_dir, "/nonexistent") != 0)
warnx("WARNING: home `%s' does not exist", pwd->pw_dir);
OpenPOWER on IntegriCloud