From owner-freebsd-hackers Fri Aug 7 07:20:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA11689 for freebsd-hackers-outgoing; Fri, 7 Aug 1998 07:20:20 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from bright.ny.otec.com (bright.ny.otec.com [209.3.16.125]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA11684 for ; Fri, 7 Aug 1998 07:20:18 -0700 (PDT) (envelope-from bright@hotjobs.com) Received: from localhost (bright@localhost) by bright.ny.otec.com (8.8.8/8.8.8) with SMTP id KAA29776; Fri, 7 Aug 1998 10:20:53 -0500 (EST) (envelope-from bright@hotjobs.com) X-Authentication-Warning: bright.ny.otec.com: bright owned process doing -bs Date: Fri, 7 Aug 1998 10:20:53 -0500 (EST) From: Alfred Perlstein X-Sender: bright@bright.ny.otec.com To: Vince Vielhaber cc: hackers@FreeBSD.ORG Subject: RE: getpwuid - after chroot? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG pipe, fork, chroot. client/server might be a hack but it'll work. -Alfred Perlstein -- Programmer @ HotJobs Inc. [- http://www.hotjobs.com/ -] |-- There are operating systems, and then there's BSD. \-- http://www.freebsd.org/ On Fri, 7 Aug 1998, Vince Vielhaber wrote: > > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message