Date: Sat, 08 Aug 1998 11:19:04 +0100 From: Karl Pielorz <kpielorz@tdx.co.uk> To: Vince Vielhaber <vev@michvhf.com> Cc: hackers@FreeBSD.ORG Subject: Re: getpwuid - after chroot? Message-ID: <35CC2618.3F8AE5@tdx.co.uk> References: <XFMail.980807092821.vev@michvhf.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Vince Vielhaber wrote: > 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 Apparently the code does work on NetBSD, OpenBSD and BSDI - but not FreeBSD... The first call to 'setpassent(1)' is meant to go to the start of the password database, and keep the file open... On the other BSD's (verified by the program author, not myself) it works, This is because once you've chroot'd you can still use calls to getpwent etc. - as you opened the file (and got the descriptor) before you chroot'd. On FreeBSD this doesn't happen... I'm not saying their behaviour is right, and ours is wrong - I'm just wondering which is better (i.e. to make FreeBSD do the same as the others - or to adjust the offending program accordingly (i.e. a workaround etc.))? Regards, Karl 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?35CC2618.3F8AE5>