diff options
author | delphij <delphij@FreeBSD.org> | 2011-06-15 19:09:58 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2011-06-15 19:09:58 +0000 |
commit | 5bae35960fde0c01978cdf16744ed8bdccaef959 (patch) | |
tree | db6fd550505190f0df8bd727e7b753259f81c828 /usr.sbin/pw | |
parent | f433c75fa7942f76c35a192c39eb88870863892f (diff) | |
download | FreeBSD-src-5bae35960fde0c01978cdf16744ed8bdccaef959.zip FreeBSD-src-5bae35960fde0c01978cdf16744ed8bdccaef959.tar.gz |
Don't attempt to create the base directory when -d is specified.
MFC after: 1 month
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index db33746..b93ca66 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -163,7 +163,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args) * If we'll need to use it or we're updating it, * then create the base home directory if necessary */ - if (arg != NULL || getarg(args, 'm') != NULL) { + if ((arg != NULL || getarg(args, 'm') != NULL) && (getarg(args, 'd') == NULL)) { int l = strlen(cnf->home); if (l > 1 && cnf->home[l-1] == '/') /* Shave off any trailing path delimiter */ |