From owner-freebsd-current Tue Jan 28 23:16:01 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id XAA15187 for current-outgoing; Tue, 28 Jan 1997 23:16:01 -0800 (PST) Received: from pelican.altadena.net (pas1-pelican.altadena.net [206.126.145.249]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id XAA15163 for ; Tue, 28 Jan 1997 23:15:58 -0800 (PST) Received: from wa6iyh by pelican.altadena.net with uucp (Smail3.1.29.1 #10) id m0vpUFQ-0000RxC; Tue, 28 Jan 97 23:15 PST Received: by wa6iyh.ampr.org (FreeBSD Smail3.1.28.1 #5) id m0vpU7Y-000M5BC; Tue, 28 Jan 97 23:07 WET Message-Id: From: jcc@wa6iyh.ampr.org (Jim Cotillier) Subject: Re: Can't get `.' off of root's path To: current@freebsd.org Date: Tue, 28 Jan 1997 23:07:48 -0800 (PST) Cc: jcc@wa6iyh.ampr.org (Jim Cotillier) In-Reply-To: from "J Wunsch" at Jan 28, 97 11:46:21 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > As Chuck Robey wrote: > > > Perhaps, Joerg, but this is occurring on my newly booted smp machine, with > > roots login, not even using su (on the console). > > That's weird. Are you sure it's not a feature of your shell? Grep > through the login source code, i don't find the word `relative' there. > > -- > cheers, J"org > Yes, it's line 628 in csh.c in the -current tree as of last Saturday... ... /* * i+2 where i is the number of colons in the path. There are i+1 * directories in the path plus we need room for a zero terminator. */ pv = (Char **) xcalloc((size_t) (i + 2), sizeof(Char **)); dp = cp; i = 0; if (*dp) for (;;) { if ((c = *dp) == ':' || c == 0) { *dp = 0; if (*cp != '/' && (euid == 0 || uid == 0) && (intact || intty && isatty(SHOUT))) (void) fprintf(csherr, "Warning: imported path contains relative components\n"); pv[i++] = Strsave(*cp ? cp : STRdot); if (c) { cp = dp + 1; *dp = ':'; } else break; } dp++; } pv[i] = 0; set1(STRpath, pv, &shvhed); } ... This machine is always at -current, built every Saturday night western USA time on the -current tree. csh.c was hit a few weeks ago, and I have been getting this message since then on a straight root login. My root environment is the old vanilla: # $Id: dot.cshrc,v 1.12 1994/10/27 05:26:59 phk Exp $ # ... set path=(/sbin /usr/sbin /bin /usr/bin /usr/local/bin /usr/X11R6/bin) ... I made no changes to any *rc scripts. Just for reference. -JC