From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15443 invoked from network); 30 Apr 2004 13:23:02 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by ns1.primenet.com.au with SMTP; 30 Apr 2004 13:23:02 -0000 Received: (qmail 2991 invoked from network); 30 Apr 2004 13:22:47 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Apr 2004 13:22:47 -0000 Received: (qmail 23240 invoked by alias); 30 Apr 2004 13:22:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19855 Received: (qmail 23218 invoked from network); 30 Apr 2004 13:22:44 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 30 Apr 2004 13:22:41 -0000 Received: (qmail 2781 invoked from network); 30 Apr 2004 13:22:41 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 30 Apr 2004 13:22:37 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-9.tower-36.messagelabs.com!1083331327!5868806 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 31247 invoked from network); 30 Apr 2004 13:22:07 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-9.tower-36.messagelabs.com with SMTP; 30 Apr 2004 13:22:07 -0000 Received: from trentino.logica.co.uk ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id i3UDM7Ob016349; Fri, 30 Apr 2004 14:22:07 +0100 Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id A5D75797A9CF; Fri, 30 Apr 2004 15:21:22 +0200 (CEST) To: zsh-workers@sunsite.dk, 246305@bugs.debian.org X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <20040430122712.GA2985@scowler.net> From: Oliver Kiddle References: <877jw0gzp3.wl@broken.int.wedontsleep.org> <20040428130449.GA3198@scowler.net> <1040428160206.ZM29342@candle.brasslantern.com> <20040430122712.GA2985@scowler.net> Subject: Re: Bug#246305: zsh: completion for sudo doesn't add commands under root's path Date: Fri, 30 Apr 2004 15:21:22 +0200 Message-ID: <17443.1083331282@trentino.logica.co.uk> X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 Clint Adams wrote: > > Well, you could do the equivalent of "strings =sudo | grep sbin:", but > that seems ugly and error-prone. That wouldn't work on my system here. It looks like there is a "SECURE_PATH" compile option to sudo which needs to be enabled before it uses a different path: % PATH=/usr/bin sudo printenv PATH /usr/bin Out of interest, is there any way to run a process detached from the tty? (the above sometimes prompts for a password.) > I have a sneaking suspicion that sudo isn't the only command for which > it would make sense to override the path for _command_names though. If you use a style, give it a generic sounding name then. Perhaps it could be looked up from _command_names instead of _sudo. Keep in mind that people might want to do things like add to the existing path or remove `.'. Oliver