From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#865: 23.0.60; The directory is unsafe today Date: Fri, 05 Sep 2008 13:32:12 +0300 Message-ID: References: <48BD642C.5050405@gmail.com> <48BD74D5.4050800@gnu.org> <48BDD155.8060005@gnu.org> <48BF2171.8040101@gnu.org> <48C0654B.2010007@gnu.org> Reply-To: Eli Zaretskii , 865@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1220611675 28231 80.91.229.12 (5 Sep 2008 10:47:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Sep 2008 10:47:55 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, flitterio@gmail.com To: Jason Rumney , 865@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 05 12:48:50 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KbYrv-0001Q2-Bc for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Sep 2008 12:48:47 +0200 Original-Received: from localhost ([127.0.0.1]:35471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbYqv-00022R-Bs for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Sep 2008 06:47:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbYqo-0001wq-T3 for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2008 06:47:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbYqm-0001r2-2q for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2008 06:47:37 -0400 Original-Received: from [199.232.76.173] (port=34119 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbYql-0001qG-FM for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2008 06:47:35 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:57451) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KbYqk-0001l3-Ob for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2008 06:47:35 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85AlVqq017891; Fri, 5 Sep 2008 03:47:32 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m85Ae6Fd015014; Fri, 5 Sep 2008 03:40:06 -0700 X-Loop: don@donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 05 Sep 2008 10:40:06 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 865 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122061079412954 (code B ref -1); Fri, 05 Sep 2008 10:40:06 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 10:33:14 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85AXAQe012906 for ; Fri, 5 Sep 2008 03:33:12 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbYco-0006dp-0u for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2008 06:33:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbYcn-0006dY-4q for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2008 06:33:09 -0400 Original-Received: from [199.232.76.173] (port=43415 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbYcm-0006dP-JR for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2008 06:33:08 -0400 Original-Received: from mtaout7.012.net.il ([84.95.2.19]:28716) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KbYci-0007MF-Bx; Fri, 05 Sep 2008 06:33:04 -0400 Original-Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6P005X2XATT1B0@i-mtaout7.012.net.il>; Fri, 05 Sep 2008 13:33:07 +0300 (IDT) In-reply-to: <48C0654B.2010007@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?) X-CrossAssassin-Score: 2 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Fri, 05 Sep 2008 06:47:36 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20191 Archived-At: > Date: Fri, 05 Sep 2008 06:46:35 +0800 > From: Jason Rumney > Cc: > > Under Windows, where the owner can be a group, if the current user is a > member of the group that owns a file, then they effectively own that > file, and Emacs should report that to avoid problems with Lisp code that > is trying to test ownership. How about solving this the other way around: if the current user is a member of the Administators group, Emacs on Windows will return that group's ID (544) as user-uid of such a user? Specifically, my suggestion is the following API change: user-uid is a built-in function in `C source code'. (user-uid &optional real-id) Return the effective UID of the user who runs this Emacs session. Value is an integer or float, depending on the value. On MS-Windows, if the user belongs to the "Administrators" group, that group's ID is returned instead of the user's ID. This is to match MS-Windows policy to attribute ownership of files created by such users to the Administrators group. If REAL-ID is non-nil, return the real UID of the user even if it belongs to the Administrators group.