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:
Jordan K. Hubbard 2000-07-24 18:00:16 +00:00
parent 6d57c73f9c
commit cf07fd263a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63804
14 changed files with 4 additions and 249 deletions

View file

@ -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)

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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 */

View file

@ -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);

View file

@ -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)

View file

@ -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;
}

View file

@ -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 */

View file

@ -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);

View file

@ -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)

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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 */

View file

@ -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);