From: Ken Hornstein Date: Fri, 18 Apr 2014 14:57:27 +0000 (-0400) Subject: Remove support for a "*" in alias files (which would add everyone in X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/0815d3444144959a66b8fd8e97258158cabd07b5 Remove support for a "*" in alias files (which would add everyone in the password file to the alias). --- diff --git a/docs/pending-release-notes b/docs/pending-release-notes index f4f47358..d5337f47 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -12,6 +12,8 @@ OBSOLETE FEATURES - conflict(8) was deprecated in nmh 1.6, and was removed in this release. - mhtest(8) was deprecated in nmh 1.6, and was removed in this release. - msh(1) was deprecated in nmh 1.6, and was removed in this release. +- Support in alias files for the the "*" address-group (everyone) was + deprecated in nmh 1.6, and was removed in this release. ------------------- DEPRECATED FEATURES diff --git a/h/aliasbr.h b/h/aliasbr.h index f9400265..482378ed 100644 --- a/h/aliasbr.h +++ b/h/aliasbr.h @@ -5,9 +5,6 @@ */ extern char *AliasFile; /* mh-alias(5) */ -#define PASSWD "/etc/passwd" /* passwd(5) */ -#define GROUP "/etc/group" /* group(5) */ -#define EVERYONE 200 /* lowest uid for everyone */ struct aka { char *ak_name; /* name to match against */ @@ -52,8 +49,3 @@ char *akerror (int); #define AK_ERROR 2 /* error parsing file */ #define AK_LIMIT 3 /* memory limit exceeded */ #define AK_NOGROUP 4 /* no such group */ - -/* should live here, not in mts.c */ - -extern int Everyone; -extern char *NoShell; diff --git a/h/mts.h b/h/mts.h index b425e242..14266d24 100644 --- a/h/mts.h +++ b/h/mts.h @@ -63,9 +63,3 @@ extern char *pophost; * Global MailDelivery File */ extern char *maildelivery; - -/* - * Aliasing Facility (doesn't belong here) - */ -extern int Everyone; -extern char *NoShell; diff --git a/man/mh-alias.man b/man/mh-alias.man index dcb6e212..ad047c31 100644 --- a/man/mh-alias.man +++ b/man/mh-alias.man @@ -44,7 +44,6 @@ where: .RI " | < " file .RI " | = " UNIX\-group .RI " | + " UNIX\-group - | * .IR address\-list " := " address .RI " | " address\-list ", " address @@ -98,16 +97,6 @@ added to the .I address\-list for the alias. .PP -If the -.I address\-group -is simply \*(lq*\*(rq, the system's password database -is consulted and all login names with a userid -greater than some magic number (usually 200) are added to the -.I address\-list -for the alias. -.B -This feature is obsolescent and will be removed in a future release. -.PP In match, a trailing \*(lq*\*(rq on an alias will match just about anything appropriate. .PP diff --git a/man/mh-tailor.man b/man/mh-tailor.man index 2a69c58a..38154acd 100644 --- a/man/mh-tailor.man +++ b/man/mh-tailor.man @@ -203,21 +203,6 @@ See .IR slocal (1) for the details. .RE -.PP -.BR everyone : -200 -.RS 5 -The highest user-id which should NOT receive mail addressed to -\*(lqeveryone\*(rq. -.RE -.PP -.BR noshell : -.RS 5 -If set, then each user-id greater than \*(lqeveryone\*(rq that has a -login shell equivalent to the given value (e.g., \*(lq/bin/csh\*(rq) -indicates that mail for \*(lqeveryone\*(rq should not be sent to them. -This is useful for handling admin, dummy, and guest logins. -.RE .SS "SMTP support" This option is only available if you set .B mts diff --git a/sbr/mts.c b/sbr/mts.c index 4a44c442..99851d92 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -78,13 +78,6 @@ char *pophost = ""; char *maildelivery = nmhetcdir(/maildelivery); -/* - * Aliasing Facility (doesn't belong here) - */ -int Everyone = NOTOK; -static char *everyone = "-1"; -char *NoShell = ""; - /* * Customize the MTS settings for nmh by adjusting * the file mts.conf in the nmh etc directory. @@ -113,8 +106,6 @@ static struct bind binds[] = { { "pophost", &pophost }, { "maildelivery", &maildelivery }, - { "everyone", &everyone }, - { "noshell", &NoShell }, { NULL, NULL } }; @@ -163,8 +154,6 @@ mts_init (char *name) fclose (fp); } - Everyone = atoi (everyone); - save_mts_method (mts_method); } diff --git a/uip/aliasbr.c b/uip/aliasbr.c index 6600f741..0f6b1909 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -41,7 +41,6 @@ static char *seekp (char *, char *, char **); static int addfile (struct aka *, char *); static int addgroup (struct aka *, char *); static int addmember (struct aka *, char *); -static int addall (struct aka *); static char *getalias (char *); static void add_aka (struct aka *, char *); static struct aka *akalloc (char *); @@ -271,10 +270,6 @@ alias (char *file) } break; - case '*': /* Everyone */ - addall (ak); - break; - default: /* list */ while ((cp = getalias (pp))) add_aka (ak, cp); @@ -439,26 +434,6 @@ addmember (struct aka *ak, char *grp) } -static int -addall (struct aka *ak) -{ - int noshell = NoShell == NULL || *NoShell == 0; - register struct home *hm; - - init_pw (); - - if (Everyone < 0) - Everyone = EVERYONE; - - for (hm = homehead; hm; hm = hm->h_next) - if ((int) hm->h_uid > Everyone - && (noshell || strcmp (hm->h_shell, NoShell))) - add_aka (ak, hm->h_name); - - return homehead != NULL; -} - - static char * getalias (char *addrs) {