From owner-freebsd-current Sun Dec 7 07:45:26 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA04297 for current-outgoing; Sun, 7 Dec 1997 07:45:26 -0800 (PST) (envelope-from owner-freebsd-current) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id HAA04292 for ; Sun, 7 Dec 1997 07:45:18 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id CAA04419; Mon, 8 Dec 1997 02:42:42 +1100 Date: Mon, 8 Dec 1997 02:42:42 +1100 From: Bruce Evans Message-Id: <199712071542.CAA04419@godzilla.zeta.org.au> To: brian@awfulhak.org, evanc@synapse.net Subject: Re: _POSIX_SAVED_IDS Cc: freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Here's a problem for you: on systems where I have a saved-set seteuid(), I >would prefer to use it instead of a setreuid() swap. How do I tell if I >have a saved-set seteuid() if _POSIX_SAVED_IDS is not defined (besides >running a setuid test program -- I'd prefer something that autoconf could >figure out on its own)? Same as if _POSIX_SAVED_IDS is defined - it has nothing to do with seteuid(), since setreuid() is not in POSIX. If you can't run a setuid program, then you'll have to read all the man pages, and maybe the system sources, and maybe the kernel binary - a difficult task for autoconf :-). I think you should depend on running a setuid test program. If the program can be trusted at runtime, it can probably be trusted at build time. Bruce