aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/user.c
diff options
context:
space:
mode:
authorMurray Stokely <murray@FreeBSD.org>2000-04-08 03:08:12 +0000
committerMurray Stokely <murray@FreeBSD.org>2000-04-08 03:08:12 +0000
commitc79f6ff9775c77024a3fd87a68da4ca7812e9d5a (patch)
tree145c5b60ba7ee69efc0cd47a3c671a906eaf4f8a /usr.sbin/sysinstall/user.c
parent471d7061ad628fcac1e933c92aa7257c0df49b9f (diff)
Notes
Diffstat (limited to 'usr.sbin/sysinstall/user.c')
-rw-r--r--usr.sbin/sysinstall/user.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/user.c b/usr.sbin/sysinstall/user.c
index 372d3fb7aaf82..f91087e839211 100644
--- a/usr.sbin/sysinstall/user.c
+++ b/usr.sbin/sysinstall/user.c
@@ -421,6 +421,10 @@ verifyUserSettings(WINDOW *ds_win)
return 0;
}
}
+ if ((homedir[0]!=0) && (homedir[0]!='/')) {
+ feepout("The pathname for home directories must begin with a '/'.");
+ return 0;
+ }
if (strlen(shell) > 0) {
while((cp = getusershell()) != NULL)
if (strcmp(cp, shell) == 0)
@@ -655,7 +659,7 @@ userAddUser(dialogMenuItem *self)
WINDOW *ds_win, *save;
ComposeObj *obj = NULL;
int n = 0, cancel = FALSE, ret;
- int max, firsttime = TRUE;
+ int max, firsttime = TRUE, filled=0;
if (RunningAsInit && !strstr(variable_get(SYSTEM_STATE), "install")) {
msgConfirm("This option may only be used after the system is installed, sorry!");
@@ -705,7 +709,17 @@ reenter:
firsttime = FALSE;
}
- while (layoutDialogLoop(ds_win, userLayout, &obj, &n, max, &cancelbutton, &cancel));
+ while (layoutDialogLoop(ds_win, userLayout, &obj, &n, max, &cancelbutton, &cancel)) {
+ /* Prevent this from being irritating if user really means NO */
+ if (filled < 3) {
+ if ((uname[0]) && !homedir[0]) {
+ SAFE_STRCPY(homedir,"/home/");
+ strcat(homedir,uname);
+ RefreshStringObj(userLayout[LAYOUT_HOMEDIR].obj);
+ ++filled;
+ }
+ }
+ };
if (!cancel && !verifyUserSettings(ds_win))
goto reenter;