From owner-freebsd-hackers Fri Aug 7 06:28:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA04939 for freebsd-hackers-outgoing; Fri, 7 Aug 1998 06:28:20 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id GAA04933 for ; Fri, 7 Aug 1998 06:28:18 -0700 (PDT) (envelope-from vev@paprika.michvhf.com) Received: (qmail 3383 invoked by uid 1000); 7 Aug 1998 13:28:21 -0000 Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <35CAB3C7.4A6B776D@tdx.co.uk> Date: Fri, 07 Aug 1998 09:28:21 -0400 (EDT) From: Vince Vielhaber To: Karl Pielorz Subject: RE: getpwuid - after chroot? Cc: hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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