From owner-taylor-uucp@gnu.ai.mit.edu Thu May  7 00:43:54 1992
Status: RO
X-VM-v5-Data: ([nil nil nil t nil nil nil nil nil]
	[nil nil nil nil nil nil nil nil nil nil nil nil "^From:" nil nil nil])
Received: from fuug.fi by dolphin.funet.fi with SMTP id AA28154
  (5.65c/IDA-1.4.3 for ojala); Thu, 7 May 1992 00:42:58 +0300
Received: from churchy.gnu.ai.mit.edu by fuug.fi with SMTP id AA03709
  (5.65c/IDA-1.4.4 for <taylor-uucp-list@fuug.fi>); Thu, 7 May 1992 00:39:32 +0300
Received: by churchy.gnu.ai.mit.edu (5.65/4.0)
	id <AA05575@churchy.gnu.ai.mit.edu>; Wed, 6 May 92 13:47:43 -0400
Received: from relay1.UU.NET by churchy.gnu.ai.mit.edu (5.65/4.0) with SMTP
	id <AA05568@churchy.gnu.ai.mit.edu>; Wed, 6 May 92 13:47:36 -0400
Received: from uunet.uu.net (via LOCALHOST.UU.NET) by relay1.UU.NET with SMTP 
	(5.61/UUNET-internet-primary) id AA16117; Wed, 6 May 92 13:47:39 -0400
Received: from airs.UUCP by uunet.uu.net with UUCP/RMAIL
	(queueing-rmail) id 134627.11660; Wed, 6 May 1992 13:46:27 EDT
Received: by comton.airs.com (5.57/AIRS1.0)
	id AA03673; Wed, 6 May 92 12:57:40 -0400
Message-Id: <9205061657.AA03673@comton.airs.com>
In-Reply-To: <9205061538.AA28391@zigzag.zipcode.com>; from "Bart Schaefer" at May 6, 92 8:38 am
X-Mailer: ELM [version 2.3 PL11]
From: ian@airs.com (Ian Lance Taylor)
To: bart@zigzag.z-code.com
Cc: taylor-uucp@gnu.ai.mit.edu
Subject: Re: Permissions, LOGNAME, and VALIDATE
Date: Wed, 6 May 92 12:57:39 -0400

> Also, please don't forget about the (undocumented) ALIAS entry that John
> Harkin mentioned on this list some weeks ago.

It's in there.  In fact, here's a patch which I already sent to John
Harkin, in case anybody else wants to use ALIAS with BNU_CONFIG.  It's
a simple patch, since the Taylor UUCP configuration files already have
an ``alias'' command.

*** 1.35	1992/04/06 19:49:49
--- bnu.c	1992/04/14 18:33:54
***************
*** 376,381 ****
--- 379,385 ----
    char *zvalidate;
    char *zmyname;
    char *zpubdir;
+   char *zalias;
  } sBperm;
  
  static enum tcmdtabret tbsendfiles P((int argc, char **argv,
***************
*** 396,401 ****
--- 400,406 ----
    { "VALIDATE", CMDTABTYPE_STRING, (pointer) &sBperm.zvalidate, NULL },
    { "MYNAME", CMDTABTYPE_STRING, (pointer) &sBperm.zmyname, NULL },
    { "PUBDIR", CMDTABTYPE_STRING, (pointer) &sBperm.zpubdir, NULL },
+   { "ALIAS", CMDTABTYPE_STRING, (pointer) &sBperm.zalias, NULL },
    { NULL, 0, NULL, NULL }
  };
  
***************
*** 641,646 ****
--- 646,652 ----
  	sBperm.zvalidate = NULL;
  	sBperm.zmyname = NULL;
  	sBperm.zpubdir = NULL;
+ 	sBperm.zalias = NULL;
  
  	fany = FALSE;
  
***************
*** 979,984 ****
--- 985,1016 ----
       calling out or are being called.  */
    if (sBperm.zpubdir != NULL)
      q->zpubdir = sBperm.zpubdir;
+ 
+   if (sBperm.zalias != NULL)
+     {
+       char *zcopy;
+       boolean fend;
+ 
+       zcopy = (char *) alloca (strlen (sBperm.zalias) + 1);
+       strcpy (zcopy, sBperm.zalias);
+       do
+ 	{
+ 	  int c;
+ 
+ 	  c = strcspn (zcopy, ":");
+ 	  fend = zcopy[c] == '\0';
+ 	  zcopy[c] = '\0';
+       
+ 	  z = strstr (q->zalias, zcopy);
+ 	  if (z == NULL
+ 	      || (z != q->zalias && z[-1] != ' ')
+ 	      || (z[c] != ' ' && z[c] != '\0'))
+ 	    uadd_string (&q->zalias, zcopy, ' ');
+ 
+ 	  zcopy += c + 1;
+ 	}
+       while (! fend);
+     }
  }
  
  /* Handle SENDFILES=string, where string can be YES, NO or CALL.  We

-- 
Ian Lance Taylor                ian@airs.com                uunet!airs!ian
First person to identify this quote wins a free e-mail message:
``They were all-but forgotten people: the breed that was remembered with a
  start, or with the unreality of a recrudescent dream.''

