Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Aug 1998 09:28:21 -0400 (EDT)
From:      Vince Vielhaber <vev@michvhf.com>
To:        Karl Pielorz <kpielorz@tdx.co.uk>
Cc:        hackers@FreeBSD.ORG
Subject:   RE: getpwuid - after chroot?
Message-ID:  <XFMail.980807092821.vev@michvhf.com>
In-Reply-To: <35CAB3C7.4A6B776D@tdx.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

On 07-Aug-98 Karl Pielorz wrote:
> Hi,
> 
> Is there a workaround for using getpwuid() after you've chroot'd at all? -
> e.g.
> with the code below?
> 
> I think the reason it _doesn't_ work is because once you've chroot'd the
> system
> can't get back to the '/etc/pwd.db' file etc.? - Is there any way round
> this?
> 
> Apparently the following code does actually work on other systems...
> Someone
> mentioned Linux, but I don't have access to any Linux boxes to test it ;-)

I just tried compiling it on HPUX 9.0.  It won't compile due to not
having setpassent.  I compiled it on linux 2.0.24 and running as root
I get this:

second getpwuid(0) didn't work

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null
       # include <std/disclaimers.h>                   TEAM-OS2
   Online Searchable Campground Listings    http://www.camping-usa.com
       "There is no outfit less entitled to lecture me about bloat
               than the federal government"  -- Tony Snow
==========================================================================



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



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