--- pgp/src/fileio.c 2018/04/24 16:43:30 1.1.1.6 +++ pgp/src/fileio.c 2018/04/24 16:44:32 1.1.1.7 @@ -1210,21 +1210,38 @@ void cleanup_tmpf(void) * * Why all this code? * - * Some dimwits have been distributing versions of PGP (especially on MS-DOS) - * without the manuals. This frustrates users (who call Philip Zimmermann - * at all hours of the day and night), and in addition to depriving them - * of instructions on how to operate the program, also deprives them of - * IMPORTANT legal notices. This is a Bad Thing, so we've gone to the - * trouble of being fascist and *forcing* the manuals to be there. + * Some people may object to PGP insisting on finding the manual somewhere + * in the neighborhood to generate a key. They bristle against this + * seemingly authoritarian attitude. Some people have even modified PGP + * to defeat this feature, and redistributed their hotwired version to + * others. That creates problems for me (PRZ). + * + * Here is the problem. Before I added this feature, there were maimed + * versions of the PGP distribution package floating around that lacked + * the manual. One of them was uploaded to Compuserve, and was + * distributed to countless users who called me on the phone to ask me why + * such a complicated program had no manual. It spread out to BBS systems + * around the country. And a freeware distributor got hold of the package + * from Compuserve and enshrined it on CD-ROM, distributing thousands of + * copies without the manual. What a mess. + * + * Please don't make my life harder by modifying PGP to disable this + * feature so that others may redistribute PGP without the manual. If you + * run PGP on a palmtop with no memory for the manual, is it too much to + * ask that you type one little extra word on the command line to do a key + * generation, a command that is seldom used by people who already know + * how to use PGP? If you can't stand even this trivial inconvenience, + * can you suggest a better method of reducing PGP's distribution without + * the manual? */ + static unsigned ext_missing(char *prefix) { static char const *const extensions[] = - { #ifdef VMS - ".doc", ".txt", ".man", ".tex", ".", 0}; + { ".doc", ".txt", ".man", ".tex", ".", 0 }; #else - ".doc", ".txt", ".man", ".tex", "", 0}; + { ".doc", ".txt", ".man", ".tex", "", 0 }; #endif char const *const *p; char *end = prefix + strlen(prefix); @@ -1251,8 +1268,14 @@ static unsigned files_missing(char *pref unsigned bit, mask = 3; int len = strlen(prefix); +#ifndef VMS + /* + * Optimization: if directory doesn't exist, stop. But access() + * (used internally by file_exists()) doesn't work on dirs under VMS. + */ if (prefix[0] && !file_exists(prefix)) /* Directory doesn't exist? */ return mask; +#endif /* VMS */ if (len && strchr(DIRSEPS, prefix[len - 1]) == 0) prefix[len++] = DIRSEPS[0]; for (p = names, bit = 1; *p; p++, bit <<= 1) { @@ -1338,17 +1361,18 @@ static int expand_env(char const *src, c char const *const manual_dirs[] = { #if defined(VMS) - "$PGPPATH", "", "[pgp]", "[pgp26]", + "$PGPPATH", "", "[pgp]", "[pgp26]", "[pgp262]", PGP_SYSTEM_DIR, "SYS$LOGIN:", "SYS$LOGIN:[pgp]", - "SYS$LOGIN:[pgp26]", "[-]", + "SYS$LOGIN:[pgp26]", "SYS$LOGIN:[pgp262]", "[-]", #elif defined(UNIX) - "$PGPPATH", "", "pgp", "pgp26", PGP_SYSTEM_DIR, + "$PGPPATH", "", "pgp", "pgp26", "pgp262", PGP_SYSTEM_DIR, "$HOME/.pgp", "$HOME", "$HOME/pgp", "$HOME/pgp26", "..", #elif defined(AMIGA) - "$PGPPATH", "", "pgp", "pgp26", ":pgp", ":pgp26", ":", "/", + "$PGPPATH", "", "pgp", "pgp26", ":pgp", ":pgp26", ":pgp262", + ":", "/", #else /* MSDOS or ATARI */ - "$PGPPATH", "", "pgp", "pgp26", "\\pgp", "\\pgp26", "\\", "..", - "c:\\pgp", "c:\\pgp26", + "$PGPPATH", "", "pgp", "pgp26", "\\pgp", "\\pgp26", "\\pgp262", + "\\", "..", "c:\\pgp", "c:\\pgp26", #endif 0}; @@ -1372,10 +1396,5 @@ unsigned manuals_missing(void) /* * Why all this code? * - * Some dimwits have been distributing versions of PGP (especially on MS-DOS) - * without the manuals. This frustrates users (who call Philip Zimmermann - * at all hours of the day and night), and in addition to depriving them - * of instructions on how to operate the program, also deprives them of - * IMPORTANT legal notices. This is a Bad Thing, so we've gone to the - * trouble of being fascist and *forcing* the manuals to be there. + * See block of comments above. */