summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--release/sysinstall/anonFTP.c4
-rw-r--r--release/sysinstall/attr.c104
-rw-r--r--release/sysinstall/dist.c5
-rw-r--r--release/sysinstall/install.c15
-rw-r--r--release/sysinstall/installUpgrade.c3
-rw-r--r--release/sysinstall/sysinstall.h3
-rw-r--r--usr.sbin/sade/install.c15
-rw-r--r--usr.sbin/sade/sade.h3
-rw-r--r--usr.sbin/sysinstall/anonFTP.c4
-rw-r--r--usr.sbin/sysinstall/dist.c5
-rw-r--r--usr.sbin/sysinstall/install.c15
-rw-r--r--usr.sbin/sysinstall/installUpgrade.c3
-rw-r--r--usr.sbin/sysinstall/sysinstall.h3
13 files changed, 115 insertions, 67 deletions
diff --git a/release/sysinstall/anonFTP.c b/release/sysinstall/anonFTP.c
index 9171232..45edf71 100644
--- a/release/sysinstall/anonFTP.c
+++ b/release/sysinstall/anonFTP.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: anonFTP.c,v 1.21 1997/02/07 04:25:16 jkh Exp $
+ * $Id: anonFTP.c,v 1.22 1997/03/09 22:25:38 jkh Exp $
*
* Copyright (c) 1995
* Coranth Gryphon. All rights reserved.
@@ -168,7 +168,7 @@ createFtpUser(void)
return DITEM_SUCCESS; /* succeeds if already exists */
}
- sprintf(pwline, "%s::%s:%d::0:0:%s:%s:/bin/date\n", FTP_NAME, tconf.uid, gid, tconf.comment, tconf.homedir);
+ sprintf(pwline, "%s:*:%s:%d::0:0:%s:%s:/nonexistent\n", FTP_NAME, tconf.uid, gid, tconf.comment, tconf.homedir);
fptr = fopen(_PATH_MASTERPASSWD,"a");
if (! fptr) {
diff --git a/release/sysinstall/attr.c b/release/sysinstall/attr.c
index ca366bb..3b439a9 100644
--- a/release/sysinstall/attr.c
+++ b/release/sysinstall/attr.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: attr.c,v 1.15 1997/02/22 14:11:10 peter Exp $
+ * $Id: attr.c,v 1.8.2.8 1997/03/28 23:07:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -60,18 +60,36 @@ attr_parse(Attribs *attr, FILE *fp)
{
char hold_n[MAX_NAME+1];
char hold_v[MAX_VALUE+1];
- int n, v;
- enum { LOOK, COMMENT, NAME, VALUE, COMMIT } state;
- int lno, num_attribs;
- int ch;
+ char buf[BUFSIZ];
+ int bp, n, v, max;
+ enum { LOOK, COMMENT, NAME, VALUE, MVALUE, COMMIT, FILL, STOP } state;
+ int num_attribs;
+ int ch = 0;
- n = v = lno = num_attribs = 0;
+ n = v = num_attribs = bp = max = 0;
state = LOOK;
- while (state == COMMIT || (fread(&ch, 1, 1, fp) == 1)) {
- /* Count lines */
- if (ch == '\n')
- ++lno;
+ while (state != STOP) {
+ if (state != COMMIT) {
+ if (bp == max)
+ state = FILL;
+ else
+ ch = buf[bp++];
+ }
switch(state) {
+ case FILL:
+ if ((max = fread(buf, 1, sizeof buf, fp)) <= 0) {
+ state = STOP;
+ break;
+ }
+ else {
+ state = LOOK;
+ if (isDebug())
+ msgDebug("Read %d characters from attributes file on state FILL\n", max);
+ ch = buf[0];
+ bp = 1;
+ }
+ /* Fall through deliberately since we already have a character and state == LOOK */
+
case LOOK:
if (isspace(ch))
continue;
@@ -81,11 +99,18 @@ attr_parse(Attribs *attr, FILE *fp)
continue;
}
else if (isalpha(ch) || ch == '_') {
- hold_n[n++] = ch;
- state = NAME;
+ if (n >= MAX_NAME) {
+ msgDebug("Attribute name overflow at character %d, ignoring entry..\n", n);
+ n = 0;
+ state = COMMENT;
+ }
+ else {
+ hold_n[n++] = ch;
+ state = NAME;
+ }
}
else {
- msgDebug("Parse config: Invalid character '%c' at line %d\n", ch, lno);
+ msgDebug("Parse config: Invalid character '%c (%0x)'\n", ch, ch);
state = COMMENT; /* Ignore the rest of the line */
}
break;
@@ -96,15 +121,17 @@ attr_parse(Attribs *attr, FILE *fp)
break;
case NAME:
- if (ch == '\n') {
+ if (ch == '\n' || !ch) {
hold_n[n] = '\0';
- hold_v[v = 0] = '\0';
+ hold_v[0] = '\0';
+ v = n = 0;
state = COMMIT;
}
else if (isspace(ch))
continue;
else if (ch == '=') {
hold_n[n] = '\0';
+ v = n = 0;
state = VALUE;
}
else
@@ -114,39 +141,54 @@ attr_parse(Attribs *attr, FILE *fp)
case VALUE:
if (v == 0 && isspace(ch))
continue;
- else if (ch == '{') {
- /* multiline value */
- while (fread(&ch, 1, 1, fp) == 1 && ch != '}') {
- if (v == MAX_VALUE)
- msgFatal("Value length overflow at line %d", lno);
- hold_v[v++] = ch;
- }
- hold_v[v] = '\0';
- state = COMMIT;
- }
- else if (ch == '\n') {
+ else if (ch == '{')
+ state = MVALUE;
+ else if (ch == '\n' || !ch) {
hold_v[v] = '\0';
+ v = n = 0;
state = COMMIT;
}
else {
- if (v == MAX_VALUE)
- msgFatal("Value length overflow at line %d", lno);
+ if (v >= MAX_VALUE) {
+ msgDebug("Value length overflow at character %d\n", v);
+ state = COMMENT;
+ v = n = 0;
+ break;
+ }
else
hold_v[v++] = ch;
}
break;
+ case MVALUE:
+ /* multiline value */
+ if (v >= MAX_VALUE) {
+ msgDebug("Value length overflow at character %d\n", v);
+ state = COMMENT;
+ n = v = 0;
+ }
+ else if (ch == '}') {
+ hold_v[v] = '\0';
+ v = n = 0;
+ state = COMMIT;
+ }
+ else
+ hold_v[v++] = ch;
+ break;
+
case COMMIT:
SAFE_STRCPY(attr[num_attribs].name, hold_n);
SAFE_STRCPY(attr[num_attribs].value, hold_v);
state = LOOK;
v = n = 0;
- if (++num_attribs >= MAX_ATTRIBS)
- msgFatal("Attribute limit overflow; encountered a bad attributes file!");
+ if (++num_attribs >= MAX_ATTRIBS) {
+ msgDebug("Attribute limit overflow at %d; encountered a bad attributes file!\n", num_attribs);
+ return DITEM_FAILURE;
+ }
break;
default:
- msgFatal("Unknown state at line %d??", lno);
+ msgFatal("Unknown state in attr_parse??");
}
}
attr[num_attribs].name[0] = NULL; /* end marker */
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index 3e3f91a..ec6ac3a 100644
--- a/release/sysinstall/dist.c
+++ b/release/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.103 1997/03/15 18:01:35 jkh Exp $
+ * $Id: dist.c,v 1.73.2.23 1997/03/25 02:45:37 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -390,7 +390,6 @@ distExtract(char *parent, Distribution *me)
char *path, *dist, buf[BUFSIZ];
const char *tmp;
FILE *fp;
- Attribs *dist_attr;
WINDOW *w = savescr();
struct timeval start, stop;
struct sigaction old, new;
@@ -432,7 +431,6 @@ distExtract(char *parent, Distribution *me)
* Try to get distribution as multiple pieces, locating and parsing an
* info file which tells us how many we need for this distribution.
*/
- dist_attr = NULL;
numchunks = 0;
snprintf(buf, sizeof buf, "%s/%s.inf", path, dist);
@@ -457,6 +455,7 @@ distExtract(char *parent, Distribution *me)
}
else if (fp > 0) {
int status;
+ Attribs *dist_attr;
if (isDebug())
msgDebug("Parsing attributes file for distribution %s\n", dist);
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index c84e44c..76d53dc 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.178 1997/03/18 07:02:32 mpp Exp $
+ * $Id: install.c,v 1.134.2.40 1997/03/28 02:25:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -498,14 +498,15 @@ installNovice(dialogMenuItem *self)
"may do so by typing: /stand/sysinstall.");
}
if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) {
- if (!msgYesNo("Would you like to configure any SLIP/PPP or network interface devices?")) {
+ if (!msgYesNo("Would you like to configure any Ethernet or SLIP/PPP network devices?")) {
Device *tmp;
+ dialog_clear_norefresh();
tmp = tcpDeviceSelect();
+ dialog_clear_norefresh();
if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
if (!tmp->init(tmp))
msgConfirm("Initialization of %s device failed.", tmp->name);
- dialog_clear_norefresh();
}
}
@@ -585,11 +586,13 @@ installNovice(dialogMenuItem *self)
configUsers(self);
dialog_clear_norefresh();
- if (!msgYesNo("Would you like to set the system manager's password now?\n\n"
- "This is the password you'll use to log in as \"root\".")) {
+ msgConfirm("Now you must set the system manager's password.\n"
+ "This is the password you'll use to log in as \"root\".");
+ {
WINDOW *w = savescr();
- systemExecute("passwd root");
+ if (!systemExecute("passwd root"))
+ variable_set2("root_password", "YES");
restorescr(w);
}
diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c
index 8535e3a..ad53514 100644
--- a/release/sysinstall/installUpgrade.c
+++ b/release/sysinstall/installUpgrade.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: installUpgrade.c,v 1.45 1997/03/07 16:39:17 jkh Exp $
+ * $Id: installUpgrade.c,v 1.46 1997/03/11 09:29:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -70,6 +70,7 @@ static HitList etc_files [] = {
{ JUST_COPY, "fbtab", TRUE, NULL },
{ JUST_COPY, "fstab", FALSE, NULL },
{ JUST_COPY, "ftpusers", TRUE, NULL },
+ { JUST_COPY, "gettytab", TRUE, NULL },
{ JUST_COPY, "gnats", TRUE, NULL },
{ JUST_COPY, "group", FALSE, NULL },
{ JUST_COPY, "host.conf", TRUE, NULL },
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index 3f52dc4..bd7e775 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/sysinstall/sysinstall.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.121 1997/03/15 16:24:32 jkh Exp $
+ * $Id: sysinstall.h,v 1.122 1997/03/19 10:09:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -44,7 +44,6 @@
#include <string.h>
#include <unistd.h>
#include <dialog.h>
-#include <dialog.h>
#include "ui_objects.h"
#include "dir.h"
#include "colors.h"
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index c84e44c..76d53dc 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.178 1997/03/18 07:02:32 mpp Exp $
+ * $Id: install.c,v 1.134.2.40 1997/03/28 02:25:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -498,14 +498,15 @@ installNovice(dialogMenuItem *self)
"may do so by typing: /stand/sysinstall.");
}
if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) {
- if (!msgYesNo("Would you like to configure any SLIP/PPP or network interface devices?")) {
+ if (!msgYesNo("Would you like to configure any Ethernet or SLIP/PPP network devices?")) {
Device *tmp;
+ dialog_clear_norefresh();
tmp = tcpDeviceSelect();
+ dialog_clear_norefresh();
if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
if (!tmp->init(tmp))
msgConfirm("Initialization of %s device failed.", tmp->name);
- dialog_clear_norefresh();
}
}
@@ -585,11 +586,13 @@ installNovice(dialogMenuItem *self)
configUsers(self);
dialog_clear_norefresh();
- if (!msgYesNo("Would you like to set the system manager's password now?\n\n"
- "This is the password you'll use to log in as \"root\".")) {
+ msgConfirm("Now you must set the system manager's password.\n"
+ "This is the password you'll use to log in as \"root\".");
+ {
WINDOW *w = savescr();
- systemExecute("passwd root");
+ if (!systemExecute("passwd root"))
+ variable_set2("root_password", "YES");
restorescr(w);
}
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 3f52dc4..bd7e775 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.121 1997/03/15 16:24:32 jkh Exp $
+ * $Id: sysinstall.h,v 1.122 1997/03/19 10:09:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -44,7 +44,6 @@
#include <string.h>
#include <unistd.h>
#include <dialog.h>
-#include <dialog.h>
#include "ui_objects.h"
#include "dir.h"
#include "colors.h"
diff --git a/usr.sbin/sysinstall/anonFTP.c b/usr.sbin/sysinstall/anonFTP.c
index 9171232..45edf71 100644
--- a/usr.sbin/sysinstall/anonFTP.c
+++ b/usr.sbin/sysinstall/anonFTP.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: anonFTP.c,v 1.21 1997/02/07 04:25:16 jkh Exp $
+ * $Id: anonFTP.c,v 1.22 1997/03/09 22:25:38 jkh Exp $
*
* Copyright (c) 1995
* Coranth Gryphon. All rights reserved.
@@ -168,7 +168,7 @@ createFtpUser(void)
return DITEM_SUCCESS; /* succeeds if already exists */
}
- sprintf(pwline, "%s::%s:%d::0:0:%s:%s:/bin/date\n", FTP_NAME, tconf.uid, gid, tconf.comment, tconf.homedir);
+ sprintf(pwline, "%s:*:%s:%d::0:0:%s:%s:/nonexistent\n", FTP_NAME, tconf.uid, gid, tconf.comment, tconf.homedir);
fptr = fopen(_PATH_MASTERPASSWD,"a");
if (! fptr) {
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index 3e3f91a..ec6ac3a 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.103 1997/03/15 18:01:35 jkh Exp $
+ * $Id: dist.c,v 1.73.2.23 1997/03/25 02:45:37 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -390,7 +390,6 @@ distExtract(char *parent, Distribution *me)
char *path, *dist, buf[BUFSIZ];
const char *tmp;
FILE *fp;
- Attribs *dist_attr;
WINDOW *w = savescr();
struct timeval start, stop;
struct sigaction old, new;
@@ -432,7 +431,6 @@ distExtract(char *parent, Distribution *me)
* Try to get distribution as multiple pieces, locating and parsing an
* info file which tells us how many we need for this distribution.
*/
- dist_attr = NULL;
numchunks = 0;
snprintf(buf, sizeof buf, "%s/%s.inf", path, dist);
@@ -457,6 +455,7 @@ distExtract(char *parent, Distribution *me)
}
else if (fp > 0) {
int status;
+ Attribs *dist_attr;
if (isDebug())
msgDebug("Parsing attributes file for distribution %s\n", dist);
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index c84e44c..76d53dc 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.178 1997/03/18 07:02:32 mpp Exp $
+ * $Id: install.c,v 1.134.2.40 1997/03/28 02:25:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -498,14 +498,15 @@ installNovice(dialogMenuItem *self)
"may do so by typing: /stand/sysinstall.");
}
if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) {
- if (!msgYesNo("Would you like to configure any SLIP/PPP or network interface devices?")) {
+ if (!msgYesNo("Would you like to configure any Ethernet or SLIP/PPP network devices?")) {
Device *tmp;
+ dialog_clear_norefresh();
tmp = tcpDeviceSelect();
+ dialog_clear_norefresh();
if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
if (!tmp->init(tmp))
msgConfirm("Initialization of %s device failed.", tmp->name);
- dialog_clear_norefresh();
}
}
@@ -585,11 +586,13 @@ installNovice(dialogMenuItem *self)
configUsers(self);
dialog_clear_norefresh();
- if (!msgYesNo("Would you like to set the system manager's password now?\n\n"
- "This is the password you'll use to log in as \"root\".")) {
+ msgConfirm("Now you must set the system manager's password.\n"
+ "This is the password you'll use to log in as \"root\".");
+ {
WINDOW *w = savescr();
- systemExecute("passwd root");
+ if (!systemExecute("passwd root"))
+ variable_set2("root_password", "YES");
restorescr(w);
}
diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c
index 8535e3a..ad53514 100644
--- a/usr.sbin/sysinstall/installUpgrade.c
+++ b/usr.sbin/sysinstall/installUpgrade.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: installUpgrade.c,v 1.45 1997/03/07 16:39:17 jkh Exp $
+ * $Id: installUpgrade.c,v 1.46 1997/03/11 09:29:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -70,6 +70,7 @@ static HitList etc_files [] = {
{ JUST_COPY, "fbtab", TRUE, NULL },
{ JUST_COPY, "fstab", FALSE, NULL },
{ JUST_COPY, "ftpusers", TRUE, NULL },
+ { JUST_COPY, "gettytab", TRUE, NULL },
{ JUST_COPY, "gnats", TRUE, NULL },
{ JUST_COPY, "group", FALSE, NULL },
{ JUST_COPY, "host.conf", TRUE, NULL },
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index 3f52dc4..bd7e775 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.121 1997/03/15 16:24:32 jkh Exp $
+ * $Id: sysinstall.h,v 1.122 1997/03/19 10:09:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -44,7 +44,6 @@
#include <string.h>
#include <unistd.h>
#include <dialog.h>
-#include <dialog.h>
#include "ui_objects.h"
#include "dir.h"
#include "colors.h"
OpenPOWER on IntegriCloud