From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Bad configure check Date: Fri, 26 Apr 2002 23:07:02 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <1019762483.19662.20.camel@space-ghost> <200204261738.g3QHchK05159@aztec.santafe.edu> <1019849328.1086.7.camel@space-ghost> <1019850275.10153.9.camel@space-ghost> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1019855368 24488 127.0.0.1 (26 Apr 2002 21:09:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 26 Apr 2002 21:09:28 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 171Cy8-0006Mr-00 for ; Fri, 26 Apr 2002 23:09:28 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 171D0w-0002qg-00 for ; Fri, 26 Apr 2002 23:12:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 171Cy1-0001pw-00; Fri, 26 Apr 2002 17:09:21 -0400 Original-Received: from ns.suse.de ([213.95.15.193] helo=Cantor.suse.de) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 171Cvp-0001kK-00 for ; Fri, 26 Apr 2002 17:07:06 -0400 Original-Received: from Hermes.suse.de (Charybdis.suse.de [213.95.15.201]) by Cantor.suse.de (Postfix) with ESMTP id 387AE1EB63; Fri, 26 Apr 2002 23:07:05 +0200 (MEST) X-Authentication-Warning: sykes.suse.de: schwab set sender to schwab@suse.de using -f Original-To: Colin Walters X-Yow: On the road, ZIPPY is a pinhead without a purpose, but never without a POINT. In-Reply-To: <1019850275.10153.9.camel@space-ghost> (Colin Walters's message of "26 Apr 2002 15:44:35 -0400") Original-Lines: 22 User-Agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3325 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3325 Colin Walters writes: |> Can anyone suggest a portable way to determine whether or not a program |> is setuid while it's running? My original thought was to compare the |> return values of getuid() and geteuid(), but it seems this will fail if |> root runs Emacs. Does it? Even root should obey setuid to a different user. And experiments show that this is the case. # ls -l /tmp/id -rwsr-sr-x 1 games game 107165 Apr 15 17:28 /tmp/id # /tmp/id uid=0(root) gid=0(root) euid=12(games) egid=40(game) groups=0(root),1(bin),14(uucp),15(shadow),16(dialout),17(audio),65534(nogroup),65533(nobody),52(dbmaker) Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."