Backout r223115 which potentially caused a POLA violation, by restoring

historic behavior (create the default base directory in pw.conf) before
I came up with a better fix for this.

Requested by:	nwhitehorn
Approved by:	re (kib)
This commit is contained in:
Xin LI 2011-07-31 03:00:00 +00:00
parent 89e250512d
commit cfc3f46787
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224535

View File

@ -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) && (getarg(args, 'd') == NULL)) {
if (arg != NULL || getarg(args, 'm') != NULL) {
int l = strlen(cnf->home);
if (l > 1 && cnf->home[l-1] == '/') /* Shave off any trailing path delimiter */