From c327255f6a41a7642e501d86ce253cbebb6e138b Mon Sep 17 00:00:00 2001 From: Xin LI Date: Wed, 15 Jun 2011 19:09:58 +0000 Subject: Don't attempt to create the base directory when -d is specified. MFC after: 1 month --- pw/pw_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pw/pw_user.c b/pw/pw_user.c index db33746..b93ca66 100644 --- a/pw/pw_user.c +++ b/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 */ -- cgit v1.2.3-56-ge451