diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2017-01-22 18:55:01 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2017-01-22 18:55:01 +0000 |
| commit | 6789e5acf22b51ee0d83a01a3231e0b5c014770b (patch) | |
| tree | 1876e8938d01884fb1dd03c3ff51a28e349f1149 /usr.sbin/pw | |
| parent | db569544d1259272f3169b4defd6eaf0de92fc21 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/pw')
| -rw-r--r-- | usr.sbin/pw/pw_user.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 75e7fb6e5c88..6e991a858d8f 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -1697,6 +1697,10 @@ pw_user_mod(int argc, char **argv, char *arg1) edited = true; } + if (createhome && fstatat(conf.rootfd, pwd->pw_dir, &st, 0) == -1) { + docreatehome = true; + } + if (homedir && strcmp(pwd->pw_dir, homedir) != 0) { pwd->pw_dir = homedir; edited = true; |
