summaryrefslogtreecommitdiffstats
path: root/pw
diff options
context:
space:
mode:
authorDavid Nugent <davidn@FreeBSD.org>2000-07-03 12:13:10 +0000
committerDavid Nugent <davidn@FreeBSD.org>2000-07-03 12:13:10 +0000
commitddadffee3be6035a1ecd5a7724aebcfa40aa212b (patch)
tree2bc0143b8f70c5534b95943ec748707c307ccacb /pw
parenta3bb22ec1c5286039b60e784591be154a2af7caf (diff)
downloadpw-darwin-ddadffee3be6035a1ecd5a7724aebcfa40aa212b.tar.gz
pw-darwin-ddadffee3be6035a1ecd5a7724aebcfa40aa212b.tar.zst
pw-darwin-ddadffee3be6035a1ecd5a7724aebcfa40aa212b.zip
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 'pw')
-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 bd574c6..e8a3b07 100644
--- a/pw/pw_user.c
+++ b/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);