diff options
author | jkh <jkh@FreeBSD.org> | 1997-01-29 21:16:07 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-01-29 21:16:07 +0000 |
commit | ac85456797b8074dad5c1af1bb141abb9206d6ec (patch) | |
tree | 83e9095e674d2b5b7677942ffdfd7332a9da62a1 /usr.sbin/sysinstall/user.c | |
parent | 0b1072afc897dc6d26f0ca8ff58a0e989a760229 (diff) | |
download | FreeBSD-src-ac85456797b8074dad5c1af1bb141abb9206d6ec.zip FreeBSD-src-ac85456797b8074dad5c1af1bb141abb9206d6ec.tar.gz |
Fix broken layout help (this is what broke the TCP help screen).
Allow DITEM_NO_ECHO to be encoded in layout field types and make
user.c use it for the password item.
Diffstat (limited to 'usr.sbin/sysinstall/user.c')
-rw-r--r-- | usr.sbin/sysinstall/user.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/usr.sbin/sysinstall/user.c b/usr.sbin/sysinstall/user.c index 6c42ecc..f3006e3 100644 --- a/usr.sbin/sysinstall/user.c +++ b/usr.sbin/sysinstall/user.c @@ -122,7 +122,7 @@ static Layout userLayout[] = { #define LAYOUT_PASSWD 3 { 3, 43, 15, PASSWD_FIELD_LEN - 1, "Password:", "The password for this user (enter this field with care!)", - passwd, STRINGOBJ, NULL }, + passwd, NO_ECHO_OBJ(STRINGOBJ), NULL }, #define LAYOUT_GECOS 4 { 8, 6, 33, GECOS_FIELD_LEN - 1, "Full name:", "The user's full name (comment)", @@ -368,15 +368,15 @@ userAddGroup(dialogMenuItem *self) reenter: cancelbutton = okbutton = 0; - while (layoutDialogLoop(ds_win, groupLayout, &obj, &n, max, &cancelbutton, &cancel)) { - if (firsttime && n == LAYOUT_GNAME) { - /* fill in the blanks, well, just the GID */ - completeGroup(); - RefreshStringObj(groupLayout[LAYOUT_GID].obj); - firsttime = FALSE; - } + if (firsttime) { + /* fill in the blanks, well, just the GID */ + completeGroup(); + RefreshStringObj(groupLayout[LAYOUT_GID].obj); + firsttime = FALSE; } + while (layoutDialogLoop(ds_win, groupLayout, &obj, &n, max, &cancelbutton, &cancel)); + if (!cancel && !verifyGroupSettings()) goto reenter; @@ -693,20 +693,20 @@ userAddUser(dialogMenuItem *self) reenter: cancelbutton = okbutton = 0; - while (layoutDialogLoop(ds_win, userLayout, &obj, &n, max, &cancelbutton, &cancel)) { - if (firsttime && n == LAYOUT_UNAME) { - /* fill in the blanks, well, just the GID */ - completeUser(); - RefreshStringObj(userLayout[LAYOUT_UID].obj); - RefreshStringObj(userLayout[LAYOUT_UGROUP].obj); - RefreshStringObj(userLayout[LAYOUT_GECOS].obj); - RefreshStringObj(userLayout[LAYOUT_UMEMB].obj); - RefreshStringObj(userLayout[LAYOUT_HOMEDIR].obj); - RefreshStringObj(userLayout[LAYOUT_SHELL].obj); - firsttime = FALSE; - } + if (firsttime) { + /* fill in the blanks, well, just the GID */ + completeUser(); + RefreshStringObj(userLayout[LAYOUT_UID].obj); + RefreshStringObj(userLayout[LAYOUT_UGROUP].obj); + RefreshStringObj(userLayout[LAYOUT_GECOS].obj); + RefreshStringObj(userLayout[LAYOUT_UMEMB].obj); + RefreshStringObj(userLayout[LAYOUT_HOMEDIR].obj); + RefreshStringObj(userLayout[LAYOUT_SHELL].obj); + firsttime = FALSE; } + while (layoutDialogLoop(ds_win, userLayout, &obj, &n, max, &cancelbutton, &cancel)); + if (!cancel && !verifyUserSettings(ds_win)) goto reenter; |