From owner-freebsd-current Sat Dec 6 14:44:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA20543 for current-outgoing; Sat, 6 Dec 1997 14:44:18 -0800 (PST) (envelope-from owner-freebsd-current) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA20527 for ; Sat, 6 Dec 1997 14:44:02 -0800 (PST) (envelope-from brian@awfulhak.org) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.demon.co.uk (8.8.7/8.8.7) with ESMTP id VAA00144; Sat, 6 Dec 1997 21:54:02 GMT (envelope-from brian@gate.lan.awfulhak.org) Message-Id: <199712062154.VAA00144@awfulhak.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: Evan Champion cc: freebsd-current@freebsd.org Subject: Re: _POSIX_SAVED_IDS In-reply-to: Your message of "Sat, 06 Dec 1997 10:11:35 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 06 Dec 1997 21:54:01 +0000 From: Brian Somers Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I was compiling a program (Kerberos 5) on BSD/OS a couple days ago and > found that I was running in to trouble because BSDI's setreuid() doesn't > work very well (it seems that once you get to root, you can't switch to > another user), so just for kicks I decided to go compare the BSDI > setreuid() with the one from FreeBSD. > > Anyway, along the way I found that kern/kern_prot.c seems to be fully > loaded with #ifdefs for _POSIX_SAVED_IDS, but _POSIX_SAVED_IDS is not > defined by default. > > Is it just because not everything is up to handling a saved-id setuid()? AFAIK, setreuid() doesn't use saved ids - setreuid() should only be used to swap your euid and uid. Disclaimer - this is an assumption, I may be wrong. However, seteuid() works ok for me (/usr/src/usr.sbin/ppp/id.c), which implies that saved uids are functional. > Evan > -- Brian , , Don't _EVER_ lose your sense of humour....