public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MAINTAINERS file addition: Al Viro
@ 2002-05-27  2:59 Rusty Russell
  2002-05-27  4:11 ` Alexander Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Rusty Russell @ 2002-05-27  2:59 UTC (permalink / raw)
  To: torvalds, viro; +Cc: linux-kernel, trivial

I'm sick of searching my mail archives to find that email addr.

Rusty.

diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.18/MAINTAINERS working-2.5.18-viro/MAINTAINERS
--- linux-2.5.18/MAINTAINERS	Sat May 25 14:34:34 2002
+++ working-2.5.18-viro/MAINTAINERS	Mon May 27 12:57:42 2002
@@ -574,6 +574,11 @@
 L:	linux-fsdevel@vger.kernel.org
 S:	Maintained
 
+FILESYSTEMS (VFS and infrastructure)
+P:	Alexander Viro
+M:	viro@math.psu.edu
+S:	Maintained
+
 FPU EMULATOR
 P:	Bill Metzenthen
 M:	billm@suburbia.net

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MAINTAINERS file addition: Al Viro
  2002-05-27  2:59 [PATCH] MAINTAINERS file addition: Al Viro Rusty Russell
@ 2002-05-27  4:11 ` Alexander Viro
  2002-05-27  4:25   ` Larry McVoy
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Viro @ 2002-05-27  4:11 UTC (permalink / raw)
  To: Rusty Russell; +Cc: torvalds, linux-kernel, trivial



On Mon, 27 May 2002, Rusty Russell wrote:

> I'm sick of searching my mail archives to find that email addr.

	Oh, for crying out loud...  Even mail(1) supports aliases - say
echo alias bastard viro@math.psu.edu >> ~/.mailrc and enjoy.  If your
MUA doesn't have aliases/address book/etc. - switch to something sane.
 
> +FILESYSTEMS (VFS and infrastructure)
> +P:	Alexander Viro
> +M:	viro@math.psu.edu
> +S:	Maintained

<shrug> whatever...


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MAINTAINERS file addition: Al Viro
  2002-05-27  4:11 ` Alexander Viro
@ 2002-05-27  4:25   ` Larry McVoy
  0 siblings, 0 replies; 3+ messages in thread
From: Larry McVoy @ 2002-05-27  4:25 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Rusty Russell, torvalds, linux-kernel, trivial

On Mon, May 27, 2002 at 12:11:09AM -0400, Alexander Viro wrote:
> 	Oh, for crying out loud...  Even mail(1) supports aliases - say
> echo alias bastard viro@math.psu.edu >> ~/.mailrc and enjoy.  If your
> MUA doesn't have aliases/address book/etc. - switch to something sane.

I got sick of everything not having this about 15 years ago.  If you 
compile this as cc -o Alias alias.c and then do stuff like

	alias	mutt='Alias mutt'

then it will do the lookup and tell you how it is rewriting the addresses
as you pop into the tool.  

static char *id = "@(#)alias.c 1.2 - main, strsav; mcvoy@rsch.wisc.edu";

/* Alias - provide front end for whatever that loads aliases.
 * Look in ~/.fingerc for aliases.  You could link this to .mailrc.
 *
 * An alias is the regular expression:
 *
 *       ^alias[ <tab>]+name[ <tab>]+full_name
 *
 * and "finger name" gets translated to finger fullname.  Exception: any
 * fullname that contains a "!" is ignored (can't do uucp, only internet).
 *
 * Options: -I ignores the dotfiles; a good way to finger a local john instead
 * of the aliased john.
 *
 * Revisions:
 *  1/May/87: Add support for general machine aliasing as well as people
 * 	aliasing.  A machine alias for seismo is
 *
 *	alias	seismo	@siesmo.css.gov
 *
 * 	and finger foo@seismo will rewrite to foo@seismo.css.gov
 *
 *  5/May/87:  Make this a general interface to any program.  Usage is:
 *	Alias program args
 *
 * and typical usage is
 *
 *	alias	mail	'Alias Mail \!*'
 */

#include      <stdio.h>
#include      <ctype.h>

char   *malloc();
char   *strcpy();
char   *strsav();
char   *index();
char   *PROG;
int     quiet;

main(ac, av, ev)
	char  **av;
	char  **ev;
{
	char    fingerc[255], buf[500], machine[100];
	register i;
	FILE   *f = (FILE *) - 1;

	sprintf(fingerc, "%s/.fingerc", getenv("HOME"));

	/* quiet or noisy? */
	if (!strcmp(av[1], "-Q")) {
		quiet++;
		for (i = 1; i < ac; i++)
			av[i] = av[i + 1];
		--ac;
	}
	/* grab new program name and shift argv down */
	PROG = av[1];
	av[0] = PROG;
	for (i = 1; i < ac; i++)
		av[i] = av[i + 1];
	--ac;

	if (!(f = fopen(fingerc, "r"))) {
		execvp(PROG, av);
		perror(PROG);
	}
	/* stupid alg: scan the file for each av, but there's usually only one. */
	for (i = 1; i < ac; i++) {
		register len = strlen(av[i]);
		register mlen = 0;

		/* optimization: ignore options */
		if (*av[i] == '-')
			continue;

		rewind(f);

		/* grab machine name, it might be an alias */
		if (index(av[i], '@')) {
			strcpy(machine, index(av[i], '@') + 1);
			mlen = strlen(machine);
		} else
			machine[0] = 0;

		while (fgets(buf, sizeof(buf), f)) {
			register char *s;
			register char *t;

			/* chop newline */
			buf[strlen(buf) - 1] = 0;

			/* only aliases, please (sorry alice) */
			if (strncmp(buf, "alias", 5))
				continue;
			for (s = buf + 5; *s && isspace(*s); s++);

			/* match user alias? */
			if (!strncmp(s, av[i], len) && isspace(*(s + len))) {
				s += len;
				for (; *s && isspace(*s); s++);
				/* is it really a user or is it a machine? */
				if (*s == '@')
					s++;
				for (t = s; *t && !isspace(*t); t++);
				if (!index(s, '!')) {
					if (!quiet)
						fprintf(stderr, "%s --> %s\n", av[i], s);
					av[i] = strsav(s);
					break;	/* while, get next i */
				}
			}
			/* match system alias? */
			if (mlen && !strncmp(machine, s, mlen)) {
				char    buf2[200];
				register char *save;

				/* get to @full.name.part */
				s += mlen;
				for (; *s && isspace(*s); s++);
				if (*s++ != '@')
					continue;
				for (t = s; *t && !isspace(*t); t++);
				*t = NULL;

				*(index(av[i], '@') + 1) = NULL;
				sprintf(buf2, "%s%s", av[i], s);
				if (!quiet)
					fprintf(stderr, "%s%s --> %s\n", av[i], machine, buf2);
				av[i] = strsav(buf2);
				break;	/* while, get next i */
			}
		}
	}
	execvp(PROG, av);
	perror(PROG);
}

char   *
strsav(s)
	register char *s;
{
	register char *t = malloc(strlen(s) + 1);

	return strcpy(t, s);
}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-27  4:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-27  2:59 [PATCH] MAINTAINERS file addition: Al Viro Rusty Russell
2002-05-27  4:11 ` Alexander Viro
2002-05-27  4:25   ` Larry McVoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox