Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Apr 1999 22:21:46 +1000
From:      Greg Black <gjb@comkey.com.au>
To:        Ben Smithurst <ben@scientia.demon.co.uk>
Cc:        cjclark@home.com, freebsd-questions@FreeBSD.ORG
Subject:   Re: Manpath strageness 
Message-ID:  <19990402122146.14854.qmail@alpha.comkey.com.au>
In-Reply-To: <19990401003008.B94041@scientia.demon.co.uk>  of Thu, 01 Apr 1999 00:30:08 %2B0100
References:  <199903311514.KAA04065@cc942873-a.ewndsr1.nj.home.com> <19990331202722.7501.qmail@alpha.comkey.com.au> <19990401003008.B94041@scientia.demon.co.uk> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 <gjb@acm.org>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990402122146.14854.qmail>