Terminate, with extreme prejudice, the USAResident hack which
does bad things to /etc/make.conf in certain situations. Also soften the "don't install crypto from the USA!" messages since, except for RSA (which is still noted), that's not so true anymore.
This commit is contained in:
parent
e3c5263be9
commit
c40cb68444
@ -364,41 +364,6 @@ configEnvironmentResolv(char *config)
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up the make.conf file */
|
||||
void
|
||||
configMake_conf(char *config)
|
||||
{
|
||||
char *lines[MAX_LINES];
|
||||
int i, nlines;
|
||||
FILE *fp;
|
||||
|
||||
if (!file_readable(config)) {
|
||||
char *line = malloc(21);
|
||||
sprintf(line, "USA_RESIDENT=%s\n", USAResident ? "YES" : "NO");
|
||||
lines[0] = line;
|
||||
nlines = 1;
|
||||
}
|
||||
else {
|
||||
nlines = readConfig(config, lines, MAX_LINES);
|
||||
if (nlines == -1)
|
||||
return;
|
||||
for (i = 0; i < nlines; i++) {
|
||||
if (!strncmp(lines[i], "USA_RESIDENT", 12)) {
|
||||
free(lines[i]);
|
||||
lines[i] = malloc(21); /* big enough */
|
||||
sprintf(lines[i], "USA_RESIDENT=%s\n", USAResident ? "YES" : "NO");
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((fp = fopen(config, "w")) != NULL) {
|
||||
for (i = 0; i < nlines; i++) {
|
||||
fprintf(fp, "%s", lines[i]);
|
||||
free(lines[i]);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Version of below for dispatch routines */
|
||||
int
|
||||
configRC(dialogMenuItem *unused)
|
||||
|
@ -391,21 +391,14 @@ distMaybeSetCRYPTO(dialogMenuItem *self)
|
||||
"If you choose No, FreeBSD will use an MD5-based password scheme which,\n"
|
||||
"while more secure, is not interoperable with the traditional\n"
|
||||
"DES-based passwords used on other Unix systems.\n\n"
|
||||
"Please do NOT choose Yes at this point if you are outside the United\n"
|
||||
"States and Canada and are installing from a U.S. FTP server (installing\n"
|
||||
"from the CD is fine). Instead, install everything but the crypto bits\n"
|
||||
"from the U.S. site and then switch to an international FTP server to\n"
|
||||
"install crypto on a second pass with the Custom Installation option.\n\n"
|
||||
"Note that the international crypto distribution has a better\n"
|
||||
"implementation of the RSA algorithm, which cannot be used in the U.S.\n"
|
||||
"for patent reasons.\n")) {
|
||||
"implementation of the RSA algorithm, which is patented in the U.S.\n"
|
||||
"If you are in the USA, use crypto + the rsaref port/package\n.")) {
|
||||
if (!dmenuOpenSimple(&MenuCRYPTODistributions, FALSE))
|
||||
i = DITEM_FAILURE;
|
||||
}
|
||||
|
||||
dialog_clear_norefresh();
|
||||
USAResident = !msgYesNo("Are you actually resident in the United States?");
|
||||
|
||||
distVerifyFlags();
|
||||
return i | DITEM_REDRAW | DITEM_RESTORE;
|
||||
}
|
||||
|
@ -47,7 +47,6 @@ Boolean RunningAsInit; /* Are we running as init? */
|
||||
Boolean DialogActive; /* Is libdialog initialized? */
|
||||
Boolean ColorDisplay; /* Are we on a color display? */
|
||||
Boolean OnVTY; /* Are we on a VTY? */
|
||||
Boolean USAResident; /* Are we cryptographically challenged? */
|
||||
Variable *VarHead; /* The head of the variable chain */
|
||||
Device *mediaDevice; /* Where we're installing from */
|
||||
int BootMgr; /* Which boot manager we're using */
|
||||
@ -69,5 +68,4 @@ globalsInit(void)
|
||||
VarHead = NULL;
|
||||
mediaDevice = NULL;
|
||||
RunningAsInit = FALSE;
|
||||
USAResident = FALSE;
|
||||
}
|
||||
|
@ -584,43 +584,6 @@ installStandard(dialogMenuItem *self)
|
||||
(void)configLinux(self);
|
||||
#endif
|
||||
|
||||
#ifdef notyet
|
||||
dialog_clear();
|
||||
if (USAResident) {
|
||||
if (!msgYesNo("I see that you are \"USA_RESIDENT\" according to your earlier\n"
|
||||
"response to the CRYPTO distribution dialog. Do you want to try and\n"
|
||||
"load the rsaref package from the current media? Some restrictions on\n"
|
||||
"usage may apply, so be sure to read the package installation output!")) {
|
||||
dialog_clear();
|
||||
_interactiveHack = 1;
|
||||
if (DITEM_STATUS(package_add("rsaref")) != DITEM_SUCCESS) {
|
||||
msgConfirm("Unable to find an rsaref package on the current intallation media.\n"
|
||||
"This is probably because you are installing from a CDROM which\n"
|
||||
"was produced for world-wide use, in which case the RSA patent\n"
|
||||
"prevents distribution of RSA code on CD. Please change your\n"
|
||||
"media device to point to an International FTP server and install\n"
|
||||
"the rsaref package manually through the Packages menu.");
|
||||
}
|
||||
dialog_clear();
|
||||
_interactiveHack = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!msgYesNo("I see that you are not \"USA_RESIDENT\" according to your earlier\n"
|
||||
"response to the CRYPTO distribution dialog. Do you want to try and\n"
|
||||
"load the rsaintl package from the current media?")) {
|
||||
if (DITEM_STATUS(package_add("rsaintl")) != DITEM_SUCCESS) {
|
||||
msgConfirm("Unable to find an rsaintl package on the current intallation media.\n"
|
||||
"This is probably because you are installing from a CDROM which\n"
|
||||
"was produced for use in the USA, in which case the RSA patent\n"
|
||||
"prevents distribution of RSA code on CD. Please change your\n"
|
||||
"media device to point to an International FTP server and install\n"
|
||||
"the rsaintl package manually through the Packages menu.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* notyet */
|
||||
|
||||
dialog_clear_norefresh();
|
||||
if (!msgYesNo("Does this system have a non-USB mouse attached to it?"))
|
||||
dmenuOpenSimple(&MenuMouse, FALSE);
|
||||
@ -1119,7 +1082,6 @@ installEnvironment(void)
|
||||
configEnvironmentRC_conf();
|
||||
if (file_readable("/etc/resolv.conf"))
|
||||
configEnvironmentResolv("/etc/resolv.conf");
|
||||
configMake_conf("/etc/make.conf");
|
||||
}
|
||||
|
||||
/* Copy the boot floppy contents into /stand */
|
||||
|
@ -347,7 +347,6 @@ extern Boolean RunningAsInit; /* Are we running stand-alone? */
|
||||
extern Boolean DialogActive; /* Is the dialog() stuff up? */
|
||||
extern Boolean ColorDisplay; /* Are we on a color display? */
|
||||
extern Boolean OnVTY; /* On a syscons VTY? */
|
||||
Boolean USAResident; /* Are we cryptographically challenged? */
|
||||
extern Variable *VarHead; /* The head of the variable chain */
|
||||
extern Device *mediaDevice; /* Where we're getting our distribution from */
|
||||
extern unsigned int Dists; /* Which distributions we want */
|
||||
@ -429,7 +428,6 @@ extern void command_func_add(char *key, commandFunc func, void *data);
|
||||
extern void configEnvironmentRC_conf(void);
|
||||
extern void configEnvironmentResolv(char *config);
|
||||
extern void configRC_conf(void);
|
||||
extern void configMake_conf(char *config);
|
||||
extern int configFstab(dialogMenuItem *self);
|
||||
extern int configRC(dialogMenuItem *self);
|
||||
extern int configResolv(dialogMenuItem *self);
|
||||
|
@ -364,41 +364,6 @@ configEnvironmentResolv(char *config)
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up the make.conf file */
|
||||
void
|
||||
configMake_conf(char *config)
|
||||
{
|
||||
char *lines[MAX_LINES];
|
||||
int i, nlines;
|
||||
FILE *fp;
|
||||
|
||||
if (!file_readable(config)) {
|
||||
char *line = malloc(21);
|
||||
sprintf(line, "USA_RESIDENT=%s\n", USAResident ? "YES" : "NO");
|
||||
lines[0] = line;
|
||||
nlines = 1;
|
||||
}
|
||||
else {
|
||||
nlines = readConfig(config, lines, MAX_LINES);
|
||||
if (nlines == -1)
|
||||
return;
|
||||
for (i = 0; i < nlines; i++) {
|
||||
if (!strncmp(lines[i], "USA_RESIDENT", 12)) {
|
||||
free(lines[i]);
|
||||
lines[i] = malloc(21); /* big enough */
|
||||
sprintf(lines[i], "USA_RESIDENT=%s\n", USAResident ? "YES" : "NO");
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((fp = fopen(config, "w")) != NULL) {
|
||||
for (i = 0; i < nlines; i++) {
|
||||
fprintf(fp, "%s", lines[i]);
|
||||
free(lines[i]);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Version of below for dispatch routines */
|
||||
int
|
||||
configRC(dialogMenuItem *unused)
|
||||
|
@ -47,7 +47,6 @@ Boolean RunningAsInit; /* Are we running as init? */
|
||||
Boolean DialogActive; /* Is libdialog initialized? */
|
||||
Boolean ColorDisplay; /* Are we on a color display? */
|
||||
Boolean OnVTY; /* Are we on a VTY? */
|
||||
Boolean USAResident; /* Are we cryptographically challenged? */
|
||||
Variable *VarHead; /* The head of the variable chain */
|
||||
Device *mediaDevice; /* Where we're installing from */
|
||||
int BootMgr; /* Which boot manager we're using */
|
||||
@ -69,5 +68,4 @@ globalsInit(void)
|
||||
VarHead = NULL;
|
||||
mediaDevice = NULL;
|
||||
RunningAsInit = FALSE;
|
||||
USAResident = FALSE;
|
||||
}
|
||||
|
@ -584,43 +584,6 @@ installStandard(dialogMenuItem *self)
|
||||
(void)configLinux(self);
|
||||
#endif
|
||||
|
||||
#ifdef notyet
|
||||
dialog_clear();
|
||||
if (USAResident) {
|
||||
if (!msgYesNo("I see that you are \"USA_RESIDENT\" according to your earlier\n"
|
||||
"response to the CRYPTO distribution dialog. Do you want to try and\n"
|
||||
"load the rsaref package from the current media? Some restrictions on\n"
|
||||
"usage may apply, so be sure to read the package installation output!")) {
|
||||
dialog_clear();
|
||||
_interactiveHack = 1;
|
||||
if (DITEM_STATUS(package_add("rsaref")) != DITEM_SUCCESS) {
|
||||
msgConfirm("Unable to find an rsaref package on the current intallation media.\n"
|
||||
"This is probably because you are installing from a CDROM which\n"
|
||||
"was produced for world-wide use, in which case the RSA patent\n"
|
||||
"prevents distribution of RSA code on CD. Please change your\n"
|
||||
"media device to point to an International FTP server and install\n"
|
||||
"the rsaref package manually through the Packages menu.");
|
||||
}
|
||||
dialog_clear();
|
||||
_interactiveHack = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!msgYesNo("I see that you are not \"USA_RESIDENT\" according to your earlier\n"
|
||||
"response to the CRYPTO distribution dialog. Do you want to try and\n"
|
||||
"load the rsaintl package from the current media?")) {
|
||||
if (DITEM_STATUS(package_add("rsaintl")) != DITEM_SUCCESS) {
|
||||
msgConfirm("Unable to find an rsaintl package on the current intallation media.\n"
|
||||
"This is probably because you are installing from a CDROM which\n"
|
||||
"was produced for use in the USA, in which case the RSA patent\n"
|
||||
"prevents distribution of RSA code on CD. Please change your\n"
|
||||
"media device to point to an International FTP server and install\n"
|
||||
"the rsaintl package manually through the Packages menu.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* notyet */
|
||||
|
||||
dialog_clear_norefresh();
|
||||
if (!msgYesNo("Does this system have a non-USB mouse attached to it?"))
|
||||
dmenuOpenSimple(&MenuMouse, FALSE);
|
||||
@ -1119,7 +1082,6 @@ installEnvironment(void)
|
||||
configEnvironmentRC_conf();
|
||||
if (file_readable("/etc/resolv.conf"))
|
||||
configEnvironmentResolv("/etc/resolv.conf");
|
||||
configMake_conf("/etc/make.conf");
|
||||
}
|
||||
|
||||
/* Copy the boot floppy contents into /stand */
|
||||
|
@ -347,7 +347,6 @@ extern Boolean RunningAsInit; /* Are we running stand-alone? */
|
||||
extern Boolean DialogActive; /* Is the dialog() stuff up? */
|
||||
extern Boolean ColorDisplay; /* Are we on a color display? */
|
||||
extern Boolean OnVTY; /* On a syscons VTY? */
|
||||
Boolean USAResident; /* Are we cryptographically challenged? */
|
||||
extern Variable *VarHead; /* The head of the variable chain */
|
||||
extern Device *mediaDevice; /* Where we're getting our distribution from */
|
||||
extern unsigned int Dists; /* Which distributions we want */
|
||||
@ -429,7 +428,6 @@ extern void command_func_add(char *key, commandFunc func, void *data);
|
||||
extern void configEnvironmentRC_conf(void);
|
||||
extern void configEnvironmentResolv(char *config);
|
||||
extern void configRC_conf(void);
|
||||
extern void configMake_conf(char *config);
|
||||
extern int configFstab(dialogMenuItem *self);
|
||||
extern int configRC(dialogMenuItem *self);
|
||||
extern int configResolv(dialogMenuItem *self);
|
||||
|
@ -364,41 +364,6 @@ configEnvironmentResolv(char *config)
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up the make.conf file */
|
||||
void
|
||||
configMake_conf(char *config)
|
||||
{
|
||||
char *lines[MAX_LINES];
|
||||
int i, nlines;
|
||||
FILE *fp;
|
||||
|
||||
if (!file_readable(config)) {
|
||||
char *line = malloc(21);
|
||||
sprintf(line, "USA_RESIDENT=%s\n", USAResident ? "YES" : "NO");
|
||||
lines[0] = line;
|
||||
nlines = 1;
|
||||
}
|
||||
else {
|
||||
nlines = readConfig(config, lines, MAX_LINES);
|
||||
if (nlines == -1)
|
||||
return;
|
||||
for (i = 0; i < nlines; i++) {
|
||||
if (!strncmp(lines[i], "USA_RESIDENT", 12)) {
|
||||
free(lines[i]);
|
||||
lines[i] = malloc(21); /* big enough */
|
||||
sprintf(lines[i], "USA_RESIDENT=%s\n", USAResident ? "YES" : "NO");
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((fp = fopen(config, "w")) != NULL) {
|
||||
for (i = 0; i < nlines; i++) {
|
||||
fprintf(fp, "%s", lines[i]);
|
||||
free(lines[i]);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Version of below for dispatch routines */
|
||||
int
|
||||
configRC(dialogMenuItem *unused)
|
||||
|
@ -391,21 +391,14 @@ distMaybeSetCRYPTO(dialogMenuItem *self)
|
||||
"If you choose No, FreeBSD will use an MD5-based password scheme which,\n"
|
||||
"while more secure, is not interoperable with the traditional\n"
|
||||
"DES-based passwords used on other Unix systems.\n\n"
|
||||
"Please do NOT choose Yes at this point if you are outside the United\n"
|
||||
"States and Canada and are installing from a U.S. FTP server (installing\n"
|
||||
"from the CD is fine). Instead, install everything but the crypto bits\n"
|
||||
"from the U.S. site and then switch to an international FTP server to\n"
|
||||
"install crypto on a second pass with the Custom Installation option.\n\n"
|
||||
"Note that the international crypto distribution has a better\n"
|
||||
"implementation of the RSA algorithm, which cannot be used in the U.S.\n"
|
||||
"for patent reasons.\n")) {
|
||||
"implementation of the RSA algorithm, which is patented in the U.S.\n"
|
||||
"If you are in the USA, use crypto + the rsaref port/package\n.")) {
|
||||
if (!dmenuOpenSimple(&MenuCRYPTODistributions, FALSE))
|
||||
i = DITEM_FAILURE;
|
||||
}
|
||||
|
||||
dialog_clear_norefresh();
|
||||
USAResident = !msgYesNo("Are you actually resident in the United States?");
|
||||
|
||||
distVerifyFlags();
|
||||
return i | DITEM_REDRAW | DITEM_RESTORE;
|
||||
}
|
||||
|
@ -47,7 +47,6 @@ Boolean RunningAsInit; /* Are we running as init? */
|
||||
Boolean DialogActive; /* Is libdialog initialized? */
|
||||
Boolean ColorDisplay; /* Are we on a color display? */
|
||||
Boolean OnVTY; /* Are we on a VTY? */
|
||||
Boolean USAResident; /* Are we cryptographically challenged? */
|
||||
Variable *VarHead; /* The head of the variable chain */
|
||||
Device *mediaDevice; /* Where we're installing from */
|
||||
int BootMgr; /* Which boot manager we're using */
|
||||
@ -69,5 +68,4 @@ globalsInit(void)
|
||||
VarHead = NULL;
|
||||
mediaDevice = NULL;
|
||||
RunningAsInit = FALSE;
|
||||
USAResident = FALSE;
|
||||
}
|
||||
|
@ -584,43 +584,6 @@ installStandard(dialogMenuItem *self)
|
||||
(void)configLinux(self);
|
||||
#endif
|
||||
|
||||
#ifdef notyet
|
||||
dialog_clear();
|
||||
if (USAResident) {
|
||||
if (!msgYesNo("I see that you are \"USA_RESIDENT\" according to your earlier\n"
|
||||
"response to the CRYPTO distribution dialog. Do you want to try and\n"
|
||||
"load the rsaref package from the current media? Some restrictions on\n"
|
||||
"usage may apply, so be sure to read the package installation output!")) {
|
||||
dialog_clear();
|
||||
_interactiveHack = 1;
|
||||
if (DITEM_STATUS(package_add("rsaref")) != DITEM_SUCCESS) {
|
||||
msgConfirm("Unable to find an rsaref package on the current intallation media.\n"
|
||||
"This is probably because you are installing from a CDROM which\n"
|
||||
"was produced for world-wide use, in which case the RSA patent\n"
|
||||
"prevents distribution of RSA code on CD. Please change your\n"
|
||||
"media device to point to an International FTP server and install\n"
|
||||
"the rsaref package manually through the Packages menu.");
|
||||
}
|
||||
dialog_clear();
|
||||
_interactiveHack = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!msgYesNo("I see that you are not \"USA_RESIDENT\" according to your earlier\n"
|
||||
"response to the CRYPTO distribution dialog. Do you want to try and\n"
|
||||
"load the rsaintl package from the current media?")) {
|
||||
if (DITEM_STATUS(package_add("rsaintl")) != DITEM_SUCCESS) {
|
||||
msgConfirm("Unable to find an rsaintl package on the current intallation media.\n"
|
||||
"This is probably because you are installing from a CDROM which\n"
|
||||
"was produced for use in the USA, in which case the RSA patent\n"
|
||||
"prevents distribution of RSA code on CD. Please change your\n"
|
||||
"media device to point to an International FTP server and install\n"
|
||||
"the rsaintl package manually through the Packages menu.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* notyet */
|
||||
|
||||
dialog_clear_norefresh();
|
||||
if (!msgYesNo("Does this system have a non-USB mouse attached to it?"))
|
||||
dmenuOpenSimple(&MenuMouse, FALSE);
|
||||
@ -1119,7 +1082,6 @@ installEnvironment(void)
|
||||
configEnvironmentRC_conf();
|
||||
if (file_readable("/etc/resolv.conf"))
|
||||
configEnvironmentResolv("/etc/resolv.conf");
|
||||
configMake_conf("/etc/make.conf");
|
||||
}
|
||||
|
||||
/* Copy the boot floppy contents into /stand */
|
||||
|
@ -347,7 +347,6 @@ extern Boolean RunningAsInit; /* Are we running stand-alone? */
|
||||
extern Boolean DialogActive; /* Is the dialog() stuff up? */
|
||||
extern Boolean ColorDisplay; /* Are we on a color display? */
|
||||
extern Boolean OnVTY; /* On a syscons VTY? */
|
||||
Boolean USAResident; /* Are we cryptographically challenged? */
|
||||
extern Variable *VarHead; /* The head of the variable chain */
|
||||
extern Device *mediaDevice; /* Where we're getting our distribution from */
|
||||
extern unsigned int Dists; /* Which distributions we want */
|
||||
@ -429,7 +428,6 @@ extern void command_func_add(char *key, commandFunc func, void *data);
|
||||
extern void configEnvironmentRC_conf(void);
|
||||
extern void configEnvironmentResolv(char *config);
|
||||
extern void configRC_conf(void);
|
||||
extern void configMake_conf(char *config);
|
||||
extern int configFstab(dialogMenuItem *self);
|
||||
extern int configRC(dialogMenuItem *self);
|
||||
extern int configResolv(dialogMenuItem *self);
|
||||
|
Loading…
Reference in New Issue
Block a user