From owner-freebsd-questions Fri Apr 2 4:32:50 1999 Delivered-To: freebsd-questions@freebsd.org Received: from alpha.comkey.com.au (alpha.comkey.com.au [203.9.152.215]) by hub.freebsd.org (Postfix) with SMTP id E71B214E6B for ; Fri, 2 Apr 1999 04:32:44 -0800 (PST) (envelope-from gjb@comkey.com.au) Received: (qmail 14855 invoked by uid 1001); 2 Apr 1999 12:21:46 -0000 Message-ID: <19990402122146.14854.qmail@alpha.comkey.com.au> X-Posted-By: GBA-Post 1.04 06-Feb-1999 X-PGP-Fingerprint: 5A91 6942 8CEA 9DAB B95B C249 1CE1 493B 2B5A CE30 Date: Fri, 02 Apr 1999 22:21:46 +1000 From: Greg Black To: Ben Smithurst Cc: cjclark@home.com, freebsd-questions@FreeBSD.ORG Subject: Re: Manpath strageness References: <199903311514.KAA04065@cc942873-a.ewndsr1.nj.home.com> <19990331202722.7501.qmail@alpha.comkey.com.au> <19990401003008.B94041@scientia.demon.co.uk> In-reply-to: <19990401003008.B94041@scientia.demon.co.uk> of Thu, 01 Apr 1999 00:30:08 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > If that doesn't make things clear, I'd run it under ktrace and see > > what it's doing. > > Unlikely to work. man(1) is setuid, and ktrace doesn't work for setuid > programs[0]. It would trace OK for root, but Crist is having the problem > with non-root users. You could turn off the setuid bit, but then the > situation would have changed. That should be trivial to work around, but FreeBSD's ktrace implementation seems to have a bug, at least in 2.2.8, judging from the check I just performed. In theory, root can trace setuid processes. Therefore, the solution here is just to have root ktrace the shell that the user will use to run the setuid program from, using the -p and -i options to ktrace. However, when I just tried this as root, I got a trace of various non-setuid commands, but no trace into setuid programs. I think this deserves to be fixed, but it's not likely to happen fast enough to solve this particular problem. In the absence of a working ktrace, my next suggestion would be to insert some extra instrumentation into the source to the man command id the output from the -d flag still does not lead to a solution. -- Greg Black To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message