GNU bug report logs - #865
23.0.60; The directory is unsafe today

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>; merged with #3281, #4197, #8787; dated Tue, 2 Sep 2008 16:10:05 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 865 <at> debbugs.gnu.org:


Received: (at 865) by debbugs.gnu.org; 21 Oct 2017 19:56:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 21 15:56:32 2017
Received: from localhost ([127.0.0.1]:54631 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1e5zsm-0008Fm-1G
	for submit <at> debbugs.gnu.org; Sat, 21 Oct 2017 15:56:32 -0400
Received: from mail-io0-f172.google.com ([209.85.223.172]:52208)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1e5zsk-0008FX-AN
 for 865 <at> debbugs.gnu.org; Sat, 21 Oct 2017 15:56:30 -0400
Received: by mail-io0-f172.google.com with SMTP id b186so16442745iof.8
 for <865 <at> debbugs.gnu.org>; Sat, 21 Oct 2017 12:56:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=zJ7Ie2YN4fGZkeSKnnvuLK9BHw65BfioQIn5qTuC9zE=;
 b=R2ZWnlnUdmYoEsSR+wcerfsaAZlejPTNSoOQZwenuzS20Sj9ptmU7MklcjSOzLxReM
 MqQ+Qs1jIVs5U+gzdFTs35AS8bKoDR5HXSRpOiCF0tjlqouIiHLYzjagNiQc+LZLkC57
 vobq1NgMbp+GwwgvAPe6ngRo9irybpApFA77BqNoDo3xtPqS2JvemD4fN5qWeOhqeTke
 6yI1RKK2UDRMrAJehSw43spG/8ieNFhBlSlAN+Nfe8yw3J8+GYADyI+bbLP6Rfx0lqUE
 W8VRg8ML+Yu/Z0tLNv1T4oVMMUImXjVgjnM46dFJOG2qDF2JKydD0f+kzYP2W2rfqqv8
 5D6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=zJ7Ie2YN4fGZkeSKnnvuLK9BHw65BfioQIn5qTuC9zE=;
 b=ANynZ12jgyiN6oddlMX8KLZitTELoiBuboL8sVocXHvUAXwDMC6y0cg4nUHdSSVxxI
 zsBk3wmVCuYh39MAKEzsWQqEyL5UQLu/PFXiNpIlmMQvJiAvAk42xAVg11K1G8L0M31g
 xdMqs4jNSsNa4TTaIl9j5b9/27x37bFDMujaVu6hi0uD38uHygro+/3MBq2J1ZUAxK0y
 TBuPBwsAzos9qzmQ3xO5VJT6oOlUdfyHKeCrX8fgFlZH5nW3fMDnbsSCRG5KBQLdVINB
 b7UXBhGYeLMklXzbvRisEijfGwQepyyYsYW0HexOzBVEdEK1zfpTKnyMyDc8b3FYQU06
 IliA==
X-Gm-Message-State: AMCzsaVaUhDiJXRRsz4ueoXMK9d8OGnZEx8x0mqvRLRAJsIO8g/sdjr6
 hbduVNMLytRzhYzBJ0NoR3eF0Q==
X-Google-Smtp-Source: ABhQp+QmMaQzIH9EfWSdrMt72bDKXVXTEPuZg8kAbUNPjGVoJr5t5UqEfZn/4aAMN2/ZookC7ewy5w==
X-Received: by 10.107.141.136 with SMTP id p130mr12100481iod.195.1508615784442; 
 Sat, 21 Oct 2017 12:56:24 -0700 (PDT)
Received: from zebian ([45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id t70sm1581969ioi.72.2017.10.21.12.56.23
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 21 Oct 2017 12:56:23 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <87r2uvlrfy.fsf@HIDDEN>
Date: Sat, 21 Oct 2017 15:56:22 -0400
In-Reply-To: <87r2uvlrfy.fsf@HIDDEN> (Noam Postavsky's message
 of "Sun, 24 Sep 2017 17:25:37 -0400")
Message-ID: <87efpwe0m1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 865
Cc: 865 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

Noam Postavsky <npostavs@HIDDEN> writes:

> +                     (format "it is not owned by you (owner = %s (%d))"
> +                             (user-full-name (user-uid)) (user-uid)))

Oops, I put the wrong uid there.  Fixed in [1: d719ea6ad5].

> +      (when unsafe
> +        (error "`%s' is not a safe directory because %s" dir unsafe)))))

I also added aa call to expand-file-name here, as I recently saw a
case[2] where there was some confusion about which directory
"~/.emacs.d/server" refered to.

[1: d719ea6ad5]: 2017-10-21 15:19:14 -0400
  Another fix for unsafe directory error message (Bug#865)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d719ea6ad5419bba2b376384c370dc2744dc718f

[2]: https://github.com/magit/with-editor/issues/41




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#865; Package emacs. Full text available.

Message received at 865 <at> debbugs.gnu.org:


Received: (at 865) by debbugs.gnu.org; 24 Sep 2017 21:25:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 24 17:25:47 2017
Received: from localhost ([127.0.0.1]:56647 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dwEPK-0004EK-Qs
	for submit <at> debbugs.gnu.org; Sun, 24 Sep 2017 17:25:47 -0400
Received: from mail-io0-f171.google.com ([209.85.223.171]:56383)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1dwEPJ-0004E7-39
 for 865 <at> debbugs.gnu.org; Sun, 24 Sep 2017 17:25:45 -0400
Received: by mail-io0-f171.google.com with SMTP id m103so8183885iod.13
 for <865 <at> debbugs.gnu.org>; Sun, 24 Sep 2017 14:25:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=2GSac+M5bEalxSbfihea+NAWp9QlkDElXPDv3DH4+B4=;
 b=Qq2GIqK01oKudaq/bPFn2FEh5LyEVn+9vIIT24bO02BJeb+TKSMuKTfl9z4YC7RJxk
 0c4UgsOQgqBWJEwbfRUETlpinf5GefU0rMdoZFFynZYHjR2k1YSbuFy+aj5QIONgJr+W
 aVFZ7DmNeV/LYtP1cRdCA/ILVJj85/9WPV6RkKGfpnZ84L6I0WvrecvrwIZeSLhwR4f0
 SwbEeqp5ywaqB7ByG4xHaYyxeUxO24sktkrEEqypvG0VMfD6GzFsbRjmXdoIn6V8XrF3
 81Ru+7EFoBbMxpJXGqrVf33+XWY5iN1yvOXmZELlvG6W9wW30EqZ7FQHhyBTEG3KeW3S
 zhlg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=2GSac+M5bEalxSbfihea+NAWp9QlkDElXPDv3DH4+B4=;
 b=YBUDlJjcC6TTf6RZ1EOr1j3RFcRIPL1ykGu9AbKgSeH6Rcq/PwBkokISSAmq8I/Ard
 RzTt8RQqKq8TVd2MEVnNMqBTDSNwoWVRnxbO1K0OoHrRBENn8UCYd2aZvRpXNqsJlw1x
 UxsCIsPZM5HoWnazXh+auLp3vGsCGlqzHZW8ED3h7B0LC6UsZCahYhE8CjbUYEi8DTLA
 WkGvj+NvNDlKuBj1tvkow6bxGAdNf1C9QzIlyhq3CoXvaxi7Ntuz+eihoH7xWJSNSwXo
 dIO1O0xSY08HPVGHCENyfvFfjAIU/5RQC2h4/kkRQfmJA0eV/gPS28sftRkXxzCaVnSG
 iQfw==
X-Gm-Message-State: AHPjjUjyUv2tqsCh3ffdM0nhC1bS5vS5SVQEBEh11rTxNtMokbc8tA2n
 yzJy0IBXEszVNGKD/GEwLXp/bw==
X-Google-Smtp-Source: AOwi7QAiWwGG3s8Muc7RZ+eG1qqb4zzTtlmf2W5MQvSAZIu+ZI6n+GpdxOWOCSrXMhhCTlJtvRluWA==
X-Received: by 10.107.181.138 with SMTP id e132mr7312944iof.53.1506288339343; 
 Sun, 24 Sep 2017 14:25:39 -0700 (PDT)
Received: from zebian ([45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id y63sm193485itc.44.2017.09.24.14.25.38
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sun, 24 Sep 2017 14:25:38 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN>
Date: Sun, 24 Sep 2017 17:25:37 -0400
In-Reply-To: <48BD642C.5050405@HIDDEN> (Lennart Borgman's message of "Tue, 
 02 Sep 2008 18:05:00 +0200")
Message-ID: <87r2uvlrfy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 865
Cc: 865 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

--=-=-=
Content-Type: text/plain

"Lennart Borgman (gmail)" <lennart.borgman@HIDDEN> writes:

> server-ensure-safe-dir complained today during server-start. Examining
> the values in server-ensure-safe-dir I found the following:

I don't know how to solve this bug, but I recently handled a similar bug
report from a macOS user[1] (still open, it's intermittent so very slow
to track down) and I found the error message rather unhelpful.  I'll
push the following to emacs-26 in a few days if there are no objections.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Make-unsafe-directory-error-message-more-informative.patch
Content-Description: patch

From b8e526e3861e64115f1458b2e53c2c0a838eb25d Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@HIDDEN>
Date: Sun, 27 Aug 2017 23:09:32 -0400
Subject: [PATCH] Make "unsafe directory" error message more informative
 (Bug#865)

* lisp/server.el (server-ensure-safe-dir): Produce a description for
each "unsafe" condition.
---
 lisp/server.el | 47 ++++++++++++++++++++++++++---------------------
 1 file changed, 26 insertions(+), 21 deletions(-)

diff --git a/lisp/server.el b/lisp/server.el
index 8aafa1c257..33800a9868 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -525,30 +525,35 @@ server-ensure-safe-dir
     ;; Check that it's safe for use.
     (let* ((uid (nth 2 attrs))
 	   (w32 (eq system-type 'windows-nt))
-	   (safe (cond
-		  ((not (eq t (car attrs))) nil)  ; is a dir?
-		  ((and w32 (zerop uid))	  ; on FAT32?
-		   (display-warning
-		    'server
-		    (format-message "\
+           (unsafe (cond
+                    ((not (eq t (car attrs)))
+                     (format "it is a %s" (if (stringp (car attrs))
+                                              "symlink" "file")))
+                    ((and w32 (zerop uid)) ; on FAT32?
+                     (display-warning
+                      'server
+                      (format-message "\
 Using `%s' to store Emacs-server authentication files.
 Directories on FAT32 filesystems are NOT secure against tampering.
 See variable `server-auth-dir' for details."
-			    (file-name-as-directory dir))
-		    :warning)
-		   t)
-		  ((and (/= uid (user-uid))	  ; is the dir ours?
-			(or (not w32)
-			    ;; Files created on Windows by Administrator
-			    ;; (RID=500) have the Administrators (RID=544)
-			    ;; group recorded as the owner.
-			    (/= uid 544) (/= (user-uid) 500)))
-		   nil)
-		  (w32 t)			  ; on NTFS?
-		  (t				  ; else, check permissions
-		   (zerop (logand ?\077 (file-modes dir)))))))
-      (unless safe
-	(error "The directory `%s' is unsafe" dir)))))
+                                      (file-name-as-directory dir))
+                      :warning)
+                     nil)
+                    ((and (/= uid (user-uid)) ; is the dir ours?
+                          (or (not w32)
+                              ;; Files created on Windows by Administrator
+                              ;; (RID=500) have the Administrators (RID=544)
+                              ;; group recorded as the owner.
+                              (/= uid 544) (/= (user-uid) 500)))
+                     (format "it is not owned by you (owner = %s (%d))"
+                             (user-full-name (user-uid)) (user-uid)))
+                    (w32 nil)           ; on NTFS?
+                    ((/= 0 (logand ?\077 (file-modes dir)))
+                     (format "it is accessible by others (%03o)"
+                             (file-modes dir)))
+                    (t nil))))
+      (when unsafe
+        (error "`%s' is not a safe directory because %s" dir unsafe)))))
 
 (defun server-generate-key ()
   "Generate and return a random authentication key.
-- 
2.11.0


--=-=-=
Content-Type: text/plain


[1]: https://github.com/magit/magit/issues/3148

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#865; Package emacs. Full text available.
Merged 865 3281 4197 8787. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Merged 865 3281 4197. Request was from Eli Zaretskii <eliz@HIDDEN> to control@HIDDEN. Full text available.
bug reassigned from package `emacs' to `emacs,w32'. Request was from Glenn Morris <rgm+emacsbugs@HIDDEN> to control@HIDDEN. Full text available.
Merged 865 3281. Request was from Chong Yidong <cyd@HIDDEN> to control@HIDDEN. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 10 Sep 2008 16:32:52 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8AGWkxh014532
	for <865@HIDDEN>; Wed, 10 Sep 2008 09:32:47 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhwGACSTx0hFxIqP/2dsb2JhbACBZbcdgWSBBg
X-IronPort-AV: E=Sophos;i="4.32,373,1217822400"; 
   d="scan'208";a="26616407"
Received: from 69-196-138-143.dsl.teksavvy.com (HELO pastel.home) ([69.196.138.143])
  by ironport2-out.teksavvy.com with ESMTP; 10 Sep 2008 12:32:40 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 81F4A85E5; Wed, 10 Sep 2008 12:32:40 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvod2wezi3.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <uy7297vtc.fsf@HIDDEN>
	<uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
	<uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN>
	<u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
	<jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
	<uabejerg4.fsf@HIDDEN>
	<jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
	<umyiicsdz.fsf@HIDDEN>
	<jwvbpyxgzh7.fsf-monnier+emacsbugreports@HIDDEN>
	<uhc8pcfsu.fsf@HIDDEN>
Date: Wed, 10 Sep 2008 12:32:40 -0400
In-Reply-To: <uhc8pcfsu.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 09 Sep
	2008 21:52:49 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-CrossAssassin-Score: 2

>> > But I don't think we should dismiss the privacy issue just because it
>> > can be bypassed by an ill meaning program: the same can happen on
>> > Unix, given a program that deliberately gains root access.  "Normal"
>> > programs don't use those special access flags and privileges, and so
>> > cannot access files in a private directory.
>> 
>> Huh?  Those programs that can deliberately gain root access are kept
>> under very tight control.  For a normal user to be able to read
>> arbitrary files on the system is considered as a major security hole on
>> unixy systems (even if she has to go through contortions to do that).

> I'm not going to argue about merits and demerits of Unix vs Windows
> wrt security.  My point was that using a private directory in
> server.el is important on Windows even if you think its security level
> is lower than that of Unix systems.

I don't think it is, actually, so we violently agree.

> And I hoped that you'd provide some guidance for implementing this
> on Windows.

As mentioned, ideally the Emacs C code should notice when
default-file-modes is #o700 that the files&dirs should be created
"private", whatever that means in the w32 world.
Even better would be if each individual file-modes bits were interpreted,
but handling #o700 is all we really need for now.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 10 Sep 2008 16:32:57 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8AGWr7o014540
	for <submit@HIDDEN>; Wed, 10 Sep 2008 09:32:54 -0700
Received: from mx10.gnu.org ([199.232.76.166]:59261)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1KdSav-0000eq-CA
	for emacs-pretest-bug@HIDDEN; Wed, 10 Sep 2008 12:31:05 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KdScZ-0007YC-H8
	for emacs-pretest-bug@HIDDEN; Wed, 10 Sep 2008 12:32:51 -0400
Received: from ironport2-out.pppoe.ca ([206.248.154.182]:52133 helo=ironport2-out.teksavvy.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KdScU-0007Wr-FY; Wed, 10 Sep 2008 12:32:42 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhwGACSTx0hFxIqP/2dsb2JhbACBZbcdgWSBBg
X-IronPort-AV: E=Sophos;i="4.32,373,1217822400"; 
   d="scan'208";a="26616407"
Received: from 69-196-138-143.dsl.teksavvy.com (HELO pastel.home) ([69.196.138.143])
  by ironport2-out.teksavvy.com with ESMTP; 10 Sep 2008 12:32:40 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 81F4A85E5; Wed, 10 Sep 2008 12:32:40 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvod2wezi3.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <uy7297vtc.fsf@HIDDEN>
	<uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
	<uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN>
	<u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
	<jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
	<uabejerg4.fsf@HIDDEN>
	<jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
	<umyiicsdz.fsf@HIDDEN>
	<jwvbpyxgzh7.fsf-monnier+emacsbugreports@HIDDEN>
	<uhc8pcfsu.fsf@HIDDEN>
Date: Wed, 10 Sep 2008 12:32:40 -0400
In-Reply-To: <uhc8pcfsu.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 09 Sep
	2008 21:52:49 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.

>> > But I don't think we should dismiss the privacy issue just because it
>> > can be bypassed by an ill meaning program: the same can happen on
>> > Unix, given a program that deliberately gains root access.  "Normal"
>> > programs don't use those special access flags and privileges, and so
>> > cannot access files in a private directory.
>> 
>> Huh?  Those programs that can deliberately gain root access are kept
>> under very tight control.  For a normal user to be able to read
>> arbitrary files on the system is considered as a major security hole on
>> unixy systems (even if she has to go through contortions to do that).

> I'm not going to argue about merits and demerits of Unix vs Windows
> wrt security.  My point was that using a private directory in
> server.el is important on Windows even if you think its security level
> is lower than that of Unix systems.

I don't think it is, actually, so we violently agree.

> And I hoped that you'd provide some guidance for implementing this
> on Windows.

As mentioned, ideally the Emacs C code should notice when
default-file-modes is #o700 that the files&dirs should be created
"private", whatever that means in the w32 world.
Even better would be if each individual file-modes bits were interpreted,
but handling #o700 is all we really need for now.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_NIX1 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 9 Sep 2008 18:53:01 +0000
Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m89IqvCg008246
	for <865@HIDDEN>; Tue, 9 Sep 2008 11:52:58 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6X002VXZ5CFAO2@i_mtaout3.012.net.il> for 865@HIDDEN; Tue, 09 Sep 2008 21:53:37 +0300 (IDT)
Date: Tue, 09 Sep 2008 21:52:49 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvbpyxgzh7.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uhc8pcfsu.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN> <ubpz1dkfy.fsf@HIDDEN> <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN> <uabejerg4.fsf@HIDDEN> <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN> <umyiicsdz.fsf@HIDDEN> <jwvbpyxgzh7.fsf-monnier+emacsbugreports@HIDDEN>

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Tue, 09 Sep 2008 10:37:57 -0400
> 
> > But I don't think we should dismiss the privacy issue just because it
> > can be bypassed by an ill meaning program: the same can happen on
> > Unix, given a program that deliberately gains root access.  "Normal"
> > programs don't use those special access flags and privileges, and so
> > cannot access files in a private directory.
> 
> Huh?  Those programs that can deliberately gain root access are kept
> under very tight control.  For a normal user to be able to read
> arbitrary files on the system is considered as a major security hole on
> unixy systems (even if she has to go through contortions to do that).

I'm not going to argue about merits and demerits of Unix vs Windows
wrt security.  My point was that using a private directory in
server.el is important on Windows even if you think its security level
is lower than that of Unix systems.  And I hoped that you'd provide
some guidance for implementing this on Windows.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 9 Sep 2008 18:54:17 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m89IsCrn008369
	for <submit@HIDDEN>; Tue, 9 Sep 2008 11:54:13 -0700
Received: from mx10.gnu.org ([199.232.76.166]:37952)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1Kd8K9-0000Re-L3
	for emacs-pretest-bug@HIDDEN; Tue, 09 Sep 2008 14:52:25 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kd8Kc-0001GE-7w
	for emacs-pretest-bug@HIDDEN; Tue, 09 Sep 2008 14:52:59 -0400
Received: from mtaout3.012.net.il ([84.95.2.7]:30236)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kd8Kb-0001FW-Gt; Tue, 09 Sep 2008 14:52:53 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6X002VXZ5CFAO2@i_mtaout3.012.net.il>; Tue, 09 Sep 2008 21:53:37 +0300 (IDT)
Date: Tue, 09 Sep 2008 21:52:49 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvbpyxgzh7.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uhc8pcfsu.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN> <ubpz1dkfy.fsf@HIDDEN> <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN> <uabejerg4.fsf@HIDDEN> <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN> <umyiicsdz.fsf@HIDDEN> <jwvbpyxgzh7.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1
X-CrossAssassin-Score: 2

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Tue, 09 Sep 2008 10:37:57 -0400
> 
> > But I don't think we should dismiss the privacy issue just because it
> > can be bypassed by an ill meaning program: the same can happen on
> > Unix, given a program that deliberately gains root access.  "Normal"
> > programs don't use those special access flags and privileges, and so
> > cannot access files in a private directory.
> 
> Huh?  Those programs that can deliberately gain root access are kept
> under very tight control.  For a normal user to be able to read
> arbitrary files on the system is considered as a major security hole on
> unixy systems (even if she has to go through contortions to do that).

I'm not going to argue about merits and demerits of Unix vs Windows
wrt security.  My point was that using a private directory in
server.el is important on Windows even if you think its security level
is lower than that of Unix systems.  And I hoped that you'd provide
some guidance for implementing this on Windows.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,BAYES_00,DA_MS_ADDRESS,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 9 Sep 2008 14:38:11 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m89Ec3Do015866
	for <865@HIDDEN>; Tue, 9 Sep 2008 07:38:04 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AsAEALEmxkhFxIqP/2dsb2JhbACBZbRXgWSBBw
X-IronPort-AV: E=Sophos;i="4.32,365,1217822400"; 
   d="scan'208";a="26559357"
Received: from 69-196-138-143.dsl.teksavvy.com (HELO pastel.home) ([69.196.138.143])
  by ironport2-out.teksavvy.com with ESMTP; 09 Sep 2008 10:37:58 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id DAF0E54279; Tue,  9 Sep 2008 10:37:57 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvbpyxgzh7.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <ubpz68ifg.fsf@HIDDEN>
	<48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN>
	<uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
	<uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN>
	<u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
	<jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
	<uabejerg4.fsf@HIDDEN>
	<jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
	<umyiicsdz.fsf@HIDDEN>
Date: Tue, 09 Sep 2008 10:37:57 -0400
In-Reply-To: <umyiicsdz.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 08 Sep
	2008 23:08:40 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> Not exactly: most programs don't use these special flags, and some of
> them seem to require special privileges, although I'm not quite sure
> who can gain those privileges.  (A small test program confirmed that I
> can gain them, even though I'm not in the Administrators group.)

> See:

>   http://msdn.microsoft.com/en-us/library/aa364399(VS.85).aspx

> for more details.

> But I don't think we should dismiss the privacy issue just because it
> can be bypassed by an ill meaning program: the same can happen on
> Unix, given a program that deliberately gains root access.  "Normal"
> programs don't use those special access flags and privileges, and so
> cannot access files in a private directory.

Huh?  Those programs that can deliberately gain root access are kept
under very tight control.  For a normal user to be able to read
arbitrary files on the system is considered as a major security hole on
unixy systems (even if she has to go through contortions to do that).


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.5 required=4.0 tests=AWL,BAYES_00,DA_MS_ADDRESS,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 9 Sep 2008 14:38:17 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m89EcBMQ015874
	for <submit@HIDDEN>; Tue, 9 Sep 2008 07:38:12 -0700
Received: from mx10.gnu.org ([199.232.76.166]:46020)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1Kd4KP-00075o-7U
	for emacs-pretest-bug@HIDDEN; Tue, 09 Sep 2008 10:36:25 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1Kd4M2-0004vy-75
	for emacs-pretest-bug@HIDDEN; Tue, 09 Sep 2008 10:38:10 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:27614)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1Kd4Lv-0004sv-7H; Tue, 09 Sep 2008 10:37:59 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AsAEALEmxkhFxIqP/2dsb2JhbACBZbRXgWSBBw
X-IronPort-AV: E=Sophos;i="4.32,365,1217822400"; 
   d="scan'208";a="26559357"
Received: from 69-196-138-143.dsl.teksavvy.com (HELO pastel.home) ([69.196.138.143])
  by ironport2-out.teksavvy.com with ESMTP; 09 Sep 2008 10:37:58 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id DAF0E54279; Tue,  9 Sep 2008 10:37:57 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvbpyxgzh7.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <ubpz68ifg.fsf@HIDDEN>
	<48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN>
	<uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
	<uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN>
	<u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
	<jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
	<uabejerg4.fsf@HIDDEN>
	<jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
	<umyiicsdz.fsf@HIDDEN>
Date: Tue, 09 Sep 2008 10:37:57 -0400
In-Reply-To: <umyiicsdz.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 08 Sep
	2008 23:08:40 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

> Not exactly: most programs don't use these special flags, and some of
> them seem to require special privileges, although I'm not quite sure
> who can gain those privileges.  (A small test program confirmed that I
> can gain them, even though I'm not in the Administrators group.)

> See:

>   http://msdn.microsoft.com/en-us/library/aa364399(VS.85).aspx

> for more details.

> But I don't think we should dismiss the privacy issue just because it
> can be bypassed by an ill meaning program: the same can happen on
> Unix, given a program that deliberately gains root access.  "Normal"
> programs don't use those special access flags and privileges, and so
> cannot access files in a private directory.

Huh?  Those programs that can deliberately gain root access are kept
under very tight control.  For a normal user to be able to read
arbitrary files on the system is considered as a major security hole on
unixy systems (even if she has to go through contortions to do that).


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.6 required=4.0 tests=AWL,BAYES_00,DA_MS_ADDRESS,
	FOURLA,HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 8 Sep 2008 20:22:51 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m88KMlTi019895
	for <submit@HIDDEN>; Mon, 8 Sep 2008 13:22:48 -0700
Received: from mx10.gnu.org ([199.232.76.166]:38298)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KcnEL-0000nz-Rg
	for emacs-pretest-bug@HIDDEN; Mon, 08 Sep 2008 16:21:02 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kcn2j-00012q-27
	for emacs-pretest-bug@HIDDEN; Mon, 08 Sep 2008 16:09:06 -0400
Received: from mtaout2.012.net.il ([84.95.2.4]:9001)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kcn2i-000112-50; Mon, 08 Sep 2008 16:09:00 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6W00E5N7ZRSUG2@i_mtaout2.012.net.il>; Mon, 08 Sep 2008 23:09:28 +0300 (IDT)
Date: Mon, 08 Sep 2008 23:08:40 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <umyiicsdz.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN> <ubpz1dkfy.fsf@HIDDEN> <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN> <uabejerg4.fsf@HIDDEN> <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1
X-CrossAssassin-Score: 2

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Sun, 07 Sep 2008 23:33:28 -0400
> 
> > This is impossible on Windows, AFAIK.  There are special flags to the
> > syscall that opens a file or directory that can bypass any denied
> > rights to enter a directory or open a file.  (These flags allegedly
> > exist so that system backup and restore programs could DTRT without
> > running as a privileged user.)
> 
> Are you saying that anybody can read any file (or dir) simply by using
> those extra flags when they open those files and dirs?  So there's no
> possible privacy between users on the same machine?  If so, we may just
> stop to worry about server-ensure-safe-dir under w32 since there's
> simply no way for it to be safe (short of encrypting it, which implies
> a fairly different UI).

Not exactly: most programs don't use these special flags, and some of
them seem to require special privileges, although I'm not quite sure
who can gain those privileges.  (A small test program confirmed that I
can gain them, even though I'm not in the Administrators group.)

See:

  http://msdn.microsoft.com/en-us/library/aa364399(VS.85).aspx

for more details.

But I don't think we should dismiss the privacy issue just because it
can be bypassed by an ill meaning program: the same can happen on
Unix, given a program that deliberately gains root access.  "Normal"
programs don't use those special access flags and privileges, and so
cannot access files in a private directory.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,DA_MS_ADDRESS,
	FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 8 Sep 2008 20:08:52 +0000
Received: from mtaout2.012.net.il (mtaout2.012.net.il [84.95.2.4])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m88K8llb014947
	for <865@HIDDEN>; Mon, 8 Sep 2008 13:08:49 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6W00E5N7ZRSUG2@i_mtaout2.012.net.il> for 865@HIDDEN; Mon, 08 Sep 2008 23:09:28 +0300 (IDT)
Date: Mon, 08 Sep 2008 23:08:40 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <umyiicsdz.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN> <ubpz1dkfy.fsf@HIDDEN> <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN> <uabejerg4.fsf@HIDDEN> <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Sun, 07 Sep 2008 23:33:28 -0400
> 
> > This is impossible on Windows, AFAIK.  There are special flags to the
> > syscall that opens a file or directory that can bypass any denied
> > rights to enter a directory or open a file.  (These flags allegedly
> > exist so that system backup and restore programs could DTRT without
> > running as a privileged user.)
> 
> Are you saying that anybody can read any file (or dir) simply by using
> those extra flags when they open those files and dirs?  So there's no
> possible privacy between users on the same machine?  If so, we may just
> stop to worry about server-ensure-safe-dir under w32 since there's
> simply no way for it to be safe (short of encrypting it, which implies
> a fairly different UI).

Not exactly: most programs don't use these special flags, and some of
them seem to require special privileges, although I'm not quite sure
who can gain those privileges.  (A small test program confirmed that I
can gain them, even though I'm not in the Administrators group.)

See:

  http://msdn.microsoft.com/en-us/library/aa364399(VS.85).aspx

for more details.

But I don't think we should dismiss the privacy issue just because it
can be bypassed by an ill meaning program: the same can happen on
Unix, given a program that deliberately gains root access.  "Normal"
programs don't use those special access flags and privileges, and so
cannot access files in a private directory.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 8 Sep 2008 11:26:10 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m88BQ0Cq020605
	for <865@HIDDEN>; Mon, 8 Sep 2008 04:26:03 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvgEAGyoxEhFxIqP/2dsb2JhbACBZbJugWaBBw
X-IronPort-AV: E=Sophos;i="4.32,358,1217822400"; 
   d="scan'208";a="26503948"
Received: from 69-196-138-143.dsl.teksavvy.com (HELO ceviche.home) ([69.196.138.143])
  by ironport2-out.teksavvy.com with ESMTP; 08 Sep 2008 07:25:54 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 538C6B4062; Mon,  8 Sep 2008 07:25:54 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Jason Rumney <jasonr@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 865 <at> debbugs.gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvvdx6vq0o.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <ubpz68ifg.fsf@HIDDEN>
	<48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN>
	<uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
	<uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN>
	<u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
	<jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
	<uabejerg4.fsf@HIDDEN>
	<jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
	<48C49E9C.8090907@HIDDEN>
Date: Mon, 08 Sep 2008 07:25:54 -0400
In-Reply-To: <48C49E9C.8090907@HIDDEN> (Jason Rumney's message of "Mon, 08
	Sep 2008 11:40:12 +0800")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> I don't know the full details of NTFS security, but there is a special group
> called "Backup Users", which I would expect to be linked with the use of
> these flags somehow.

Then it's OK.  Unix has similar features, but they don't matter for
server.el's purpose.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.4 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,SPF_HELO_PASS autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 8 Sep 2008 03:41:06 +0000
Received: from mk-outboundfilter-4.mail.uk.tiscali.com (mk-outboundfilter-4.mail.uk.tiscali.com [212.74.114.32])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m883f3wT019825
	for <865@HIDDEN>; Sun, 7 Sep 2008 20:41:04 -0700
X-Trace: 133468614/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/61.4.103.130
X-SBRS: None
X-RemoteIP: 61.4.103.130
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhEBAPk7xEg9BGeC/2dsb2JhbAAIrGSFAIFm
X-IronPort-AV: E=Sophos;i="4.32,355,1217804400"; 
   d="scan'208";a="133468614"
X-IP-Direction: OUT
Received: from unknown (HELO [10.1.1.112]) ([61.4.103.130])
  by smtp.f2s.tiscali.co.uk with ESMTP; 08 Sep 2008 04:40:54 +0100
Message-ID: <48C49E9C.8090907@HIDDEN>
Date: Mon, 08 Sep 2008 11:40:12 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Stefan Monnier <monnier@HIDDEN>
CC: Eli Zaretskii <eliz@HIDDEN>, 865 <at> debbugs.gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>	<u8wu6kgoz.fsf@HIDDEN>	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>	<u63pak4p2.fsf@HIDDEN>	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>	<uy725iwer.fsf@HIDDEN>	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>	<ubpz1dkfy.fsf@HIDDEN>	<jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>	<uabejerg4.fsf@HIDDEN> <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
In-Reply-To: <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Stefan Monnier wrote:
>> This is impossible on Windows, AFAIK.  There are special flags to the
>> syscall that opens a file or directory that can bypass any denied
>> rights to enter a directory or open a file.  (These flags allegedly
>> exist so that system backup and restore programs could DTRT without
>> running as a privileged user.)
>>     
>
> Are you saying that anybody can read any file (or dir) simply by using
> those extra flags when they open those files and dirs?  So there's no
> possible privacy between users on the same machine?  If so, we may just
> stop to worry about server-ensure-safe-dir under w32 since there's
> simply no way for it to be safe (short of encrypting it, which implies
> a fairly different UI).
>   

I don't know the full details of NTFS security, but there is a special 
group called "Backup Users", which I would expect to be linked with the 
use of these flags somehow.





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 8 Sep 2008 03:33:39 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m883XXsG016603
	for <865@HIDDEN>; Sun, 7 Sep 2008 20:33:37 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvAEAHw6xEhFxIqP/2dsb2JhbACBZbADgWaBBw
X-IronPort-AV: E=Sophos;i="4.32,355,1217822400"; 
   d="scan'208";a="26497211"
Received: from 69-196-138-143.dsl.teksavvy.com (HELO pastel.home) ([69.196.138.143])
  by ironport2-out.teksavvy.com with ESMTP; 07 Sep 2008 23:33:28 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 2BED57FDB; Sun,  7 Sep 2008 23:33:28 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
	<jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
	<uabejerg4.fsf@HIDDEN>
Date: Sun, 07 Sep 2008 23:33:28 -0400
In-Reply-To: <uabejerg4.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 07 Sep
	2008 21:33:47 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> This is impossible on Windows, AFAIK.  There are special flags to the
> syscall that opens a file or directory that can bypass any denied
> rights to enter a directory or open a file.  (These flags allegedly
> exist so that system backup and restore programs could DTRT without
> running as a privileged user.)

Are you saying that anybody can read any file (or dir) simply by using
those extra flags when they open those files and dirs?  So there's no
possible privacy between users on the same machine?  If so, we may just
stop to worry about server-ensure-safe-dir under w32 since there's
simply no way for it to be safe (short of encrypting it, which implies
a fairly different UI).


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 8 Sep 2008 03:33:43 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m883XdNV016702
	for <submit@HIDDEN>; Sun, 7 Sep 2008 20:33:40 -0700
Received: from mx10.gnu.org ([199.232.76.166]:55806)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1KcXTn-0005Eg-6D
	for emacs-pretest-bug@HIDDEN; Sun, 07 Sep 2008 23:31:55 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KcXVO-0008MK-Um
	for emacs-pretest-bug@HIDDEN; Sun, 07 Sep 2008 23:33:38 -0400
Received: from ironport2-out.pppoe.ca ([206.248.154.182]:55364 helo=ironport2-out.teksavvy.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KcXVJ-0008K9-NF; Sun, 07 Sep 2008 23:33:29 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvAEAHw6xEhFxIqP/2dsb2JhbACBZbADgWaBBw
X-IronPort-AV: E=Sophos;i="4.32,355,1217822400"; 
   d="scan'208";a="26497211"
Received: from 69-196-138-143.dsl.teksavvy.com (HELO pastel.home) ([69.196.138.143])
  by ironport2-out.teksavvy.com with ESMTP; 07 Sep 2008 23:33:28 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 2BED57FDB; Sun,  7 Sep 2008 23:33:28 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwv4p4rl3eo.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
	<jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
	<uabejerg4.fsf@HIDDEN>
Date: Sun, 07 Sep 2008 23:33:28 -0400
In-Reply-To: <uabejerg4.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 07 Sep
	2008 21:33:47 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

> This is impossible on Windows, AFAIK.  There are special flags to the
> syscall that opens a file or directory that can bypass any denied
> rights to enter a directory or open a file.  (These flags allegedly
> exist so that system backup and restore programs could DTRT without
> running as a privileged user.)

Are you saying that anybody can read any file (or dir) simply by using
those extra flags when they open those files and dirs?  So there's no
possible privacy between users on the same machine?  If so, we may just
stop to worry about server-ensure-safe-dir under w32 since there's
simply no way for it to be safe (short of encrypting it, which implies
a fairly different UI).


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 7 Sep 2008 18:42:16 +0000
Received: from mtaout5.012.net.il (mtaout5.012.net.il [84.95.2.13])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87IgCjN025030
	for <865@HIDDEN>; Sun, 7 Sep 2008 11:42:13 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6U001T899HZO00@i_mtaout5.012.net.il> for 865@HIDDEN; Sun, 07 Sep 2008 21:41:42 +0300 (IDT)
Date: Sun, 07 Sep 2008 21:41:01 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i6prngufc5.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u8wu3er42.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN> <ubpz1dkfy.fsf@HIDDEN> <mailman.18638.1220760463.18990.bug-gnu-emacs@HIDDEN> <i5i6prngufc5.fsf@HIDDEN>
X-CrossAssassin-Score: 2

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Sun, 07 Sep 2008 11:44:50 -0400
> Cc: 
> 
> Would it be acceptable for Emacs on Windows to change the ownership of
> any file it creates to be the user running Emacs, and then set the ACLs
> such that the creating user is the only user with rights to the file?

Do you really mean to do that for _any_ file created by Emacs?  That's
hardly appropriate: do we really want that no one else could access
the files we create with Emacs?  Not even the Unix version does that,
unless default-file-modes say we should.

This discussion was only about the directory used by the Emacs server,
and any files in that directory.  I don't think anyone meant we should
do this for every file Emacs creates.

If you meant to suggest a way of doing this just for that single
directory, then yes, this is what we were discussing.  If you can
propose code to do that, please do.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 7 Sep 2008 18:42:12 +0000
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 m87Ig9xT025031
	for <submit@HIDDEN>; Sun, 7 Sep 2008 11:42:10 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KcPD7-0002N5-0K
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 14:42:09 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KcPD5-0002Mc-Qs
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 14:42:08 -0400
Received: from [199.232.76.173] (port=54849 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KcPD5-0002MZ-Jm
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 14:42:07 -0400
Received: from mtaout5.012.net.il ([84.95.2.13]:57514)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KcPD5-0005DZ-9S
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 14:42:07 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6U001T899HZO00@i_mtaout5.012.net.il> for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 21:41:42 +0300 (IDT)
Date: Sun, 07 Sep 2008 21:41:01 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i6prngufc5.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u8wu3er42.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN> <ubpz1dkfy.fsf@HIDDEN> <mailman.18638.1220760463.18990.bug-gnu-emacs@HIDDEN> <i5i6prngufc5.fsf@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Sun, 07 Sep 2008 11:44:50 -0400
> Cc: 
> 
> Would it be acceptable for Emacs on Windows to change the ownership of
> any file it creates to be the user running Emacs, and then set the ACLs
> such that the creating user is the only user with rights to the file?

Do you really mean to do that for _any_ file created by Emacs?  That's
hardly appropriate: do we really want that no one else could access
the files we create with Emacs?  Not even the Unix version does that,
unless default-file-modes say we should.

This discussion was only about the directory used by the Emacs server,
and any files in that directory.  I don't think anyone meant we should
do this for every file Emacs creates.

If you meant to suggest a way of doing this just for that single
directory, then yes, this is what we were discussing.  If you can
propose code to do that, please do.





Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 7 Sep 2008 18:33:54 +0000
Received: from mtaout1.012.net.il (mtaout1.012.net.il [84.95.2.1])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87IXoun021793
	for <865@HIDDEN>; Sun, 7 Sep 2008 11:33:51 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6U006EO8XG8A40@HIDDEN> for 865@HIDDEN; Sun, 07 Sep 2008 21:34:29 +0300 (IDT)
Date: Sun, 07 Sep 2008 21:33:47 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uabejerg4.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN> <ubpz1dkfy.fsf@HIDDEN> <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Sat, 06 Sep 2008 23:43:52 -0400
> 
> > The MS-Windows access right set is richer than just Read,
> > Write, Execute.
> 
> That doesn't really matter, the point is that nobody but the creating
> user should have any right.

This is impossible on Windows, AFAIK.  There are special flags to the
syscall that opens a file or directory that can bypass any denied
rights to enter a directory or open a file.  (These flags allegedly
exist so that system backup and restore programs could DTRT without
running as a privileged user.)

So, if we are to emulate this special value of mode-bits on Windows,
we need to decide exactly what rights we need to deny.

Or maybe a better implementation for Windows would be to create
encrypted files.  Or maybe something else entirely; that's why I was
asking questions about the semantics of this.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.0 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 7 Sep 2008 18:33:55 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87IXoE1021795
	for <submit@HIDDEN>; Sun, 7 Sep 2008 11:33:52 -0700
Received: from mail.gnu.org ([199.232.76.166]:39664 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KcP3O-00083j-Q3
	for emacs-pretest-bug@HIDDEN; Sun, 07 Sep 2008 14:32:06 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KcP4y-0004DG-V4
	for emacs-pretest-bug@HIDDEN; Sun, 07 Sep 2008 14:33:49 -0400
Received: from mtaout1.012.net.il ([84.95.2.1]:48590)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KcP4y-0004Cp-Fc; Sun, 07 Sep 2008 14:33:44 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6U006EO8XG8A40@HIDDEN>; Sun, 07 Sep 2008 21:34:29 +0300 (IDT)
Date: Sun, 07 Sep 2008 21:33:47 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uabejerg4.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN> <ubpz1dkfy.fsf@HIDDEN> <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1
X-CrossAssassin-Score: 2

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Sat, 06 Sep 2008 23:43:52 -0400
> 
> > The MS-Windows access right set is richer than just Read,
> > Write, Execute.
> 
> That doesn't really matter, the point is that nobody but the creating
> user should have any right.

This is impossible on Windows, AFAIK.  There are special flags to the
syscall that opens a file or directory that can bypass any denied
rights to enter a directory or open a file.  (These flags allegedly
exist so that system backup and restore programs could DTRT without
running as a privileged user.)

So, if we are to emulate this special value of mode-bits on Windows,
we need to decide exactly what rights we need to deny.

Or maybe a better implementation for Windows would be to create
encrypted files.  Or maybe something else entirely; that's why I was
asking questions about the semantics of this.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 7 Sep 2008 17:37:05 +0000
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87Hb1XQ002256
	for <865@HIDDEN>; Sun, 7 Sep 2008 10:37:02 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:63995 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KcOC4-0001wU-52; Sun, 07 Sep 2008 19:37:00 +0200
Message-ID: <48C41133.90608@HIDDEN>
Date: Sun, 07 Sep 2008 19:36:51 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
CC: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>	<u8wu6kgoz.fsf@HIDDEN>	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>	<u63pak4p2.fsf@HIDDEN>	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>	<uy725iwer.fsf@HIDDEN>	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>	<ubpz1dkfy.fsf@HIDDEN>	<mailman.18638.1220760463.18990.bug-gnu-emacs@HIDDEN> <i5i6prngufc5.fsf@HIDDEN>
In-Reply-To: <i5i6prngufc5.fsf@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080907-0, 2008-09-07), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1KcOC4-0001wU-52.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KcOC4-0001wU-52 932aa33e7a695134579c5dbd333645bb

Francis Litterio wrote:
> Stefan Monnier wrote:
> 
>>> The MS-Windows access right set is richer than just Read,
>>> Write, Execute.
>> That doesn't really matter, the point is that nobody but the creating
>> user should have any right.
> 
> Would it be acceptable for Emacs on Windows to change the ownership of
> any file it creates to be the user running Emacs, and then set the ACLs
> such that the creating user is the only user with rights to the file?


I think that is what Stefan means.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 7 Sep 2008 17:37:07 +0000
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 m87Hb4m9002292
	for <submit@HIDDEN>; Sun, 7 Sep 2008 10:37:05 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KcOC8-0006i4-37
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 13:37:04 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KcOC7-0006gP-3w
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 13:37:03 -0400
Received: from [199.232.76.173] (port=33527 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KcOC7-0006gG-0F
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 13:37:03 -0400
Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:37171)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KcOC6-0002tY-HN
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 13:37:02 -0400
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:63995 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KcOC4-0001wU-52; Sun, 07 Sep 2008 19:37:00 +0200
Message-ID: <48C41133.90608@HIDDEN>
Date: Sun, 07 Sep 2008 19:36:51 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
CC: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>	<u8wu6kgoz.fsf@HIDDEN>	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>	<u63pak4p2.fsf@HIDDEN>	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>	<uy725iwer.fsf@HIDDEN>	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>	<ubpz1dkfy.fsf@HIDDEN>	<mailman.18638.1220760463.18990.bug-gnu-emacs@HIDDEN> <i5i6prngufc5.fsf@HIDDEN>
In-Reply-To: <i5i6prngufc5.fsf@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080907-0, 2008-09-07), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1KcOC4-0001wU-52.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KcOC4-0001wU-52 932aa33e7a695134579c5dbd333645bb
X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!)
X-CrossAssassin-Score: 2

Francis Litterio wrote:
> Stefan Monnier wrote:
> 
>>> The MS-Windows access right set is richer than just Read,
>>> Write, Execute.
>> That doesn't really matter, the point is that nobody but the creating
>> user should have any right.
> 
> Would it be acceptable for Emacs on Windows to change the ownership of
> any file it creates to be the user running Emacs, and then set the ACLs
> such that the creating user is the only user with rights to the file?


I think that is what Stefan means.





Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 7 Sep 2008 15:50:17 +0000
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 m87FoEL2029576
	for <submit@HIDDEN>; Sun, 7 Sep 2008 08:50:15 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KcMWk-0007wi-3w
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 11:50:14 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KcMWf-0007wJ-Mx
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 11:50:12 -0400
Received: from [199.232.76.173] (port=34524 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KcMWf-0007wG-H3
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 11:50:09 -0400
Received: from pcls4.std.com ([192.74.137.84]:54607 helo=TheWorld.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <flitterio@HIDDEN>)
	id 1KcMWf-0004vS-DU
	for bug-gnu-emacs@HIDDEN; Sun, 07 Sep 2008 11:50:09 -0400
Received: from usenlittefl1c.theworld.com (IDENT:105@HIDDEN [192.74.137.71])
	by TheWorld.com (8.13.6/8.13.6) with ESMTP id m87Fmju4026583
	for <bug-gnu-emacs@HIDDEN>; Sun, 7 Sep 2008 11:48:49 -0400
From: Francis Litterio <flitterio@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Date: Sun, 07 Sep 2008 11:44:50 -0400
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
	<mailman.18638.1220760463.18990.bug-gnu-emacs@HIDDEN>
X-Random-Quote: Who is rich?  He that is content.  Who is that?
	Nobody. -- Benjamin Franklin
In-Reply-To: <mailman.18638.1220760463.18990.bug-gnu-emacs@HIDDEN> (Stefan
	Monnier's message of "Sat, 06 Sep 2008 23:43:52 -0400")
Message-ID: <i5i6prngufc5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6

Stefan Monnier wrote:

>> The MS-Windows access right set is richer than just Read,
>> Write, Execute.
>
> That doesn't really matter, the point is that nobody but the creating
> user should have any right.

Would it be acceptable for Emacs on Windows to change the ownership of
any file it creates to be the user running Emacs, and then set the ACLs
such that the creating user is the only user with rights to the file?
--
Fran





Acknowledgement sent to Francis Litterio <flitterio@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 7 Sep 2008 03:44:04 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m873hwl0028295
	for <865@HIDDEN>; Sat, 6 Sep 2008 20:44:01 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhwFABzrwkhFxJRU/2dsb2JhbACBZbEKgWaBBw
X-IronPort-AV: E=Sophos;i="4.32,349,1217822400"; 
   d="scan'208";a="26466701"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO ceviche.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 06 Sep 2008 23:43:52 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 7CA5FB405D; Sat,  6 Sep 2008 23:43:52 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
Date: Sat, 06 Sep 2008 23:43:52 -0400
In-Reply-To: <ubpz1dkfy.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 07 Sep
	2008 00:38:09 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-CrossAssassin-Score: 2

>> > So you are saying we should assume that when umask has its two lower
>> > mode bits set to zero, the intent is to create a private file
>> > accessible only by the user who runs Emacs?  I don't like such
>> > assumptions, but if I'm the only one, so be it.
>> It's not an assumption: it's what default-file-modes says.
> On Posix platforms, yes.

No, it's not platform dependent: it just so happens that it matches the
Posix semantics, so the implementation is trivial on Posix platforms,
but the meaning of this Elisp code is the same whether or not it's
running on a Posix platform.

> The MS-Windows access right set is richer than just Read,
> Write, Execute.

That doesn't really matter, the point is that nobody but the creating
user should have any right.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 7 Sep 2008 03:44:06 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m873i21h028302
	for <submit@HIDDEN>; Sat, 6 Sep 2008 20:44:04 -0700
Received: from mail.gnu.org ([199.232.76.166]:47377 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1KcBAJ-0000ys-K0
	for emacs-pretest-bug@HIDDEN; Sat, 06 Sep 2008 23:42:19 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KcBBu-0000XF-FB
	for emacs-pretest-bug@HIDDEN; Sat, 06 Sep 2008 23:44:02 -0400
Received: from ironport2-out.pppoe.ca ([206.248.154.182]:35528 helo=ironport2-out.teksavvy.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KcBBq-0000Wg-2f; Sat, 06 Sep 2008 23:43:54 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhwFABzrwkhFxJRU/2dsb2JhbACBZbEKgWaBBw
X-IronPort-AV: E=Sophos;i="4.32,349,1217822400"; 
   d="scan'208";a="26466701"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO ceviche.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 06 Sep 2008 23:43:52 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 7CA5FB405D; Sat,  6 Sep 2008 23:43:52 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwv3akc39md.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
	<jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
	<ubpz1dkfy.fsf@HIDDEN>
Date: Sat, 06 Sep 2008 23:43:52 -0400
In-Reply-To: <ubpz1dkfy.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 07 Sep
	2008 00:38:09 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.

>> > So you are saying we should assume that when umask has its two lower
>> > mode bits set to zero, the intent is to create a private file
>> > accessible only by the user who runs Emacs?  I don't like such
>> > assumptions, but if I'm the only one, so be it.
>> It's not an assumption: it's what default-file-modes says.
> On Posix platforms, yes.

No, it's not platform dependent: it just so happens that it matches the
Posix semantics, so the implementation is trivial on Posix platforms,
but the meaning of this Elisp code is the same whether or not it's
running on a Posix platform.

> The MS-Windows access right set is richer than just Read,
> Write, Execute.

That doesn't really matter, the point is that nobody but the creating
user should have any right.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 6 Sep 2008 21:38:24 +0000
Received: from mtaout6.012.net.il (mtaout6.012.net.il [84.95.2.16])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m86LcKrS030152
	for <865@HIDDEN>; Sat, 6 Sep 2008 14:38:22 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6S006LOMSQO950@HIDDEN> for 865@HIDDEN; Sun, 07 Sep 2008 00:38:51 +0300 (IDT)
Date: Sun, 07 Sep 2008 00:38:09 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ubpz1dkfy.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
X-CrossAssassin-Score: 2

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Sat, 06 Sep 2008 15:45:29 -0400
> 
> > So you are saying we should assume that when umask has its two lower
> > mode bits set to zero, the intent is to create a private file
> > accessible only by the user who runs Emacs?  I don't like such
> > assumptions, but if I'm the only one, so be it.
> 
> It's not an assumption: it's what default-file-modes says.

On Posix platforms, yes.  The MS-Windows access right set is richer
than just Read, Write, Execute.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 6 Sep 2008 21:38:24 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m86LcK0j030153
	for <submit@HIDDEN>; Sat, 6 Sep 2008 14:38:21 -0700
Received: from mail.gnu.org ([199.232.76.166]:47003 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1Kc5SP-0004h3-9N
	for emacs-pretest-bug@HIDDEN; Sat, 06 Sep 2008 17:36:37 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kc5U0-0003IG-In
	for emacs-pretest-bug@HIDDEN; Sat, 06 Sep 2008 17:38:19 -0400
Received: from mtaout6.012.net.il ([84.95.2.16]:17165)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kc5U0-0003I8-6n; Sat, 06 Sep 2008 17:38:16 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6S006LOMSQO950@HIDDEN>; Sun, 07 Sep 2008 00:38:51 +0300 (IDT)
Date: Sun, 07 Sep 2008 00:38:09 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ubpz1dkfy.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN> <uy725iwer.fsf@HIDDEN> <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Sat, 06 Sep 2008 15:45:29 -0400
> 
> > So you are saying we should assume that when umask has its two lower
> > mode bits set to zero, the intent is to create a private file
> > accessible only by the user who runs Emacs?  I don't like such
> > assumptions, but if I'm the only one, so be it.
> 
> It's not an assumption: it's what default-file-modes says.

On Posix platforms, yes.  The MS-Windows access right set is richer
than just Read, Write, Execute.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 6 Sep 2008 19:45:38 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m86JjYL6023557
	for <865@HIDDEN>; Sat, 6 Sep 2008 12:45:36 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AqYEAF96wkhFxJRU/2dsb2JhbACBZbB3gWaBBw
X-IronPort-AV: E=Sophos;i="4.32,346,1217822400"; 
   d="scan'208";a="26458508"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO ceviche.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 06 Sep 2008 15:45:29 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 264DFB405D; Sat,  6 Sep 2008 15:45:29 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
Date: Sat, 06 Sep 2008 15:45:29 -0400
In-Reply-To: <uy725iwer.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 06 Sep
	2008 10:08:28 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> But I'd argue that having the umask (aka default-file-modes) set to
>> #o700 could be used as a tell-tale sign, so it sounds to me like it
>> might be doable by adding w32 C code without any C-level changes.
                                                   ^^^
                                                  Elisp

> So you are saying we should assume that when umask has its two lower
> mode bits set to zero, the intent is to create a private file
> accessible only by the user who runs Emacs?  I don't like such
> assumptions, but if I'm the only one, so be it.

It's not an assumption: it's what default-file-modes says.
If it's #oX00, it means that nobody else than the user who creates it
should have any access rights to it.  The X may specify additional
constraints so that even the creating user may not have read or write
(or exec) access, but these are less important.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 6 Sep 2008 19:45:41 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m86Jjblf023561
	for <submit@HIDDEN>; Sat, 6 Sep 2008 12:45:39 -0700
Received: from mail.gnu.org ([199.232.76.166]:41231 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1Kc3hL-0000Nk-7H
	for emacs-pretest-bug@HIDDEN; Sat, 06 Sep 2008 15:43:55 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1Kc3iw-0006jM-SC
	for emacs-pretest-bug@HIDDEN; Sat, 06 Sep 2008 15:45:37 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:16836)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1Kc3is-0006ir-1e; Sat, 06 Sep 2008 15:45:30 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AqYEAF96wkhFxJRU/2dsb2JhbACBZbB3gWaBBw
X-IronPort-AV: E=Sophos;i="4.32,346,1217822400"; 
   d="scan'208";a="26458508"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO ceviche.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 06 Sep 2008 15:45:29 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 264DFB405D; Sat,  6 Sep 2008 15:45:29 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvzlml2h8u.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<uy725iwer.fsf@HIDDEN>
Date: Sat, 06 Sep 2008 15:45:29 -0400
In-Reply-To: <uy725iwer.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 06 Sep
	2008 10:08:28 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

>> But I'd argue that having the umask (aka default-file-modes) set to
>> #o700 could be used as a tell-tale sign, so it sounds to me like it
>> might be doable by adding w32 C code without any C-level changes.
                                                   ^^^
                                                  Elisp

> So you are saying we should assume that when umask has its two lower
> mode bits set to zero, the intent is to create a private file
> accessible only by the user who runs Emacs?  I don't like such
> assumptions, but if I'm the only one, so be it.

It's not an assumption: it's what default-file-modes says.
If it's #oX00, it means that nobody else than the user who creates it
should have any access rights to it.  The X may specify additional
constraints so that even the creating user may not have read or write
(or exec) access, but these are less important.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 6 Sep 2008 17:41:45 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m86HffBg012339
	for <865@HIDDEN>; Sat, 6 Sep 2008 10:41:42 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:64489 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kc1n2-00026R-7S; Sat, 06 Sep 2008 19:41:40 +0200
Message-ID: <48C2C0D1.5010409@HIDDEN>
Date: Sat, 06 Sep 2008 19:41:37 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>	<u8wu6kgoz.fsf@HIDDEN>	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>	<u63pak4p2.fsf@HIDDEN>	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>	<mailman.18580.1220686060.18990.bug-gnu-emacs@HIDDEN> <i5i663p92o5m.fsf@HIDDEN>
In-Reply-To: <i5i663p92o5m.fsf@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080906-0, 2008-09-06), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1Kc1n2-00026R-7S.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1Kc1n2-00026R-7S bf2e9da7d92ed74512dbf34367eaf7ac

Francis Litterio wrote:
> Eli Zaretskii wrote:
> 
>>> From: Stefan Monnier
> 
>>> But I'd argue that having the umask (aka default-file-modes) set to
>>> #o700 could be used as a tell-tale sign, so it sounds to me like it
>>> might be doable by adding w32 C code without any C-level changes.
>> So you are saying we should assume that when umask has its two lower
>> mode bits set to zero, the intent is to create a private file
>> accessible only by the user who runs Emacs?  I don't like such
>> assumptions, but if I'm the only one, so be it.
> 
> Overloading the semantics of a subset of the bits in the umask seems
> prone to confusion.  Why not create a new w32-... variable to encode
> those semantics?


Unfortunately they are already overloaded on w32. I think the best
remedy would be to just remove that on w32. New primitives are needed if
we really want to handle security from within Emacs.

I am not sure it is good to do that, but if you really want to handle
security it must of course be carefully done.

For the current problem a work around using a special function in
server-ensure-safe-dir for OS:es that uses ACLs for security control
would be the best in my opinion.





Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 6 Sep 2008 17:14:15 +0000
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 m86HEBDu002501
	for <submit@HIDDEN>; Sat, 6 Sep 2008 10:14:13 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Kc1MR-0001X8-AD
	for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2008 13:14:11 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Kc1MP-0001WI-Om
	for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2008 13:14:10 -0400
Received: from [199.232.76.173] (port=33517 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1Kc1MP-0001WF-Ja
	for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2008 13:14:09 -0400
Received: from pcls5.std.com ([192.74.137.145]:51360 helo=TheWorld.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <flitterio@HIDDEN>)
	id 1Kc1MQ-0007Kt-7x
	for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2008 13:14:10 -0400
Received: from usenlittefl1c.theworld.com (monk@HIDDEN [192.74.137.71])
	by TheWorld.com (8.13.6/8.13.6) with ESMTP id m86HDSf3008440
	for <bug-gnu-emacs@HIDDEN>; Sat, 6 Sep 2008 13:13:31 -0400
From: Francis Litterio <flitterio@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Date: Sat, 06 Sep 2008 13:04:02 -0400
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
	<jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
	<mailman.18580.1220686060.18990.bug-gnu-emacs@HIDDEN>
X-Random-Quote: If a person with multiple personalities threatens
	suicide, is that considered a hostage situation?
In-Reply-To: <mailman.18580.1220686060.18990.bug-gnu-emacs@HIDDEN> (Eli
	Zaretskii's message of "Sat, 06 Sep 2008 10:08:28 +0300")
Message-ID: <i5i663p92o5m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.

Eli Zaretskii wrote:

>> From: Stefan Monnier

>> But I'd argue that having the umask (aka default-file-modes) set to
>> #o700 could be used as a tell-tale sign, so it sounds to me like it
>> might be doable by adding w32 C code without any C-level changes.
>
> So you are saying we should assume that when umask has its two lower
> mode bits set to zero, the intent is to create a private file
> accessible only by the user who runs Emacs?  I don't like such
> assumptions, but if I'm the only one, so be it.

Overloading the semantics of a subset of the bits in the umask seems
prone to confusion.  Why not create a new w32-... variable to encode
those semantics?
--
Fran





Acknowledgement sent to Francis Litterio <flitterio@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.6 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 6 Sep 2008 11:45:42 +0000
Received: from mtaout4.012.net.il (mtaout4.012.net.il [84.95.2.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m86BjcG8018644
	for <865@HIDDEN>; Sat, 6 Sep 2008 04:45:39 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6R0045JVBMEMC1@i_mtaout4.012.net.il> for 865@HIDDEN; Sat, 06 Sep 2008 14:45:22 +0300 (IDT)
Date: Sat, 06 Sep 2008 14:44:39 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i63ake49ou.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ud4jhebx4.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN> <mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN> <i5i6ej3yac9f.fsf@HIDDEN> <mailman.18547.1220635661.18990.bug-gnu-emacs@HIDDEN> <i5i63ake49ou.fsf@HIDDEN>
X-CrossAssassin-Score: 2

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Fri, 05 Sep 2008 16:29:04 -0400
> Cc: 
> 
> > Thanks.  Do you know which API can be used to find out
> > programmatically whether this setting is one or the other?
> 
> You had to ask. :) Some hours of Googling and reading bad MS
> documentation reveals that Windows sets the following registry value to
> 0 or 1 to reflect that particular policy:

Thanks a lot for the info and the footwork.  I should have said more
clearly that I only meant to ask you about what you already knew;
sorry about that.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 6 Sep 2008 11:45:54 +0000
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 m86BjirO018651
	for <submit@HIDDEN>; Sat, 6 Sep 2008 04:45:50 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KbwEX-00017c-VL
	for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2008 07:45:42 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KbwEV-00017L-EA
	for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2008 07:45:41 -0400
Received: from [199.232.76.173] (port=53947 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KbwEV-00017I-8r
	for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2008 07:45:39 -0400
Received: from mtaout4.012.net.il ([84.95.2.10]:20147)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbwEU-0008QI-3M
	for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2008 07:45:38 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6R0045JVBMEMC1@i_mtaout4.012.net.il> for bug-gnu-emacs@HIDDEN; Sat, 06 Sep 2008 14:45:22 +0300 (IDT)
Date: Sat, 06 Sep 2008 14:44:39 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i63ake49ou.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ud4jhebx4.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN> <mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN> <i5i6ej3yac9f.fsf@HIDDEN> <mailman.18547.1220635661.18990.bug-gnu-emacs@HIDDEN> <i5i63ake49ou.fsf@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Fri, 05 Sep 2008 16:29:04 -0400
> Cc: 
> 
> > Thanks.  Do you know which API can be used to find out
> > programmatically whether this setting is one or the other?
> 
> You had to ask. :) Some hours of Googling and reading bad MS
> documentation reveals that Windows sets the following registry value to
> 0 or 1 to reflect that particular policy:

Thanks a lot for the info and the footwork.  I should have said more
clearly that I only meant to ask you about what you already knew;
sorry about that.





Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 6 Sep 2008 07:08:42 +0000
Received: from mtaout5.012.net.il (mtaout5.012.net.il [84.95.2.13])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8678bZM020034
	for <865@HIDDEN>; Sat, 6 Sep 2008 00:08:39 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6R004MNIJ9CKA3@i_mtaout5.012.net.il> for 865@HIDDEN; Sat, 06 Sep 2008 10:09:10 +0300 (IDT)
Date: Sat, 06 Sep 2008 10:08:28 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uy725iwer.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Fri, 05 Sep 2008 17:36:40 -0400
> 
> But I'd argue that having the umask (aka default-file-modes) set to
> #o700 could be used as a tell-tale sign, so it sounds to me like it
> might be doable by adding w32 C code without any C-level changes.

So you are saying we should assume that when umask has its two lower
mode bits set to zero, the intent is to create a private file
accessible only by the user who runs Emacs?  I don't like such
assumptions, but if I'm the only one, so be it.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 6 Sep 2008 07:08:43 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8678dfD020036
	for <submit@HIDDEN>; Sat, 6 Sep 2008 00:08:40 -0700
Received: from mx10.gnu.org ([199.232.76.166]:34795)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1Kbrsn-0006Ly-6M
	for emacs-pretest-bug@HIDDEN; Sat, 06 Sep 2008 03:06:57 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbruM-0004P7-NQ
	for emacs-pretest-bug@HIDDEN; Sat, 06 Sep 2008 03:08:38 -0400
Received: from mx20.gnu.org ([199.232.41.8]:31031)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbruM-0004P2-99; Sat, 06 Sep 2008 03:08:34 -0400
Received: from mtaout5.012.net.il ([84.95.2.13])
	by mx20.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbruL-0003FT-IP; Sat, 06 Sep 2008 03:08:33 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6R004MNIJ9CKA3@i_mtaout5.012.net.il>; Sat, 06 Sep 2008 10:09:10 +0300 (IDT)
Date: Sat, 06 Sep 2008 10:08:28 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uy725iwer.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN> <u63pak4p2.fsf@HIDDEN> <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-kernel: by mx20.gnu.org: Solaris 9.1
X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4)
X-CrossAssassin-Score: 2

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Fri, 05 Sep 2008 17:36:40 -0400
> 
> But I'd argue that having the umask (aka default-file-modes) set to
> #o700 could be used as a tell-tale sign, so it sounds to me like it
> might be doable by adding w32 C code without any C-level changes.

So you are saying we should assume that when umask has its two lower
mode bits set to zero, the intent is to create a private file
accessible only by the user who runs Emacs?  I don't like such
assumptions, but if I'm the only one, so be it.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.3 required=4.0 tests=AWL,BAYES_00,DA_MS_ADDRESS,
	FOURLA,HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 6 Sep 2008 03:34:17 +0000
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 m863YDxm010251
	for <submit@HIDDEN>; Fri, 5 Sep 2008 20:34:14 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KboYv-0000TA-9c
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 23:34:13 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KboYs-0000Sm-RR
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 23:34:11 -0400
Received: from [199.232.76.173] (port=40207 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KboYs-0000Sj-Ls
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 23:34:10 -0400
Received: from pcls1.std.com ([192.74.137.141]:42480 helo=TheWorld.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <flitterio@HIDDEN>)
	id 1KboYs-0006DS-Ex
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 23:34:10 -0400
Received: from usenlittefl1c.theworld.com (IDENT:105@HIDDEN [192.74.137.71])
	by TheWorld.com (8.13.6/8.13.6) with ESMTP id m863Y0fM007778
	for <bug-gnu-emacs@HIDDEN>; Fri, 5 Sep 2008 23:34:03 -0400
From: Francis Litterio <flitterio@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>
	<i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN>
	<mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN>
	<i5i6ej3yac9f.fsf@HIDDEN>
	<mailman.18547.1220635661.18990.bug-gnu-emacs@HIDDEN>
	<i5i63ake49ou.fsf@HIDDEN>
	<mailman.18565.1220665659.18990.bug-gnu-emacs@HIDDEN>
X-Random-Quote: The opposite of a correct statement is a false
	statement.  But the opposite of a profound truth may well be
	another profound truth. -- Niels Bohr (1885 - 1962)
Date: Fri, 05 Sep 2008 23:33:58 -0400
Message-ID: <i5i6ej3y2bix.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2)

Lennart Borgman (gmail) wrote:

> Francis Litterio wrote:
>> Eli Zaretskii wrote:
>>
>>> Thanks.  Do you know which API can be used to find out
>>> programmatically whether this setting is one or the other?
>> 
>> You had to ask. :) Some hours of Googling and reading bad MS
>> documentation reveals that Windows sets the following registry value to
>> 0 or 1 to reflect that particular policy:
>> 
>>   Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
>>   Value: NoDefaultAdminOwner
>> 
>> If it is 0, then new files created by members of Local Administrators
>> are owned by the group, otherwise they are owned by the user.
>
> Is this the recommended way to check it? Quite often I have seen people
> on Internet claiming that you should look for a registry value when the
> documentation from MS clearly say you should use an API instead.

The documentation from MS on how to query policy settings is poorly
organized.  There is a function named GetGPOList() documented at:

  http://msdn.microsoft.com/en-us/library/aa373520(VS.85).aspx

but it isn't clear to me how one extracts a specific policy setting from
the returned GPO list.  There's a structure named GROUP_POLICY_OBJECT
documented at:

  http://msdn.microsoft.com/en-us/library/aa374173(VS.85).aspx

but it's not clear to me how that structure represents policy settings.

There is a different (newer?) API called RSOP (Resulting Set of
Policies) that's part of the WMI (Windows Management Infrastructure)
API, but it doesn't appear to be directly callable from C code.  It's
documented at:

  http://msdn.microsoft.com/en-us/library/aa375082(VS.85).aspx

The overall Group Policy architecture is documented at:

  http://msdn.microsoft.com/en-us/library/aa373783(VS.85).aspx

where it is implied that group policies only exist on a domain, which
leads me to wonder if any of the above APIs work on non-domain
machines.

Confusing.
--
Fran





Acknowledgement sent to Francis Litterio <flitterio@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 6 Sep 2008 01:30:40 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m861Ua59000681
	for <865@HIDDEN>; Fri, 5 Sep 2008 18:30:37 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:59915 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KbmdH-0001bu-7s; Sat, 06 Sep 2008 03:30:35 +0200
Message-ID: <48C1DD33.2010703@HIDDEN>
Date: Sat, 06 Sep 2008 03:30:27 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
CC: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>	<i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN>	<mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN>	<i5i6ej3yac9f.fsf@HIDDEN>	<mailman.18547.1220635661.18990.bug-gnu-emacs@HIDDEN> <i5i63ake49ou.fsf@HIDDEN>
In-Reply-To: <i5i63ake49ou.fsf@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080905-0, 2008-09-05), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1KbmdH-0001bu-7s.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KbmdH-0001bu-7s 502d96a9b3109c1f3709d3f60ff212d6

Francis Litterio wrote:
> Eli Zaretskii wrote:
> 
>>> From: Francis Litterio
> 
>>> If this solution is implemented, keep in mind that there is a Group
>>> Policy setting called "System objects: default owner for objects created
>>> by members of Administrators group" which can be set to either
>>> "Administrators group" or "Object creator".  If it is set to the latter
>>> value, then newly-created files are owned by the user not the group.
>> Thanks.  Do you know which API can be used to find out
>> programmatically whether this setting is one or the other?
> 
> You had to ask. :) Some hours of Googling and reading bad MS
> documentation reveals that Windows sets the following registry value to
> 0 or 1 to reflect that particular policy:
> 
>   Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
>   Value: NoDefaultAdminOwner
> 
> If it is 0, then new files created by members of Local Administrators
> are owned by the group, otherwise they are owned by the user.

Is this the recommended way to check it? Quite often I have seen people
on Internet claiming that you should look for a registry value when the
documentation from MS clearly say you should use an API instead.

> Some caveats:
> 
> 1. I think that changing this value may have no effect on a machine in a
>    domain with restrictive domain policies, but that doesn't affect
>    Emacs, which would only read it.
> 
> 2. This value might not exist in the registry on Windows versions prior
>    to Windows XP.  That may be a bigger issue for Emacs.
> 
> Hope this helps.
> --
> Fran
> 
> 
> 
> 
> 
> 




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 6 Sep 2008 01:30:44 +0000
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 m861UekO000792
	for <submit@HIDDEN>; Fri, 5 Sep 2008 18:30:42 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KbmdM-0000Ux-Ab
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 21:30:40 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KbmdK-0000Rc-BH
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 21:30:39 -0400
Received: from [199.232.76.173] (port=35929 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KbmdK-0000R8-50
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 21:30:38 -0400
Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:46586)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KbmdJ-00016i-PU
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 21:30:38 -0400
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:59915 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KbmdH-0001bu-7s; Sat, 06 Sep 2008 03:30:35 +0200
Message-ID: <48C1DD33.2010703@HIDDEN>
Date: Sat, 06 Sep 2008 03:30:27 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
CC: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>	<i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN>	<mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN>	<i5i6ej3yac9f.fsf@HIDDEN>	<mailman.18547.1220635661.18990.bug-gnu-emacs@HIDDEN> <i5i63ake49ou.fsf@HIDDEN>
In-Reply-To: <i5i63ake49ou.fsf@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080905-0, 2008-09-05), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1KbmdH-0001bu-7s.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KbmdH-0001bu-7s 502d96a9b3109c1f3709d3f60ff212d6
X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!)
X-CrossAssassin-Score: 2

Francis Litterio wrote:
> Eli Zaretskii wrote:
> 
>>> From: Francis Litterio
> 
>>> If this solution is implemented, keep in mind that there is a Group
>>> Policy setting called "System objects: default owner for objects created
>>> by members of Administrators group" which can be set to either
>>> "Administrators group" or "Object creator".  If it is set to the latter
>>> value, then newly-created files are owned by the user not the group.
>> Thanks.  Do you know which API can be used to find out
>> programmatically whether this setting is one or the other?
> 
> You had to ask. :) Some hours of Googling and reading bad MS
> documentation reveals that Windows sets the following registry value to
> 0 or 1 to reflect that particular policy:
> 
>   Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
>   Value: NoDefaultAdminOwner
> 
> If it is 0, then new files created by members of Local Administrators
> are owned by the group, otherwise they are owned by the user.

Is this the recommended way to check it? Quite often I have seen people
on Internet claiming that you should look for a registry value when the
documentation from MS clearly say you should use an API instead.

> Some caveats:
> 
> 1. I think that changing this value may have no effect on a machine in a
>    domain with restrictive domain policies, but that doesn't affect
>    Emacs, which would only read it.
> 
> 2. This value might not exist in the registry on Windows versions prior
>    to Windows XP.  That may be a bigger issue for Emacs.
> 
> Hope this helps.
> --
> Fran
> 
> 
> 
> 
> 
> 





Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 21:36:52 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85LakWU016642
	for <865@HIDDEN>; Fri, 5 Sep 2008 14:36:50 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ArMEAORCwUhFxJRU/2dsb2JhbACBZbUEgWWBBg
X-IronPort-AV: E=Sophos;i="4.32,342,1217822400"; 
   d="scan'208";a="26426071"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO pastel.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 05 Sep 2008 17:36:41 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 7A19E8398; Fri,  5 Sep 2008 17:36:40 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
Date: Fri, 05 Sep 2008 17:36:40 -0400
In-Reply-To: <u63pak4p2.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 05 Sep
	2008 18:11:53 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> I think we need to consider the testing part and the file (or dir)
>> creation part separately.

> 100% agreement.

>> And my previous messages pointed out that the core problem
>> (securitywise) is in the creation part, which is hence unrelated to
>> the above 3 other cases.

> Are you okay with adding a primitive for solving the creation part,
> and will such a primitive be allowed into the repository even though
> we are in feature freeze?

I'm not sure what it would look like so it's hard for me to say.
But I'd argue that having the umask (aka default-file-modes) set to
#o700 could be used as a tell-tale sign, so it sounds to me like it
might be doable by adding w32 C code without any C-level changes.

Of course, that might just be a reflection of my naive misunderstanding
of the w32 API.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 21:37:00 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85Lau76016649
	for <submit@HIDDEN>; Fri, 5 Sep 2008 14:36:58 -0700
Received: from mx10.gnu.org ([199.232.76.166]:34732)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1KbixX-00042e-7v
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 17:35:15 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1Kbiz7-0005ne-5n
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 17:36:56 -0400
Received: from ironport2-out.pppoe.ca ([206.248.154.182]:7900 helo=ironport2-out.teksavvy.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1Kbiz2-0005mP-Qz; Fri, 05 Sep 2008 17:36:48 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ArMEAORCwUhFxJRU/2dsb2JhbACBZbUEgWWBBg
X-IronPort-AV: E=Sophos;i="4.32,342,1217822400"; 
   d="scan'208";a="26426071"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO pastel.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 05 Sep 2008 17:36:41 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 7A19E8398; Fri,  5 Sep 2008 17:36:40 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvr67yl1kc.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
	<u63pak4p2.fsf@HIDDEN>
Date: Fri, 05 Sep 2008 17:36:40 -0400
In-Reply-To: <u63pak4p2.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 05 Sep
	2008 18:11:53 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

>> I think we need to consider the testing part and the file (or dir)
>> creation part separately.

> 100% agreement.

>> And my previous messages pointed out that the core problem
>> (securitywise) is in the creation part, which is hence unrelated to
>> the above 3 other cases.

> Are you okay with adding a primitive for solving the creation part,
> and will such a primitive be allowed into the repository even though
> we are in feature freeze?

I'm not sure what it would look like so it's hard for me to say.
But I'd argue that having the umask (aka default-file-modes) set to
#o700 could be used as a tell-tale sign, so it sounds to me like it
might be doable by adding w32 C code without any C-level changes.

Of course, that might just be a reflection of my naive misunderstanding
of the w32 API.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 20:31:39 +0000
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 m85KVZIp026639
	for <submit@HIDDEN>; Fri, 5 Sep 2008 13:31:36 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Kbhxv-0003CY-9H
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 16:31:35 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Kbhxs-0003C8-MQ
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 16:31:33 -0400
Received: from [199.232.76.173] (port=57850 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1Kbhxs-0003C5-HA
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 16:31:32 -0400
Received: from pcls5.std.com ([192.74.137.145]:47844 helo=TheWorld.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <flitterio@HIDDEN>)
	id 1Kbhxs-0004wx-Jp
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 16:31:32 -0400
Received: from usenlittefl1c.theworld.com (IDENT:105@HIDDEN [192.74.137.71])
	by TheWorld.com (8.13.6/8.13.6) with ESMTP id m85KUf3B021351
	for <bug-gnu-emacs@HIDDEN>; Fri, 5 Sep 2008 16:30:43 -0400
From: Francis Litterio <flitterio@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Date: Fri, 05 Sep 2008 16:29:04 -0400
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>
	<i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN>
	<mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN>
	<i5i6ej3yac9f.fsf@HIDDEN>
	<mailman.18547.1220635661.18990.bug-gnu-emacs@HIDDEN>
X-Random-Quote: War is cruel and you cannot refine it. -- William
	Tecumseh Sherman
In-Reply-To: <mailman.18547.1220635661.18990.bug-gnu-emacs@HIDDEN> (Eli
	Zaretskii's message of "Fri, 05 Sep 2008 20:12:10 +0300")
Message-ID: <i5i63ake49ou.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.

Eli Zaretskii wrote:

>> From: Francis Litterio

>> If this solution is implemented, keep in mind that there is a Group
>> Policy setting called "System objects: default owner for objects created
>> by members of Administrators group" which can be set to either
>> "Administrators group" or "Object creator".  If it is set to the latter
>> value, then newly-created files are owned by the user not the group.
>
> Thanks.  Do you know which API can be used to find out
> programmatically whether this setting is one or the other?

You had to ask. :) Some hours of Googling and reading bad MS
documentation reveals that Windows sets the following registry value to
0 or 1 to reflect that particular policy:

  Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  Value: NoDefaultAdminOwner

If it is 0, then new files created by members of Local Administrators
are owned by the group, otherwise they are owned by the user.

Some caveats:

1. I think that changing this value may have no effect on a machine in a
   domain with restrictive domain policies, but that doesn't affect
   Emacs, which would only read it.

2. This value might not exist in the registry on Windows versions prior
   to Windows XP.  That may be a bigger issue for Emacs.

Hope this helps.
--
Fran





Acknowledgement sent to Francis Litterio <flitterio@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-4.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,
	RCVD_IN_NIX1 autolearn=no version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 17:20:11 +0000
Received: from mtaout4.012.net.il (mtaout4.012.net.il [84.95.2.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85HK7rG024327
	for <865@HIDDEN>; Fri, 5 Sep 2008 10:20:09 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6Q00C3YG60X9A0@i_mtaout4.012.net.il> for 865@HIDDEN; Fri, 05 Sep 2008 20:20:46 +0300 (IDT)
Date: Fri, 05 Sep 2008 20:19:42 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvhc8utxo3.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: lennart.borgman@HIDDEN, 865 <at> debbugs.gnu.org,
        emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u1vzyjys1.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN> <u7i9qk6rq.fsf@HIDDEN> <jwvhc8utxo3.fsf-monnier+emacsbugreports@HIDDEN>

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Lennart Borgman <lennart.borgman@HIDDEN>,
>         865@HIDDEN, emacs-pretest-bug@HIDDEN
> Date: Fri, 05 Sep 2008 11:34:58 -0400
> 
> > set-file-modes is only very crudely emulated on Windows.  In a
> > nutshell, the underlying primitive _chmod only considers the high 3
> > bits of the argument you pass to set-file-modes.
> 
> So I guess that's pretty much the source of the problem

The source of the problem is that Posix rwxrwxrwx mode bits don't map
well to Windows ACL-based file security.  Even if I would sit down to
rewrite _chmod to preserve Posix semantics, I'd have difficulty doing
that because there's no clear distinction between "group" and "world",
and because the set of Windows access bits is larger than just rwx.
(Cygwin jumps through the hoops to make Posix semantics happen, but
even they require that the user's group be defined for this to work,
and generally that you play by Posix rules.)

Instead of assuming Posix semantics, we should explicitly have a
primitive that creates files that can only be accessed by their
creator; on Posix platforms the implementation could do what we do in
server.el now.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,
	RCVD_IN_DNSWL_MED,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 17:20:12 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85HK9Ba024721
	for <submit@HIDDEN>; Fri, 5 Sep 2008 10:20:10 -0700
Received: from mail.gnu.org ([199.232.76.166]:45300 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1Kbex1-0001oH-7n
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 13:18:27 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kbeya-0001nL-R9
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 13:20:07 -0400
Received: from mtaout4.012.net.il ([84.95.2.10]:14147)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kbeya-0001n3-Bk
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 13:20:04 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6Q00C3YG60X9A0@i_mtaout4.012.net.il> for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 20:20:46 +0300 (IDT)
Date: Fri, 05 Sep 2008 20:19:42 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvhc8utxo3.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: lennart.borgman@HIDDEN, 865 <at> debbugs.gnu.org,
        emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u1vzyjys1.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN> <u7i9qk6rq.fsf@HIDDEN> <jwvhc8utxo3.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1
X-CrossAssassin-Score: 2

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Lennart Borgman <lennart.borgman@HIDDEN>,
>         865@HIDDEN, emacs-pretest-bug@HIDDEN
> Date: Fri, 05 Sep 2008 11:34:58 -0400
> 
> > set-file-modes is only very crudely emulated on Windows.  In a
> > nutshell, the underlying primitive _chmod only considers the high 3
> > bits of the argument you pass to set-file-modes.
> 
> So I guess that's pretty much the source of the problem

The source of the problem is that Posix rwxrwxrwx mode bits don't map
well to Windows ACL-based file security.  Even if I would sit down to
rewrite _chmod to preserve Posix semantics, I'd have difficulty doing
that because there's no clear distinction between "group" and "world",
and because the set of Windows access bits is larger than just rwx.
(Cygwin jumps through the hoops to make Posix semantics happen, but
even they require that the user's group be defined for this to work,
and generally that you play by Posix rules.)

Instead of assuming Posix semantics, we should explicitly have a
primitive that creates files that can only be accessed by their
creator; on Posix platforms the implementation could do what we do in
server.el now.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 17:14:04 +0000
Received: from mtaout6.012.net.il (mtaout6.012.net.il [84.95.2.16])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85HE0vU022480
	for <865@HIDDEN>; Fri, 5 Sep 2008 10:14:01 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6Q003QSFUVYEC0@HIDDEN> for 865@HIDDEN; Fri, 05 Sep 2008 20:13:50 +0300 (IDT)
Date: Fri, 05 Sep 2008 20:13:02 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <e01d8a50809050816i74d09b49mfbaadfe0b1f0940f@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Lennart Borgman <lennart.borgman@HIDDEN>
Cc: jasonr@HIDDEN, 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u3akejz35.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN> <48C14226.7080600@HIDDEN> <e01d8a50809050816i74d09b49mfbaadfe0b1f0940f@HIDDEN>

> Date: Fri, 5 Sep 2008 17:16:46 +0200
> From: "Lennart Borgman" <lennart.borgman@HIDDEN>
> Cc: 865@HIDDEN, "Eli Zaretskii" <eliz@HIDDEN>, 
> 	emacs-pretest-bug@HIDDEN
> 
> On 9/5/08, Jason Rumney <jasonr@HIDDEN> wrote:
> > Lennart Borgman wrote:
> > > I thought that perhaps a workaround would be to changed the owner so I
> > tested.
> > >
> > > I did a test on the directory where I had trouble. I did something like
> > >
> > >  (set-file-modes "serv2" ?\654)
> > >
> > >
> >
> > set-file-modes is just a wrapper for the chmod system function. On Windows,
> > the chmod system function ignores all fields in the bitmask except the owner
> > read and write flags, which it maps to the DOS readonly flag on files.
> 
> Thanks. But then we can not make very much on w32, can we?

Of course, we can.  We just need to use native NT security APIs, not
the emulated Posix ones.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.6 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 17:12:53 +0000
Received: from mtaout1.012.net.il (mtaout1.012.net.il [84.95.2.1])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85HCnXE022359
	for <865@HIDDEN>; Fri, 5 Sep 2008 10:12:50 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6Q0016SFTGWLW0@HIDDEN> for 865@HIDDEN; Fri, 05 Sep 2008 20:12:54 +0300 (IDT)
Date: Fri, 05 Sep 2008 20:12:10 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i6ej3yac9f.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u4p4ujz4l.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN> <mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN> <i5i6ej3yac9f.fsf@HIDDEN>
X-CrossAssassin-Score: 2

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Fri, 05 Sep 2008 10:23:27 -0400
> Cc: 
> 
> If this solution is implemented, keep in mind that there is a Group
> Policy setting called "System objects: default owner for objects created
> by members of Administrators group" which can be set to either
> "Administrators group" or "Object creator".  If it is set to the latter
> value, then newly-created files are owned by the user not the group.

Thanks.  Do you know which API can be used to find out
programmatically whether this setting is one or the other?




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.3 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 17:14:07 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85HE36a022587
	for <submit@HIDDEN>; Fri, 5 Sep 2008 10:14:04 -0700
Received: from mx10.gnu.org ([199.232.76.166]:44923)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1Kber7-0001bI-V4
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 13:12:22 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kbesg-0000WV-Gk
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 13:14:02 -0400
Received: from mtaout6.012.net.il ([84.95.2.16]:47725)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kbesg-0000W5-3e; Fri, 05 Sep 2008 13:13:58 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6Q003QSFUVYEC0@HIDDEN>; Fri, 05 Sep 2008 20:13:50 +0300 (IDT)
Date: Fri, 05 Sep 2008 20:13:02 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <e01d8a50809050816i74d09b49mfbaadfe0b1f0940f@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Lennart Borgman <lennart.borgman@HIDDEN>
Cc: jasonr@HIDDEN, 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u3akejz35.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN> <48C14226.7080600@HIDDEN> <e01d8a50809050816i74d09b49mfbaadfe0b1f0940f@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?)
X-CrossAssassin-Score: 2

> Date: Fri, 5 Sep 2008 17:16:46 +0200
> From: "Lennart Borgman" <lennart.borgman@HIDDEN>
> Cc: 865@HIDDEN, "Eli Zaretskii" <eliz@HIDDEN>, 
> 	emacs-pretest-bug@HIDDEN
> 
> On 9/5/08, Jason Rumney <jasonr@HIDDEN> wrote:
> > Lennart Borgman wrote:
> > > I thought that perhaps a workaround would be to changed the owner so I
> > tested.
> > >
> > > I did a test on the directory where I had trouble. I did something like
> > >
> > >  (set-file-modes "serv2" ?\654)
> > >
> > >
> >
> > set-file-modes is just a wrapper for the chmod system function. On Windows,
> > the chmod system function ignores all fields in the bitmask except the owner
> > read and write flags, which it maps to the DOS readonly flag on files.
> 
> Thanks. But then we can not make very much on w32, can we?

Of course, we can.  We just need to use native NT security APIs, not
the emulated Posix ones.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 17:12:58 +0000
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 m85HCsV3022366
	for <submit@HIDDEN>; Fri, 5 Sep 2008 10:12:55 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Kbere-0007Kk-9b
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 13:12:54 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Kberd-0007KL-9a
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 13:12:53 -0400
Received: from [199.232.76.173] (port=48052 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1Kberd-0007KH-5V
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 13:12:53 -0400
Received: from mtaout1.012.net.il ([84.95.2.1]:39995)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kberc-0000MW-GP
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 13:12:52 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6Q0016SFTGWLW0@HIDDEN> for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 20:12:54 +0300 (IDT)
Date: Fri, 05 Sep 2008 20:12:10 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i6ej3yac9f.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u4p4ujz4l.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN> <mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN> <i5i6ej3yac9f.fsf@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Fri, 05 Sep 2008 10:23:27 -0400
> Cc: 
> 
> If this solution is implemented, keep in mind that there is a Group
> Policy setting called "System objects: default owner for objects created
> by members of Administrators group" which can be set to either
> "Administrators group" or "Object creator".  If it is set to the latter
> value, then newly-created files are owned by the user not the group.

Thanks.  Do you know which API can be used to find out
programmatically whether this setting is one or the other?





Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 15:35:08 +0000
Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85FYxjL020136
	for <865@HIDDEN>; Fri, 5 Sep 2008 08:35:01 -0700
Received: from alfajor.home (vpn-132-204-232-160.acd.umontreal.ca [132.204.232.160])
	by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m85FZRGQ018791;
	Fri, 5 Sep 2008 11:35:27 -0400
Received: by alfajor.home (Postfix, from userid 20848)
	id 56A1D1C971; Fri,  5 Sep 2008 11:34:58 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: Lennart Borgman <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvhc8utxo3.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
	<u7i9qk6rq.fsf@HIDDEN>
Date: Fri, 05 Sep 2008 11:34:58 -0400
In-Reply-To: <u7i9qk6rq.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 05 Sep
	2008 17:27:05 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3097=0

> set-file-modes is only very crudely emulated on Windows.  In a
> nutshell, the underlying primitive _chmod only considers the high 3
> bits of the argument you pass to set-file-modes.

So I guess that's pretty much the source of the problem (modulo the
fact that we set default-file-modes rather than calling set-file-modes).


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 15:35:31 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85FZOsw021302
	for <submit@HIDDEN>; Fri, 5 Sep 2008 08:35:25 -0700
Received: from mail.gnu.org ([199.232.76.166]:57678 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1KbdJf-0005d5-Mv
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 11:33:43 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KbdLC-0006Iv-Fs
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 11:35:24 -0400
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:37011)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KbdLB-0006Fg-Ga; Fri, 05 Sep 2008 11:35:17 -0400
Received: from alfajor.home (vpn-132-204-232-160.acd.umontreal.ca [132.204.232.160])
	by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m85FZRGQ018791;
	Fri, 5 Sep 2008 11:35:27 -0400
Received: by alfajor.home (Postfix, from userid 20848)
	id 56A1D1C971; Fri,  5 Sep 2008 11:34:58 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: Lennart Borgman <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvhc8utxo3.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
	<e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
	<u7i9qk6rq.fsf@HIDDEN>
Date: Fri, 05 Sep 2008 11:34:58 -0400
In-Reply-To: <u7i9qk6rq.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 05 Sep
	2008 17:27:05 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3097=0
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)
X-CrossAssassin-Score: 2

> set-file-modes is only very crudely emulated on Windows.  In a
> nutshell, the underlying primitive _chmod only considers the high 3
> bits of the argument you pass to set-file-modes.

So I guess that's pretty much the source of the problem (modulo the
fact that we set default-file-modes rather than calling set-file-modes).


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 15:16:52 +0000
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85FGlH1014699
	for <865@HIDDEN>; Fri, 5 Sep 2008 08:16:49 -0700
Received: by fg-out-1718.google.com with SMTP id l27so725854fgb.43
        for <865@HIDDEN>; Fri, 05 Sep 2008 08:16:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=4yWmsFwZjEzBR2RQN08IqIKm06YYGL2iL3Gkm/awvGw=;
        b=FmZsO0ckrcp8mN7QXyY/o6vfcv79eE9DnSKZn2g9eEUkNvRXtLLKlDpxkd72XUDqQp
         9xFkLMKeHindgSGvgKewmBFPffJ+8URaAIpTYa+/ASKtkZXaAUtaaE2ArG656zCG/O0Q
         OjYCM0kiip+7cYB/CS7N1FYnwbi3xFqiubkcI=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=L4jp6CxRVbbgRHMQT9BVmxgN1kPr9H5b89Uwp4+gLyZDpCt/eiDb7YXORuQiwf1dhN
         Xkn2WMSLykEidmAlru5RNsiwf1eMv10vxTjb1d+NKxqBYL6lFro6Kd4bO9olKg3g3O+l
         D+GgPos4X8swW66gM02oj5NIbefHAjSpD21YU=
Received: by 10.86.72.3 with SMTP id u3mr8872272fga.62.1220627806935;
        Fri, 05 Sep 2008 08:16:46 -0700 (PDT)
Received: by 10.86.65.3 with HTTP; Fri, 5 Sep 2008 08:16:46 -0700 (PDT)
Message-ID: <e01d8a50809050816i74d09b49mfbaadfe0b1f0940f@HIDDEN>
Date: Fri, 5 Sep 2008 17:16:46 +0200
From: "Lennart Borgman" <lennart.borgman@HIDDEN>
To: "Jason Rumney" <jasonr@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>,
        emacs-pretest-bug@HIDDEN
In-Reply-To: <48C14226.7080600@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <uod356pzf.fsf@HIDDEN>
	 <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	 <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	 <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	 <u8wu6kgoz.fsf@HIDDEN>
	 <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
	 <48C14226.7080600@HIDDEN>

On 9/5/08, Jason Rumney <jasonr@HIDDEN> wrote:
> Lennart Borgman wrote:
> > I thought that perhaps a workaround would be to changed the owner so I
> tested.
> >
> > I did a test on the directory where I had trouble. I did something like
> >
> >  (set-file-modes "serv2" ?\654)
> >
> >
>
> set-file-modes is just a wrapper for the chmod system function. On Windows,
> the chmod system function ignores all fields in the bitmask except the owner
> read and write flags, which it maps to the DOS readonly flag on files.

Thanks. But then we can not make very much on w32, can we?




Acknowledgement sent to "Lennart Borgman" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-9.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 15:16:58 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85FGtS6014706
	for <submit@HIDDEN>; Fri, 5 Sep 2008 08:16:56 -0700
Received: from mail.gnu.org ([199.232.76.166]:50638 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kbd1l-0004dk-Do
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 11:15:14 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kbd3K-0006s5-8h
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 11:16:53 -0400
Received: from fg-out-1718.google.com ([72.14.220.154]:12602)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kbd3J-0006qT-Jo
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 11:16:49 -0400
Received: by fg-out-1718.google.com with SMTP id l26so786267fgb.30
        for <emacs-pretest-bug@HIDDEN>; Fri, 05 Sep 2008 08:16:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=4yWmsFwZjEzBR2RQN08IqIKm06YYGL2iL3Gkm/awvGw=;
        b=FmZsO0ckrcp8mN7QXyY/o6vfcv79eE9DnSKZn2g9eEUkNvRXtLLKlDpxkd72XUDqQp
         9xFkLMKeHindgSGvgKewmBFPffJ+8URaAIpTYa+/ASKtkZXaAUtaaE2ArG656zCG/O0Q
         OjYCM0kiip+7cYB/CS7N1FYnwbi3xFqiubkcI=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=L4jp6CxRVbbgRHMQT9BVmxgN1kPr9H5b89Uwp4+gLyZDpCt/eiDb7YXORuQiwf1dhN
         Xkn2WMSLykEidmAlru5RNsiwf1eMv10vxTjb1d+NKxqBYL6lFro6Kd4bO9olKg3g3O+l
         D+GgPos4X8swW66gM02oj5NIbefHAjSpD21YU=
Received: by 10.86.72.3 with SMTP id u3mr8872272fga.62.1220627806935;
        Fri, 05 Sep 2008 08:16:46 -0700 (PDT)
Received: by 10.86.65.3 with HTTP; Fri, 5 Sep 2008 08:16:46 -0700 (PDT)
Message-ID: <e01d8a50809050816i74d09b49mfbaadfe0b1f0940f@HIDDEN>
Date: Fri, 5 Sep 2008 17:16:46 +0200
From: "Lennart Borgman" <lennart.borgman@HIDDEN>
To: "Jason Rumney" <jasonr@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>,
        emacs-pretest-bug@HIDDEN
In-Reply-To: <48C14226.7080600@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <uod356pzf.fsf@HIDDEN>
	 <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	 <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	 <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	 <u8wu6kgoz.fsf@HIDDEN>
	 <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
	 <48C14226.7080600@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2)
X-CrossAssassin-Score: 2

On 9/5/08, Jason Rumney <jasonr@HIDDEN> wrote:
> Lennart Borgman wrote:
> > I thought that perhaps a workaround would be to changed the owner so I
> tested.
> >
> > I did a test on the directory where I had trouble. I did something like
> >
> >  (set-file-modes "serv2" ?\654)
> >
> >
>
> set-file-modes is just a wrapper for the chmod system function. On Windows,
> the chmod system function ignores all fields in the bitmask except the owner
> read and write flags, which it maps to the DOS readonly flag on files.

Thanks. But then we can not make very much on w32, can we?




Acknowledgement sent to "Lennart Borgman" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 15:13:25 +0000
Received: from mtaout5.012.net.il (mtaout5.012.net.il [84.95.2.13])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85FDLqg013194
	for <865@HIDDEN>; Fri, 5 Sep 2008 08:13:23 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6Q00JCXA8ZGFN1@i_mtaout5.012.net.il> for 865@HIDDEN; Fri, 05 Sep 2008 18:12:43 +0300 (IDT)
Date: Fri, 05 Sep 2008 18:11:53 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u63pak4p2.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Fri, 05 Sep 2008 09:16:51 -0400
> 
> I think we need to consider the testing part and the file (or dir)
> creation part separately.

100% agreement.

> And my previous messages pointed out that the core problem
> (securitywise) is in the creation part, which is hence unrelated to
> the above 3 other cases.

Are you okay with adding a primitive for solving the creation part,
and will such a primitive be allowed into the repository even though
we are in feature freeze?




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 15:13:30 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85FDRud013202
	for <submit@HIDDEN>; Fri, 5 Sep 2008 08:13:28 -0700
Received: from mx10.gnu.org ([199.232.76.166]:49013)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KbcyP-0004PT-HE
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 11:11:45 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kbczw-0005WU-Ig
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 11:13:24 -0400
Received: from mtaout5.012.net.il ([84.95.2.13]:59930)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kbczv-0005Ve-Sb; Fri, 05 Sep 2008 11:13:20 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6Q00JCXA8ZGFN1@i_mtaout5.012.net.il>; Fri, 05 Sep 2008 18:12:43 +0300 (IDT)
Date: Fri, 05 Sep 2008 18:11:53 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u63pak4p2.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1
X-CrossAssassin-Score: 2

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  jasonr@HIDDEN,  emacs-pretest-bug@HIDDEN
> Date: Fri, 05 Sep 2008 09:16:51 -0400
> 
> I think we need to consider the testing part and the file (or dir)
> creation part separately.

100% agreement.

> And my previous messages pointed out that the core problem
> (securitywise) is in the creation part, which is hence unrelated to
> the above 3 other cases.

Are you okay with adding a primitive for solving the creation part,
and will such a primitive be allowed into the repository even though
we are in feature freeze?




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 14:40:18 +0000
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 m85EeFU1001584
	for <submit@HIDDEN>; Fri, 5 Sep 2008 07:40:16 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KbcTu-0004wl-NS
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 10:40:14 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KbcTt-0004vU-PX
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 10:40:14 -0400
Received: from [199.232.76.173] (port=33164 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KbcTs-0004vJ-V3
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 10:40:13 -0400
Received: from pcls6.std.com ([192.74.137.146]:51731 helo=TheWorld.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <flitterio@HIDDEN>)
	id 1KbcTt-00036K-9E
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 10:40:13 -0400
Received: from usenlittefl1c.theworld.com (IDENT:105@HIDDEN [192.74.137.71])
	by TheWorld.com (8.13.6/8.13.6) with ESMTP id m85EcbnM007553
	for <bug-gnu-emacs@HIDDEN>; Fri, 5 Sep 2008 10:38:39 -0400
From: Francis Litterio <flitterio@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Date: Fri, 05 Sep 2008 10:23:27 -0400
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>
	<i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN>
	<mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN>
X-Random-Quote: Don't let it end like this. Tell them I said
	something. -- Pancho Villa (1877 - 1923), last words
In-Reply-To: <mailman.18512.1220611660.18990.bug-gnu-emacs@HIDDEN> (Eli
	Zaretskii's message of "Fri, 05 Sep 2008 13:32:12 +0300")
Message-ID: <i5i6ej3yac9f.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.

Eli Zaretskii wrote:

>> From: Jason Rumney

>> 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?

If this solution is implemented, keep in mind that there is a Group
Policy setting called "System objects: default owner for objects created
by members of Administrators group" which can be set to either
"Administrators group" or "Object creator".  If it is set to the latter
value, then newly-created files are owned by the user not the group.

And on a domain-based machine, this can be a domain policy that can't be
changed even by a member of the machine's Local Administrators group.
--
Fran





Acknowledgement sent to Francis Litterio <flitterio@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 14:29:43 +0000
Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.184])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85ETdk9029871
	for <865@HIDDEN>; Fri, 5 Sep 2008 07:29:41 -0700
Received: by ti-out-0910.google.com with SMTP id b6so319016tic.1
        for <865@HIDDEN>; Fri, 05 Sep 2008 07:29:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from
         :user-agent:mime-version:to:cc:subject:references:in-reply-to
         :content-type:content-transfer-encoding:sender;
        bh=c32cw2MTo99W+ziaxYk/sSnPJKb0kSQO2Y3CmQ9fDOI=;
        b=JpTiWhTQwl3I3/C8mBN+ioMy3NsoFgJZQf09TYNDTwRd9bSKVQwDANEdmj8m5gJv6v
         AgufQ2l7wlkumF0JjgfUQKPWo2uXnykZzD9sqjR4b3BtsWWks8A7n2WL46rZbqcxCef/
         6mGLpODbkbQnwTwfqg3HGz6RzZUdUP8va+l5Y=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:user-agent:mime-version:to:cc:subject
         :references:in-reply-to:content-type:content-transfer-encoding
         :sender;
        b=uSrvqnaudy7bIA7Pi2bAhMA71c9G5D7sw1zjimrbF5RpJicEw3Urf0tV71z+5aHw/2
         I8A6YU5aGzQxffHxfopRFnWMdSbTFPzTa2btn9GXhMxGJq5VoyXQ4xir0JbxKQcPV2K4
         tVnc/3xAXKSGJSb7ZVyIIp646GzbF31k4i68A=
Received: by 10.110.47.17 with SMTP id u17mr15059028tiu.27.1220624978680;
        Fri, 05 Sep 2008 07:29:38 -0700 (PDT)
Received: from ?10.0.1.4? ( [118.100.112.248])
        by mx.google.com with ESMTPS id 22sm615421tim.10.2008.09.05.07.29.36
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Fri, 05 Sep 2008 07:29:37 -0700 (PDT)
Message-ID: <48C14226.7080600@HIDDEN>
Date: Fri, 05 Sep 2008 22:28:54 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Lennart Borgman <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org
CC: Eli Zaretskii <eliz@HIDDEN>, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>	<u8wu6kgoz.fsf@HIDDEN> <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
In-Reply-To: <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Sender: Jason Rumney <jasonrumney@HIDDEN>

Lennart Borgman wrote:
> I thought that perhaps a workaround would be to changed the owner so I tested.
>
> I did a test on the directory where I had trouble. I did something like
>
>   (set-file-modes "serv2" ?\654)
>   

set-file-modes is just a wrapper for the chmod system function. On 
Windows, the chmod system function ignores all fields in the bitmask 
except the owner read and write flags, which it maps to the DOS readonly 
flag on files.






Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.6 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 14:27:24 +0000
Received: from mtaout4.012.net.il (mtaout4.012.net.il [84.95.2.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85ERHSo029637
	for <865@HIDDEN>; Fri, 5 Sep 2008 07:27:18 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6Q006G086BJRX0@i_mtaout4.012.net.il> for 865@HIDDEN; Fri, 05 Sep 2008 17:27:55 +0300 (IDT)
Date: Fri, 05 Sep 2008 17:27:05 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Lennart Borgman <lennart.borgman@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, monnier@HIDDEN,
        emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u7i9qk6rq.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
X-CrossAssassin-Score: 2

> Date: Fri, 5 Sep 2008 15:18:55 +0200
> From: "Lennart Borgman" <lennart.borgman@HIDDEN>
> Cc: "Stefan Monnier" <monnier@HIDDEN>, emacs-pretest-bug@HIDDEN
> 
> I did a test on the directory where I had trouble. I did something like
> 
>   (set-file-modes "serv2" ?\654)
> 
> CACLS still reports the same ACL entries.
> 
> I thought that maybe was because the owner is the group
> Administrators. However changing the owner to me and trying
> set-file-modes again gave the same result.
> 
> Am I perhaps not using set-file-modes correctly? (I get no errors.)

set-file-modes is only very crudely emulated on Windows.  In a
nutshell, the underlying primitive _chmod only considers the high 3
bits of the argument you pass to set-file-modes.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-9.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 14:29:55 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85ETqNJ029879
	for <submit@HIDDEN>; Fri, 5 Sep 2008 07:29:53 -0700
Received: from mail.gnu.org ([199.232.76.166]:39565 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <jasonrumney@HIDDEN>)
	id 1KbcIF-0002LR-25
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 10:28:11 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <jasonrumney@HIDDEN>)
	id 1KbcJj-0000o8-Sq
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 10:29:51 -0400
Received: from ti-out-0910.google.com ([209.85.142.187]:60231)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <jasonrumney@HIDDEN>)
	id 1KbcJi-0000n2-I7
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 10:29:43 -0400
Received: by ti-out-0910.google.com with SMTP id u5so288709tia.10
        for <emacs-pretest-bug@HIDDEN>; Fri, 05 Sep 2008 07:29:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from
         :user-agent:mime-version:to:cc:subject:references:in-reply-to
         :content-type:content-transfer-encoding:sender;
        bh=c32cw2MTo99W+ziaxYk/sSnPJKb0kSQO2Y3CmQ9fDOI=;
        b=JpTiWhTQwl3I3/C8mBN+ioMy3NsoFgJZQf09TYNDTwRd9bSKVQwDANEdmj8m5gJv6v
         AgufQ2l7wlkumF0JjgfUQKPWo2uXnykZzD9sqjR4b3BtsWWks8A7n2WL46rZbqcxCef/
         6mGLpODbkbQnwTwfqg3HGz6RzZUdUP8va+l5Y=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:user-agent:mime-version:to:cc:subject
         :references:in-reply-to:content-type:content-transfer-encoding
         :sender;
        b=uSrvqnaudy7bIA7Pi2bAhMA71c9G5D7sw1zjimrbF5RpJicEw3Urf0tV71z+5aHw/2
         I8A6YU5aGzQxffHxfopRFnWMdSbTFPzTa2btn9GXhMxGJq5VoyXQ4xir0JbxKQcPV2K4
         tVnc/3xAXKSGJSb7ZVyIIp646GzbF31k4i68A=
Received: by 10.110.47.17 with SMTP id u17mr15059028tiu.27.1220624978680;
        Fri, 05 Sep 2008 07:29:38 -0700 (PDT)
Received: from ?10.0.1.4? ( [118.100.112.248])
        by mx.google.com with ESMTPS id 22sm615421tim.10.2008.09.05.07.29.36
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Fri, 05 Sep 2008 07:29:37 -0700 (PDT)
Message-ID: <48C14226.7080600@HIDDEN>
Date: Fri, 05 Sep 2008 22:28:54 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Lennart Borgman <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org
CC: Eli Zaretskii <eliz@HIDDEN>, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>	<u8wu6kgoz.fsf@HIDDEN> <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
In-Reply-To: <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Sender: Jason Rumney <jasonrumney@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2)
X-CrossAssassin-Score: 2

Lennart Borgman wrote:
> I thought that perhaps a workaround would be to changed the owner so I tested.
>
> I did a test on the directory where I had trouble. I did something like
>
>   (set-file-modes "serv2" ?\654)
>   

set-file-modes is just a wrapper for the chmod system function. On 
Windows, the chmod system function ignores all fields in the bitmask 
except the owner read and write flags, which it maps to the DOS readonly 
flag on files.






Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.6 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 14:27:21 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85ERHc0029639
	for <submit@HIDDEN>; Fri, 5 Sep 2008 07:27:19 -0700
Received: from mx10.gnu.org ([199.232.76.166]:39295)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KbcFk-00083w-8A
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 10:25:36 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbcHK-0000EG-Jx
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 10:27:17 -0400
Received: from mtaout4.012.net.il ([84.95.2.10]:45631)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbcHK-0000E3-9N
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 10:27:14 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6Q006G086BJRX0@i_mtaout4.012.net.il> for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 17:27:55 +0300 (IDT)
Date: Fri, 05 Sep 2008 17:27:05 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Lennart Borgman <lennart.borgman@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, monnier@HIDDEN,
        emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u7i9qk6rq.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN> <u8wu6kgoz.fsf@HIDDEN> <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1

> Date: Fri, 5 Sep 2008 15:18:55 +0200
> From: "Lennart Borgman" <lennart.borgman@HIDDEN>
> Cc: "Stefan Monnier" <monnier@HIDDEN>, emacs-pretest-bug@HIDDEN
> 
> I did a test on the directory where I had trouble. I did something like
> 
>   (set-file-modes "serv2" ?\654)
> 
> CACLS still reports the same ACL entries.
> 
> I thought that maybe was because the owner is the group
> Administrators. However changing the owner to me and trying
> set-file-modes again gave the same result.
> 
> Am I perhaps not using set-file-modes correctly? (I get no errors.)

set-file-modes is only very crudely emulated on Windows.  In a
nutshell, the underlying primitive _chmod only considers the high 3
bits of the argument you pass to set-file-modes.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 13:19:01 +0000
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85DIvjr005378
	for <865@HIDDEN>; Fri, 5 Sep 2008 06:18:58 -0700
Received: by fg-out-1718.google.com with SMTP id l27so703157fgb.43
        for <865@HIDDEN>; Fri, 05 Sep 2008 06:18:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=5/MotRSSE2708IMUOyHr9V5jG1o7CpnXL7jc16aWaTU=;
        b=f+R0zS3mpl2aYuK7A8RFAkowpwOR2zLrGEksvYlcY7UD/FWTAxFfsAE5OJMzFAA3Fn
         KY6/sokqu4t/N3GL9khP+BSBAd7fX6X2avjra1xtWYG4apXomV6ihYv2GOxZktmG/ZeA
         GFVazBs1uh6wx3UVO69oGyPFjqMLZW1WAkLMc=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=xsiHpmaTk2ONUfYZUlxy2GWu1tR6SSKTlsT0C1b74cUYd9XYZmeOTspanbBwiBIViZ
         kiQ/onioAE/Pq6EG8mDdYYwQBDGB3J7n5KZaCCI7Y8JbqBrpoA0T1KaLDfQZ8rxlgWas
         T0QYIjwIUXLxSNJDGm10R1T2+PDX1etZUv8RU=
Received: by 10.86.87.5 with SMTP id k5mr8763859fgb.59.1220620736176;
        Fri, 05 Sep 2008 06:18:56 -0700 (PDT)
Received: by 10.86.65.3 with HTTP; Fri, 5 Sep 2008 06:18:55 -0700 (PDT)
Message-ID: <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
Date: Fri, 5 Sep 2008 15:18:55 +0200
From: "Lennart Borgman" <lennart.borgman@HIDDEN>
To: "Eli Zaretskii" <eliz@HIDDEN>, 865 <at> debbugs.gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: "Stefan Monnier" <monnier@HIDDEN>, emacs-pretest-bug@HIDDEN
In-Reply-To: <u8wu6kgoz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN>
	 <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	 <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	 <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	 <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	 <u8wu6kgoz.fsf@HIDDEN>

On 9/5/08, Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Stefan Monnier <monnier@HIDDEN>
> > Cc: 865@HIDDEN,  Jason Rumney <jasonr@HIDDEN>,  emacs-pretest-bug@HIDDEN
> > Date: Thu, 04 Sep 2008 23:11:10 -0400
> >
> > I think the problem comes earlier: the (let ((default-file-modes ?\700))
> > should make sure that the directory created there is owned by the use
> > and not by some Administator group.
>
> That's a different problem.  I don't see how it can be solved without
> introducing a new primitive, which on Windows will DTRT.  (I think
> GNU/Linux and Unix systems that support ACLs will need a similar
> primitive, but I don't know enough about those to say for sure.)

I thought that perhaps a workaround would be to changed the owner so I tested.

I did a test on the directory where I had trouble. I did something like

  (set-file-modes "serv2" ?\654)

CACLS still reports the same ACL entries.

I thought that maybe was because the owner is the group
Administrators. However changing the owner to me and trying
set-file-modes again gave the same result.

Am I perhaps not using set-file-modes correctly? (I get no errors.)




Acknowledgement sent to "Lennart Borgman" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,MDO_CABLE_TV3 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 13:17:07 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85DGwa9005146
	for <865@HIDDEN>; Fri, 5 Sep 2008 06:17:02 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApsEAHjNwEhFxJRU/2dsb2JhbACBZbU2gWWBBg
X-IronPort-AV: E=Sophos;i="4.32,320,1217822400"; 
   d="scan'208";a="26389525"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO pastel.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 05 Sep 2008 09:16:52 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 595718398; Fri,  5 Sep 2008 09:16:51 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
Date: Fri, 05 Sep 2008 09:16:51 -0400
In-Reply-To: <u8wu6kgoz.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 05 Sep
	2008 13:52:44 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> I think the problem comes earlier: the (let ((default-file-modes ?\700))
>> should make sure that the directory created there is owned by the use
>> and not by some Administator group.

> That's a different problem.  I don't see how it can be solved without
> introducing a new primitive, which on Windows will DTRT.  (I think
> GNU/Linux and Unix systems that support ACLs will need a similar
> primitive, but I don't know enough about those to say for sure.)

> There are a few other places in Emacs other than server.el that make
> similar tests, for reasons other than making sure the file/directory
> is private to the current user.  Here's the list:

>  files.el:file-ownership-preserved-p
>  eshell/em-ls.el:eshell-ls-applicable
>  net/ange-ftp.el:ange-ftp-parse-netrc

> (the last one is actually quite similar to server.el).

I think we need to consider the testing part and the file (or dir)
creation part separately.  And my previous messages pointed out that the
core problem (securitywise) is in the creation part, which is hence
unrelated to the above 3 other cases.

>> Of course, on FAT there's just nothing we can do and the
>> server-ensure-safe-dir functionality simply cannot be provided, so we
>> should then just skip the safety checks,

> On FAT, all files belong to a user called Everyone, who has a special
> UID of 0, so I think all these checks will simply pass, or at least
> they should.

No, they shouldn't, since the tests are meant to ensure that only the
current user has write access, whereas FAT cannot provide this behavior.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.8 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 13:19:07 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85DJ355005385
	for <submit@HIDDEN>; Fri, 5 Sep 2008 06:19:05 -0700
Received: from mail.gnu.org ([199.232.76.166]:60730 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KbbBi-000379-Hz
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 09:17:22 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KbbDG-0004BB-LC
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 09:19:03 -0400
Received: from fg-out-1718.google.com ([72.14.220.156]:45918)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KbbDG-0004Ar-0w
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 09:18:58 -0400
Received: by fg-out-1718.google.com with SMTP id l26so760096fgb.30
        for <emacs-pretest-bug@HIDDEN>; Fri, 05 Sep 2008 06:18:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=5/MotRSSE2708IMUOyHr9V5jG1o7CpnXL7jc16aWaTU=;
        b=f+R0zS3mpl2aYuK7A8RFAkowpwOR2zLrGEksvYlcY7UD/FWTAxFfsAE5OJMzFAA3Fn
         KY6/sokqu4t/N3GL9khP+BSBAd7fX6X2avjra1xtWYG4apXomV6ihYv2GOxZktmG/ZeA
         GFVazBs1uh6wx3UVO69oGyPFjqMLZW1WAkLMc=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=xsiHpmaTk2ONUfYZUlxy2GWu1tR6SSKTlsT0C1b74cUYd9XYZmeOTspanbBwiBIViZ
         kiQ/onioAE/Pq6EG8mDdYYwQBDGB3J7n5KZaCCI7Y8JbqBrpoA0T1KaLDfQZ8rxlgWas
         T0QYIjwIUXLxSNJDGm10R1T2+PDX1etZUv8RU=
Received: by 10.86.87.5 with SMTP id k5mr8763859fgb.59.1220620736176;
        Fri, 05 Sep 2008 06:18:56 -0700 (PDT)
Received: by 10.86.65.3 with HTTP; Fri, 5 Sep 2008 06:18:55 -0700 (PDT)
Message-ID: <e01d8a50809050618j3f2ba6a0of0eec8cdf7460e50@HIDDEN>
Date: Fri, 5 Sep 2008 15:18:55 +0200
From: "Lennart Borgman" <lennart.borgman@HIDDEN>
To: "Eli Zaretskii" <eliz@HIDDEN>, 865 <at> debbugs.gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: "Stefan Monnier" <monnier@HIDDEN>, emacs-pretest-bug@HIDDEN
In-Reply-To: <u8wu6kgoz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BDD155.8060005@HIDDEN>
	 <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	 <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	 <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	 <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	 <u8wu6kgoz.fsf@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2)
X-CrossAssassin-Score: 2

On 9/5/08, Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Stefan Monnier <monnier@HIDDEN>
> > Cc: 865@HIDDEN,  Jason Rumney <jasonr@HIDDEN>,  emacs-pretest-bug@HIDDEN
> > Date: Thu, 04 Sep 2008 23:11:10 -0400
> >
> > I think the problem comes earlier: the (let ((default-file-modes ?\700))
> > should make sure that the directory created there is owned by the use
> > and not by some Administator group.
>
> That's a different problem.  I don't see how it can be solved without
> introducing a new primitive, which on Windows will DTRT.  (I think
> GNU/Linux and Unix systems that support ACLs will need a similar
> primitive, but I don't know enough about those to say for sure.)

I thought that perhaps a workaround would be to changed the owner so I tested.

I did a test on the directory where I had trouble. I did something like

  (set-file-modes "serv2" ?\654)

CACLS still reports the same ACL entries.

I thought that maybe was because the owner is the group
Administrators. However changing the owner to me and trying
set-file-modes again gave the same result.

Am I perhaps not using set-file-modes correctly? (I get no errors.)




Acknowledgement sent to "Lennart Borgman" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.2 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,MDO_CABLE_TV3,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 13:17:18 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85DHACi005161
	for <submit@HIDDEN>; Fri, 5 Sep 2008 06:17:11 -0700
Received: from mx10.gnu.org ([199.232.76.166]:60567)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1Kbb9s-00012v-Po
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 09:15:29 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KbbBS-0003qX-9S
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 09:17:09 -0400
Received: from ironport2-out.pppoe.ca ([206.248.154.182]:25962 helo=ironport2-out.teksavvy.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KbbBN-0003np-Cv; Fri, 05 Sep 2008 09:17:01 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApsEAHjNwEhFxJRU/2dsb2JhbACBZbU2gWWBBg
X-IronPort-AV: E=Sophos;i="4.32,320,1217822400"; 
   d="scan'208";a="26389525"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO pastel.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 05 Sep 2008 09:16:52 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 595718398; Fri,  5 Sep 2008 09:16:51 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvwshqloq6.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
	<jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
	<u8wu6kgoz.fsf@HIDDEN>
Date: Fri, 05 Sep 2008 09:16:51 -0400
In-Reply-To: <u8wu6kgoz.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 05 Sep
	2008 13:52:44 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

>> I think the problem comes earlier: the (let ((default-file-modes ?\700))
>> should make sure that the directory created there is owned by the use
>> and not by some Administator group.

> That's a different problem.  I don't see how it can be solved without
> introducing a new primitive, which on Windows will DTRT.  (I think
> GNU/Linux and Unix systems that support ACLs will need a similar
> primitive, but I don't know enough about those to say for sure.)

> There are a few other places in Emacs other than server.el that make
> similar tests, for reasons other than making sure the file/directory
> is private to the current user.  Here's the list:

>  files.el:file-ownership-preserved-p
>  eshell/em-ls.el:eshell-ls-applicable
>  net/ange-ftp.el:ange-ftp-parse-netrc

> (the last one is actually quite similar to server.el).

I think we need to consider the testing part and the file (or dir)
creation part separately.  And my previous messages pointed out that the
core problem (securitywise) is in the creation part, which is hence
unrelated to the above 3 other cases.

>> Of course, on FAT there's just nothing we can do and the
>> server-ensure-safe-dir functionality simply cannot be provided, so we
>> should then just skip the safety checks,

> On FAT, all files belong to a user called Everyone, who has a special
> UID of 0, so I think all these checks will simply pass, or at least
> they should.

No, they shouldn't, since the tests are meant to ensure that only the
current user has write access, whereas FAT cannot provide this behavior.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,MDO_CABLE_TV3 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 10:52:55 +0000
Received: from mtaout7.012.net.il (mtaout7.012.net.il [84.95.2.19])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85AqpY7019611
	for <865@HIDDEN>; Fri, 5 Sep 2008 03:52:52 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6P005VAY90T1D0@HIDDEN> for 865@HIDDEN; Fri, 05 Sep 2008 13:53:29 +0300 (IDT)
Date: Fri, 05 Sep 2008 13:52:44 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u8wu6kgoz.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
X-CrossAssassin-Score: 2

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  Jason Rumney <jasonr@HIDDEN>,  emacs-pretest-bug@HIDDEN
> Date: Thu, 04 Sep 2008 23:11:10 -0400
> 
> I think the problem comes earlier: the (let ((default-file-modes ?\700))
> should make sure that the directory created there is owned by the use
> and not by some Administator group.

That's a different problem.  I don't see how it can be solved without
introducing a new primitive, which on Windows will DTRT.  (I think
GNU/Linux and Unix systems that support ACLs will need a similar
primitive, but I don't know enough about those to say for sure.)

There are a few other places in Emacs other than server.el that make
similar tests, for reasons other than making sure the file/directory
is private to the current user.  Here's the list:

 files.el:file-ownership-preserved-p
 eshell/em-ls.el:eshell-ls-applicable
 net/ange-ftp.el:ange-ftp-parse-netrc

(the last one is actually quite similar to server.el).

> Of course, on FAT there's just nothing we can do and the
> server-ensure-safe-dir functionality simply cannot be provided, so we
> should then just skip the safety checks,

On FAT, all files belong to a user called Everyone, who has a special
UID of 0, so I think all these checks will simply pass, or at least
they should.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.5 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,MDO_CABLE_TV3,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 10:52:55 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85AqpIt019613
	for <submit@HIDDEN>; Fri, 5 Sep 2008 03:52:53 -0700
Received: from mx10.gnu.org ([199.232.76.166]:48181)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KbYuE-00016I-NY
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 06:51:10 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbYvn-0002n8-Db
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 06:52:51 -0400
Received: from mtaout7.012.net.il ([84.95.2.19]:32234)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbYvm-0002mm-So; Fri, 05 Sep 2008 06:52:47 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6P005VAY90T1D0@HIDDEN>; Fri, 05 Sep 2008 13:53:29 +0300 (IDT)
Date: Fri, 05 Sep 2008 13:52:44 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u8wu6kgoz.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 865@HIDDEN,  Jason Rumney <jasonr@HIDDEN>,  emacs-pretest-bug@HIDDEN
> Date: Thu, 04 Sep 2008 23:11:10 -0400
> 
> I think the problem comes earlier: the (let ((default-file-modes ?\700))
> should make sure that the directory created there is owned by the use
> and not by some Administator group.

That's a different problem.  I don't see how it can be solved without
introducing a new primitive, which on Windows will DTRT.  (I think
GNU/Linux and Unix systems that support ACLs will need a similar
primitive, but I don't know enough about those to say for sure.)

There are a few other places in Emacs other than server.el that make
similar tests, for reasons other than making sure the file/directory
is private to the current user.  Here's the list:

 files.el:file-ownership-preserved-p
 eshell/em-ls.el:eshell-ls-applicable
 net/ange-ftp.el:ange-ftp-parse-netrc

(the last one is actually quite similar to server.el).

> Of course, on FAT there's just nothing we can do and the
> server-ensure-safe-dir functionality simply cannot be provided, so we
> should then just skip the safety checks,

On FAT, all files belong to a user called Everyone, who has a special
UID of 0, so I think all these checks will simply pass, or at least
they should.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 10:33:12 +0000
Received: from mtaout7.012.net.il (mtaout7.012.net.il [84.95.2.19])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85AX8QW012903
	for <865@HIDDEN>; Fri, 5 Sep 2008 03:33:10 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6P005X2XATT1B0@HIDDEN> for 865@HIDDEN; Fri, 05 Sep 2008 13:33:07 +0300 (IDT)
Date: Fri, 05 Sep 2008 13:32:12 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48C0654B.2010007@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: flitterio@HIDDEN, bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uabemkhn7.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN>

> Date: Fri, 05 Sep 2008 06:46:35 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> 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.





Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 10:33:14 +0000
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 <submit@HIDDEN>; Fri, 5 Sep 2008 03:33:12 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KbYco-0006dp-0u
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 06:33:10 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KbYcn-0006dY-4q
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 06:33:09 -0400
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@HIDDEN; Fri, 05 Sep 2008 06:33:08 -0400
Received: from mtaout7.012.net.il ([84.95.2.19]:28716)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbYci-0007MF-Bx; Fri, 05 Sep 2008 06:33:04 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6P005X2XATT1B0@HIDDEN>; Fri, 05 Sep 2008 13:33:07 +0300 (IDT)
Date: Fri, 05 Sep 2008 13:32:12 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48C0654B.2010007@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: flitterio@HIDDEN, bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uabemkhn7.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?)
X-CrossAssassin-Score: 2

> Date: Fri, 05 Sep 2008 06:46:35 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> 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.






Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 10:31:19 +0000
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 m85AVFeO012788
	for <submit@HIDDEN>; Fri, 5 Sep 2008 03:31:16 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KbYaw-0005fl-Ad
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 06:31:14 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KbYas-0005bg-17
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 06:31:10 -0400
Received: from [199.232.76.173] (port=43327 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KbYan-0005Ya-9I
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 06:31:06 -0400
Received: from fg-out-1718.google.com ([72.14.220.155]:2048)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KbYal-0006ly-Ii
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 06:31:03 -0400
Received: by fg-out-1718.google.com with SMTP id l26so727359fgb.30
        for <bug-gnu-emacs@HIDDEN>; Fri, 05 Sep 2008 03:29:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=4Zb9xRGcuJIPs9UP9oWPXO0LNUktZi+QwNTYsW5frSI=;
        b=jFhmLYRpBA+3Qkyh6Fyi1S3NuhMCXK5pu2sWtN4q92oQoYSFin5hBa7f6Q77O70x4B
         bNDRir7QRKGThkn4PmNjIKINj9rLlnaeYx5PqsNGFLAwhfKAQt3xaep6+PKZd//MzQs4
         xpxAiQfDQt0V0HcV0grs288KGJQwKt6UndFgo=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=nh6L+Wqql9qZtTUzWKExngE7mDMChEEeoVjbrWPW66grchier26/FWIvtw8shogtVl
         WrZgqoBM/77+AJDk9wGBi7iUkPnbfCZtgg44MM7vwwIcIzTrjFMRLTu9o2KRcctI4HUM
         lFwmjnUqD2EDOEVWZLiORhytxnYnScQdfEb3w=
Received: by 10.86.96.18 with SMTP id t18mr8658632fgb.1.1220610584077;
        Fri, 05 Sep 2008 03:29:44 -0700 (PDT)
Received: by 10.86.65.3 with HTTP; Fri, 5 Sep 2008 03:29:43 -0700 (PDT)
Message-ID: <e01d8a50809050329p7e945415o5e2c878aee4475d7@HIDDEN>
Date: Fri, 5 Sep 2008 12:29:43 +0200
From: "Lennart Borgman" <lennart.borgman@HIDDEN>
To: "Eli Zaretskii" <eliz@HIDDEN>, 865 <at> debbugs.gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: "Francis Litterio" <flitterio@HIDDEN>, bug-gnu-emacs@HIDDEN
In-Reply-To: <ufxoekjdg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <uy7297vtc.fsf@HIDDEN>
	 <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
	 <uej407fz6.fsf@HIDDEN>
	 <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>
	 <i5i6zlmnaoi7.fsf@HIDDEN>
	 <mailman.18443.1220551657.18990.bug-gnu-emacs@HIDDEN>
	 <i5i6tzcvahp5.fsf@HIDDEN> <ufxoekjdg.fsf@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2)
X-CrossAssassin-Score: 2

On 9/5/08, Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Francis Litterio <flitterio@HIDDEN>
> > Date: Thu, 04 Sep 2008 14:08:36 -0400
> > Cc:
> >
> > But if Windows says the file is owned by the Local Administrators group,
> > hasn't the information about which user created it been lost?  The file
> > is not truly owned by any single user.
> >
> > Thus, (nth 2 (file-attributes ...)) can never return a meaningful
> > existing user ID for a file that is owned by a group.
>
> Well, that's the problem we are trying to solve...

I think Stefan is suggesting what I suggested before: Change the owner.

But that does not necessarily help since it is the ACL lists that
tells who has access to the directory, not the owner.

Some comments on what is going on there so we can move forward to a
reasonable suggestion?





Acknowledgement sent to "Lennart Borgman" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=BAYES_00,GMAIL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 10:29:49 +0000
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85ATiN5011407
	for <865@HIDDEN>; Fri, 5 Sep 2008 03:29:47 -0700
Received: by fg-out-1718.google.com with SMTP id l27so672296fgb.43
        for <865@HIDDEN>; Fri, 05 Sep 2008 03:29:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=4Zb9xRGcuJIPs9UP9oWPXO0LNUktZi+QwNTYsW5frSI=;
        b=jFhmLYRpBA+3Qkyh6Fyi1S3NuhMCXK5pu2sWtN4q92oQoYSFin5hBa7f6Q77O70x4B
         bNDRir7QRKGThkn4PmNjIKINj9rLlnaeYx5PqsNGFLAwhfKAQt3xaep6+PKZd//MzQs4
         xpxAiQfDQt0V0HcV0grs288KGJQwKt6UndFgo=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=nh6L+Wqql9qZtTUzWKExngE7mDMChEEeoVjbrWPW66grchier26/FWIvtw8shogtVl
         WrZgqoBM/77+AJDk9wGBi7iUkPnbfCZtgg44MM7vwwIcIzTrjFMRLTu9o2KRcctI4HUM
         lFwmjnUqD2EDOEVWZLiORhytxnYnScQdfEb3w=
Received: by 10.86.96.18 with SMTP id t18mr8658632fgb.1.1220610584077;
        Fri, 05 Sep 2008 03:29:44 -0700 (PDT)
Received: by 10.86.65.3 with HTTP; Fri, 5 Sep 2008 03:29:43 -0700 (PDT)
Message-ID: <e01d8a50809050329p7e945415o5e2c878aee4475d7@HIDDEN>
Date: Fri, 5 Sep 2008 12:29:43 +0200
From: "Lennart Borgman" <lennart.borgman@HIDDEN>
To: "Eli Zaretskii" <eliz@HIDDEN>, 865 <at> debbugs.gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: "Francis Litterio" <flitterio@HIDDEN>, bug-gnu-emacs@HIDDEN
In-Reply-To: <ufxoekjdg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <uy7297vtc.fsf@HIDDEN>
	 <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
	 <uej407fz6.fsf@HIDDEN>
	 <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>
	 <i5i6zlmnaoi7.fsf@HIDDEN>
	 <mailman.18443.1220551657.18990.bug-gnu-emacs@HIDDEN>
	 <i5i6tzcvahp5.fsf@HIDDEN> <ufxoekjdg.fsf@HIDDEN>

On 9/5/08, Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Francis Litterio <flitterio@HIDDEN>
> > Date: Thu, 04 Sep 2008 14:08:36 -0400
> > Cc:
> >
> > But if Windows says the file is owned by the Local Administrators group,
> > hasn't the information about which user created it been lost?  The file
> > is not truly owned by any single user.
> >
> > Thus, (nth 2 (file-attributes ...)) can never return a meaningful
> > existing user ID for a file that is owned by a group.
>
> Well, that's the problem we are trying to solve...

I think Stefan is suggesting what I suggested before: Change the owner.

But that does not necessarily help since it is the ACL lists that
tells who has access to the directory, not the owner.

Some comments on what is going on there so we can move forward to a
reasonable suggestion?




Acknowledgement sent to "Lennart Borgman" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_NIX1 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 10:21:42 +0000
Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85ALcA6009371
	for <865@HIDDEN>; Fri, 5 Sep 2008 03:21:40 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6P0052LWSY1NK0@i_mtaout3.012.net.il> for 865@HIDDEN; Fri, 05 Sep 2008 13:22:14 +0300 (IDT)
Date: Fri, 05 Sep 2008 13:21:29 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48C06672.7080909@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ubpz2ki52.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <48C06672.7080909@HIDDEN>

> Date: Fri, 05 Sep 2008 06:51:30 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> CC: 865@HIDDEN, emacs-pretest-bug@HIDDEN
> 
> > But in other cases, Emacs could compare the ownership to a UID
> > of some other user, and what will we do then?
> >   
> 
> I can't imagine any Lisp code doing this, as it will not know which 
> other users are on the system.

It's quite easy to enumerate users defined on a system, both on Unix
and Windows.  Also, the user ID could be recorded in a file.  See, for
example, vc-rcs.el, where it checks whether the current user is the
one who locked the file.  (We are lucky that it compares user _names_
rather than UIDs.)




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 10:21:45 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m85ALfOn009374
	for <submit@HIDDEN>; Fri, 5 Sep 2008 03:21:42 -0700
Received: from mx10.gnu.org ([199.232.76.166]:45024)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KbYQ4-0002GR-4t
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 06:20:00 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbYRc-0005I2-Ts
	for emacs-pretest-bug@HIDDEN; Fri, 05 Sep 2008 06:21:40 -0400
Received: from mtaout3.012.net.il ([84.95.2.7]:61867)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbYRc-0005HO-Im; Fri, 05 Sep 2008 06:21:36 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6P0052LWSY1NK0@i_mtaout3.012.net.il>; Fri, 05 Sep 2008 13:22:14 +0300 (IDT)
Date: Fri, 05 Sep 2008 13:21:29 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48C06672.7080909@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ubpz2ki52.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN> <48C06672.7080909@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1
X-CrossAssassin-Score: 2

> Date: Fri, 05 Sep 2008 06:51:30 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> CC: 865@HIDDEN, emacs-pretest-bug@HIDDEN
> 
> > But in other cases, Emacs could compare the ownership to a UID
> > of some other user, and what will we do then?
> >   
> 
> I can't imagine any Lisp code doing this, as it will not know which 
> other users are on the system.

It's quite easy to enumerate users defined on a system, both on Unix
and Windows.  Also, the user ID could be recorded in a file.  See, for
example, vc-rcs.el, where it checks whether the current user is the
one who locked the file.  (We are lucky that it compares user _names_
rather than UIDs.)




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 09:55:05 +0000
Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m859t0hu031415
	for <865@HIDDEN>; Fri, 5 Sep 2008 02:55:01 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6P00AENVKL84C0@i_mtaout3.012.net.il> for 865@HIDDEN; Fri, 05 Sep 2008 12:55:37 +0300 (IDT)
Date: Fri, 05 Sep 2008 12:54:51 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i6tzcvahp5.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ufxoekjdg.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN> <mailman.18443.1220551657.18990.bug-gnu-emacs@HIDDEN> <i5i6tzcvahp5.fsf@HIDDEN>
X-CrossAssassin-Score: 2

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Thu, 04 Sep 2008 14:08:36 -0400
> Cc: 
> 
> But if Windows says the file is owned by the Local Administrators group,
> hasn't the information about which user created it been lost?  The file
> is not truly owned by any single user.
> 
> Thus, (nth 2 (file-attributes ...)) can never return a meaningful
> existing user ID for a file that is owned by a group.

Well, that's the problem we are trying to solve...




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW,RCVD_IN_NIX1 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 09:55:03 +0000
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 m859swqR031416
	for <submit@HIDDEN>; Fri, 5 Sep 2008 02:55:00 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KbY1q-0005Jm-F2
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 05:54:58 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KbY1o-0005JZ-44
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 05:54:57 -0400
Received: from [199.232.76.173] (port=40943 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KbY1n-0005JW-U8
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 05:54:55 -0400
Received: from mtaout3.012.net.il ([84.95.2.7]:57293)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbY1n-0001A1-VP
	for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 05:54:56 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6P00AENVKL84C0@i_mtaout3.012.net.il> for bug-gnu-emacs@HIDDEN; Fri, 05 Sep 2008 12:55:37 +0300 (IDT)
Date: Fri, 05 Sep 2008 12:54:51 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i6tzcvahp5.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ufxoekjdg.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN> <mailman.18443.1220551657.18990.bug-gnu-emacs@HIDDEN> <i5i6tzcvahp5.fsf@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Thu, 04 Sep 2008 14:08:36 -0400
> Cc: 
> 
> But if Windows says the file is owned by the Local Administrators group,
> hasn't the information about which user created it been lost?  The file
> is not truly owned by any single user.
> 
> Thus, (nth 2 (file-attributes ...)) can never return a meaningful
> existing user ID for a file that is owned by a group.

Well, that's the problem we are trying to solve...





Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 5 Sep 2008 03:11:22 +0000
Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m853BGwZ023175
	for <865@HIDDEN>; Thu, 4 Sep 2008 20:11:19 -0700
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhoFAKs/wEhFxJRU/2dsb2JhbACBZbVWgWWBBg
X-IronPort-AV: E=Sophos;i="4.32,320,1217822400"; 
   d="scan'208";a="26376067"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO ceviche.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 04 Sep 2008 23:11:10 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 7DA9AB405D; Thu,  4 Sep 2008 23:11:10 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, Jason Rumney <jasonr@HIDDEN>,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
Date: Thu, 04 Sep 2008 23:11:10 -0400
In-Reply-To: <u8wu77uyc.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 04 Sep
	2008 19:10:51 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> If we are going to attempt this, then it is better to tell a lie
>> that fits with the expectations of POSIX (ie that owners of files
>> are individual users).

> The problem is, I don't see how we can do this reliably.  In this
> particular case, Emacs compares the file's ownership with the UID of
> the user running Emacs, so we could pretend the file is owned by that
> user.  But in other cases, Emacs could compare the ownership to a UID
> of some other user, and what will we do then?

I think the problem comes earlier: the (let ((default-file-modes ?\700))
should make sure that the directory created there is owned by the use
and not by some Administator group.

Of course, on FAT there's just nothing we can do and the
server-ensure-safe-dir functionality simply cannot be provided, so we
should then just skip the safety checks,


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 5 Sep 2008 03:11:24 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m853BKK9023177
	for <submit@HIDDEN>; Thu, 4 Sep 2008 20:11:21 -0700
Received: from mx10.gnu.org ([199.232.76.166]:46556)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1KbRhb-0003jv-OI
	for emacs-pretest-bug@HIDDEN; Thu, 04 Sep 2008 23:09:39 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KbRjA-0006JF-GC
	for emacs-pretest-bug@HIDDEN; Thu, 04 Sep 2008 23:11:20 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:4279)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KbRj5-0006In-Re; Thu, 04 Sep 2008 23:11:11 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhoFAKs/wEhFxJRU/2dsb2JhbACBZbVWgWWBBg
X-IronPort-AV: E=Sophos;i="4.32,320,1217822400"; 
   d="scan'208";a="26376067"
Received: from 69-196-148-84.dsl.teksavvy.com (HELO ceviche.home) ([69.196.148.84])
  by ironport2-out.teksavvy.com with ESMTP; 04 Sep 2008 23:11:10 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 7DA9AB405D; Thu,  4 Sep 2008 23:11:10 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, Jason Rumney <jasonr@HIDDEN>,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvmyin47dh.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
Date: Thu, 04 Sep 2008 23:11:10 -0400
In-Reply-To: <u8wu77uyc.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 04 Sep
	2008 19:10:51 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

>> If we are going to attempt this, then it is better to tell a lie
>> that fits with the expectations of POSIX (ie that owners of files
>> are individual users).

> The problem is, I don't see how we can do this reliably.  In this
> particular case, Emacs compares the file's ownership with the UID of
> the user running Emacs, so we could pretend the file is owned by that
> user.  But in other cases, Emacs could compare the ownership to a UID
> of some other user, and what will we do then?

I think the problem comes earlier: the (let ((default-file-modes ?\700))
should make sure that the directory created there is owned by the use
and not by some Administator group.

Of course, on FAT there's just nothing we can do and the
server-ensure-safe-dir functionality simply cannot be provided, so we
should then just skip the safety checks,


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 4 Sep 2008 23:25:50 +0000
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84NPkL5010120
	for <865@HIDDEN>; Thu, 4 Sep 2008 16:25:47 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:60771 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KbOCv-0005oo-59; Fri, 05 Sep 2008 01:25:45 +0200
Message-ID: <48C06E74.9050006@HIDDEN>
Date: Fri, 05 Sep 2008 01:25:40 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Jason Rumney <jasonr@HIDDEN>, 865 <at> debbugs.gnu.org
CC: Francis Litterio <flitterio@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN>	<48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN>	<48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN>	<uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN>	<uej407fz6.fsf@HIDDEN>	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>	<i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN>
In-Reply-To: <48C0654B.2010007@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080904-1, 2008-09-04), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1KbOCv-0005oo-59.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KbOCv-0005oo-59 c6a433d4b03e2d210ee33ce4f6b951c1

Jason Rumney wrote:
> Francis Litterio wrote:
>> Doesn't POSIX define both a user owner and group owner for each file?
>> Could a Windows file owned by a group be mapped to POSIX by showing the
>> Windows group as the POSIX group owner and a pseudo-user (e.g., nobody,
>> root, emacs) as the user owner?
>>   
> 
> Under POSIX, the user is the owner, and the group is there for assigning
> wider permissions for a file without opening it to the world. I've never
> heard it referred to as group owner, and it is different than the
> situation on Windows where an ACL may contain a group as the
> creator/owner of a file.


I searched a bit for a good explanation of owner and ACL on w32. This
page looks ok to me:

  http://setacl.sourceforge.net/html/doc-basics.html

Notice that access is controled by the ACLs, not the owner. The owner
has however the right to change the ACLs.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 4 Sep 2008 23:18:05 +0000
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84NI1qx007013
	for <865@HIDDEN>; Thu, 4 Sep 2008 16:18:02 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:60485 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KbO5Q-0000Oc-45; Fri, 05 Sep 2008 01:18:00 +0200
Message-ID: <48C06CA2.9070500@HIDDEN>
Date: Fri, 05 Sep 2008 01:17:54 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Jason Rumney <jasonr@HIDDEN>, 865 <at> debbugs.gnu.org
CC: Francis Litterio <flitterio@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN>	<48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN>	<48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN>	<uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN>	<uej407fz6.fsf@HIDDEN>	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>	<i5i6zlmnaoi7.fsf@HIDDEN> <48C0654B.2010007@HIDDEN>
In-Reply-To: <48C0654B.2010007@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080904-1, 2008-09-04), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1KbO5Q-0000Oc-45.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KbO5Q-0000Oc-45 6d1808357e81baefc8bac06315676db4

Jason Rumney wrote:
> Francis Litterio wrote:
>> Doesn't POSIX define both a user owner and group owner for each file?
>> Could a Windows file owned by a group be mapped to POSIX by showing the
>> Windows group as the POSIX group owner and a pseudo-user (e.g., nobody,
>> root, emacs) as the user owner?
>>   
> 
> Under POSIX, the user is the owner, and the group is there for assigning
> wider permissions for a file without opening it to the world. I've never
> heard it referred to as group owner, and it is different than the
> situation on Windows where an ACL may contain a group as the
> creator/owner of a file.

Is the owner really in the ACL? Is not owner a separate property on w32?

I do not remember how these are related any more.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 4 Sep 2008 22:52:24 +0000
Received: from mk-outboundfilter-4.mail.uk.tiscali.com (mk-outboundfilter-4.mail.uk.tiscali.com [212.74.114.32])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84MqLSS030141
	for <865@HIDDEN>; Thu, 4 Sep 2008 15:52:22 -0700
X-Trace: 132249858/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.237.250
X-SBRS: None
X-RemoteIP: 124.82.237.250
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AocBAEADwEh8Uu36/2dsb2JhbAAIsRGHA4Fl
X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; 
   d="scan'208";a="132249858"
X-IP-Direction: OUT
Received: from unknown (HELO [172.16.0.17]) ([124.82.237.250])
  by smtp.f2s.tiscali.co.uk with ESMTP; 04 Sep 2008 23:52:13 +0100
Message-ID: <48C06672.7080909@HIDDEN>
Date: Fri, 05 Sep 2008 06:51:30 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
In-Reply-To: <u8wu77uyc.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Eli Zaretskii wrote:

> The current lie is relatively small: it is limited to the
> interpretation of the group ID, while the owner of the file is
> displayed and interpreted correctly.
>
>   
>> If we are going to attempt this, then it is better to tell a lie
>> that fits with the expectations of POSIX (ie that owners of files
>> are individual users).
>>     
>
> The problem is, I don't see how we can do this reliably.  In this
> particular case, Emacs compares the file's ownership with the UID of
> the user running Emacs, so we could pretend the file is owned by that
> user.  But in other cases, Emacs could compare the ownership to a UID
> of some other user, and what will we do then?
>   

I can't imagine any Lisp code doing this, as it will not know which 
other users are on the system. The only use for checking the owner seems 
to be to check if the current user is the owner. Rather than a 
technically correct mapping of ownership to groups, I think it is better 
for users if the mapping reflects whether the current user has ownership 
(individually or through a group they are a member of) so that such 
binary tests can work.





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2008 22:52:27 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84MqOVh030247
	for <submit@HIDDEN>; Thu, 4 Sep 2008 15:52:25 -0700
Received: from mx10.gnu.org ([199.232.76.166]:57431)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <jasonr@HIDDEN>)
	id 1KbNf1-00014b-Lc
	for emacs-pretest-bug@HIDDEN; Thu, 04 Sep 2008 18:50:43 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1KbNgb-0006hr-33
	for emacs-pretest-bug@HIDDEN; Thu, 04 Sep 2008 18:52:23 -0400
Received: from mk-outboundfilter-4.mail.uk.tiscali.com ([212.74.114.32]:50077)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1KbNgX-0006hK-4q; Thu, 04 Sep 2008 18:52:17 -0400
X-Trace: 132249858/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.237.250
X-SBRS: None
X-RemoteIP: 124.82.237.250
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AocBAEADwEh8Uu36/2dsb2JhbAAIsRGHA4Fl
X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; 
   d="scan'208";a="132249858"
X-IP-Direction: OUT
Received: from unknown (HELO [172.16.0.17]) ([124.82.237.250])
  by smtp.f2s.tiscali.co.uk with ESMTP; 04 Sep 2008 23:52:13 +0100
Message-ID: <48C06672.7080909@HIDDEN>
Date: Fri, 05 Sep 2008 06:51:30 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN> <u8wu77uyc.fsf@HIDDEN>
In-Reply-To: <u8wu77uyc.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

Eli Zaretskii wrote:

> The current lie is relatively small: it is limited to the
> interpretation of the group ID, while the owner of the file is
> displayed and interpreted correctly.
>
>   
>> If we are going to attempt this, then it is better to tell a lie
>> that fits with the expectations of POSIX (ie that owners of files
>> are individual users).
>>     
>
> The problem is, I don't see how we can do this reliably.  In this
> particular case, Emacs compares the file's ownership with the UID of
> the user running Emacs, so we could pretend the file is owned by that
> user.  But in other cases, Emacs could compare the ownership to a UID
> of some other user, and what will we do then?
>   

I can't imagine any Lisp code doing this, as it will not know which 
other users are on the system. The only use for checking the owner seems 
to be to check if the current user is the owner. Rather than a 
technically correct mapping of ownership to groups, I think it is better 
for users if the mapping reflects whether the current user has ownership 
(individually or through a group they are a member of) so that such 
binary tests can work.





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 4 Sep 2008 22:47:31 +0000
Received: from mk-outboundfilter-4.mail.uk.tiscali.com (mk-outboundfilter-4.mail.uk.tiscali.com [212.74.114.32])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84MlR68028535
	for <865@HIDDEN>; Thu, 4 Sep 2008 15:47:29 -0700
X-Trace: 132248737/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.237.70
X-SBRS: None
X-RemoteIP: 124.82.237.70
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AocBAAECwEh8Uu1G/2dsb2JhbAAIsSeHB4Fl
X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; 
   d="scan'208";a="132248737"
X-IP-Direction: OUT
Received: from unknown (HELO [172.16.0.17]) ([124.82.237.70])
  by smtp.f2s.tiscali.co.uk with ESMTP; 04 Sep 2008 23:47:19 +0100
Message-ID: <48C0654B.2010007@HIDDEN>
Date: Fri, 05 Sep 2008 06:46:35 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN>
In-Reply-To: <i5i6zlmnaoi7.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Francis Litterio wrote:
> Doesn't POSIX define both a user owner and group owner for each file?
> Could a Windows file owned by a group be mapped to POSIX by showing the
> Windows group as the POSIX group owner and a pseudo-user (e.g., nobody,
> root, emacs) as the user owner?
>   

Under POSIX, the user is the owner, and the group is there for assigning 
wider permissions for a file without opening it to the world. I've never 
heard it referred to as group owner, and it is different than the 
situation on Windows where an ACL may contain a group as the 
creator/owner of a file.

Making the owner `nobody' would not fix the problem that the current ACL 
mapping causes. I would surmise that the only use of these fields that 
lisp code has is to test if the current user owns a file. Lisp code does 
not know about the other users or groups that are configured on the 
system, so it isn't going to care about exactly who the other users are. 
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. In the case where they aren't a member of 
that group, I don't think it causes problems to report the group as the 
owner, since to Lisp code, any other owner means "not me".





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.0 required=4.0 tests=AWL,BAYES_00,FOURLA,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2008 18:30:28 +0000
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 m84IUOaZ004200
	for <submit@HIDDEN>; Thu, 4 Sep 2008 11:30:25 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KbJb5-0000RB-M9
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 14:30:23 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KbJb4-0000PJ-5q
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 14:30:23 -0400
Received: from [199.232.76.173] (port=56236 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KbJb3-0000Ot-Rv
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 14:30:21 -0400
Received: from pcls5.std.com ([192.74.137.145]:38295 helo=TheWorld.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <flitterio@HIDDEN>)
	id 1KbJb3-0000UP-26
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 14:30:21 -0400
Received: from usenlittefl1c.theworld.com (IDENT:105@HIDDEN [192.74.137.71])
	by TheWorld.com (8.13.6/8.13.6) with ESMTP id m84ISsX5031176
	for <bug-gnu-emacs@HIDDEN>; Thu, 4 Sep 2008 14:28:57 -0400
From: Francis Litterio <flitterio@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Date: Thu, 04 Sep 2008 14:08:36 -0400
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>
	<i5i6zlmnaoi7.fsf@HIDDEN>
	<mailman.18443.1220551657.18990.bug-gnu-emacs@HIDDEN>
X-Random-Quote: It is not the man who has too little, but the man who
	craves more, that is poor. -- Seneca (5 BC - 65), Epistles
In-Reply-To: <mailman.18443.1220551657.18990.bug-gnu-emacs@HIDDEN> (Eli
	Zaretskii's message of "Thu, 04 Sep 2008 20:40:00 +0300")
Message-ID: <i5i6tzcvahp5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.

Eli Zaretskii wrote:

>> From: Francis Litterio <flitterio@HIDDEN>
>> 
>> Could a Windows file owned by a group be mapped to POSIX by showing the
>> Windows group as the POSIX group owner and a pseudo-user (e.g., nobody,
>> root, emacs) as the user owner?
>
> How will this help the following code work on Windows, when the owner
> of the file is reported as the Administrators group (whose ID is 544),
> and the UID of the user who created the file is different (because she
> belongs to the local admins group)?
>
>   (or (eql (nth 2 (file-attributes FILE)) (user-uid))
>       (scream-bloody-murder))

My suggestion wouldn't help in this case, because it would cause (nth 2
(file-attributes ...)) to return a value that does not match any
existing user.

But if Windows says the file is owned by the Local Administrators group,
hasn't the information about which user created it been lost?  The file
is not truly owned by any single user.

Thus, (nth 2 (file-attributes ...)) can never return a meaningful
existing user ID for a file that is owned by a group.
--
Fran





Acknowledgement sent to Francis Litterio <flitterio@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,FOURLA,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 4 Sep 2008 17:40:48 +0000
Received: from mtaout7.012.net.il (mtaout7.012.net.il [84.95.2.19])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84HeiHH018777
	for <865@HIDDEN>; Thu, 4 Sep 2008 10:40:45 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6O004DIMFT9CC0@HIDDEN> for 865@HIDDEN; Thu, 04 Sep 2008 20:40:41 +0300 (IDT)
Date: Thu, 04 Sep 2008 20:40:00 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i6zlmnaoi7.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uiqtbkdxr.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN>

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Thu, 04 Sep 2008 11:56:39 -0400
> Cc: 
> 
> Could a Windows file owned by a group be mapped to POSIX by showing the
> Windows group as the POSIX group owner and a pseudo-user (e.g., nobody,
> root, emacs) as the user owner?

How will this help the following code work on Windows, when the owner
of the file is reported as the Administrators group (whose ID is 544),
and the UID of the user who created the file is different (because she
belongs to the local admins group)?

  (or (eql (nth 2 (file-attributes FILE)) (user-uid))
      (scream-bloody-murder))




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2008 17:40:59 +0000
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 m84HesYv018784
	for <submit@HIDDEN>; Thu, 4 Sep 2008 10:40:56 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KbIpB-00075p-9h
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 13:40:53 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KbIpA-00074q-FA
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 13:40:52 -0400
Received: from [199.232.76.173] (port=37380 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KbIp9-00074Y-Uq
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 13:40:52 -0400
Received: from mtaout7.012.net.il ([84.95.2.19]:55917)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbIp9-0006uq-4M
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 13:40:51 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6O004DIMFT9CC0@HIDDEN> for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 20:40:42 +0300 (IDT)
Date: Thu, 04 Sep 2008 20:40:00 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <i5i6zlmnaoi7.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Francis Litterio <flitterio@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uiqtbkdxr.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> <i5i6zlmnaoi7.fsf@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?)
X-CrossAssassin-Score: 2

> From: Francis Litterio <flitterio@HIDDEN>
> Date: Thu, 04 Sep 2008 11:56:39 -0400
> Cc: 
> 
> Could a Windows file owned by a group be mapped to POSIX by showing the
> Windows group as the POSIX group owner and a pseudo-user (e.g., nobody,
> root, emacs) as the user owner?

How will this help the following code work on Windows, when the owner
of the file is reported as the Administrators group (whose ID is 544),
and the UID of the user who created the file is different (because she
belongs to the local admins group)?

  (or (eql (nth 2 (file-attributes FILE)) (user-uid))
      (scream-bloody-murder))





Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 4 Sep 2008 16:11:04 +0000
Received: from mtaout7.012.net.il (mtaout7.012.net.il [84.95.2.19])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84GAtwO018975
	for <865@HIDDEN>; Thu, 4 Sep 2008 09:10:57 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6O001EJIB7I8O0@HIDDEN> for 865@HIDDEN; Thu, 04 Sep 2008 19:11:32 +0300 (IDT)
Date: Thu, 04 Sep 2008 19:10:51 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BF5671.1040705@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u8wu77uyc.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN>

> Date: Thu, 04 Sep 2008 11:30:57 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> CC: 865@HIDDEN, emacs-pretest-bug@HIDDEN
> 
> > I think the only good solution in that venue would be to have a new
> > primitive for such tests, and implement it on Windows so that it will
> > cater to this special case.  Any other solution is likely to lie about
> > the file's security attributes.
> >   
> 
> We are telling a lie already by attempting to map ACLs to POSIX 
> ownership.

The current lie is relatively small: it is limited to the
interpretation of the group ID, while the owner of the file is
displayed and interpreted correctly.

> If we are going to attempt this, then it is better to tell a lie
> that fits with the expectations of POSIX (ie that owners of files
> are individual users).

The problem is, I don't see how we can do this reliably.  In this
particular case, Emacs compares the file's ownership with the UID of
the user running Emacs, so we could pretend the file is owned by that
user.  But in other cases, Emacs could compare the ownership to a UID
of some other user, and what will we do then?

That said, I won't necessarily object if you find a clever way out of
this that leaves existing Lisp code intact.

> A different API that tells the full story might be a good idea, but
> any new API is only going to be used by future developers who know
> about the API, it cannot fix problems in existing Lisp code that
> might make the same assumptions as server.el.

We are talking about Emacs 23, so it's not too late to find all those
places (only in the Emacs distro, of course) and fix them.  I just
looked, there aren't so many of them.  And server.el should have an
entirely different code to do what it wants on Windows, anyway.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2008 16:10:59 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84GAtsP018978
	for <submit@HIDDEN>; Thu, 4 Sep 2008 09:10:56 -0700
Received: from mx10.gnu.org ([199.232.76.166]:55294)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KbHOV-0008B6-8z
	for emacs-pretest-bug@HIDDEN; Thu, 04 Sep 2008 12:09:15 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbHQ2-0007CJ-TU
	for emacs-pretest-bug@HIDDEN; Thu, 04 Sep 2008 12:10:54 -0400
Received: from mtaout7.012.net.il ([84.95.2.19]:37121)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KbHQ2-0007C3-AD; Thu, 04 Sep 2008 12:10:50 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6O001EJIB7I8O0@HIDDEN>; Thu, 04 Sep 2008 19:11:32 +0300 (IDT)
Date: Thu, 04 Sep 2008 19:10:51 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BF5671.1040705@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u8wu77uyc.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN> <48BF5671.1040705@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?)
X-CrossAssassin-Score: 2

> Date: Thu, 04 Sep 2008 11:30:57 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> CC: 865@HIDDEN, emacs-pretest-bug@HIDDEN
> 
> > I think the only good solution in that venue would be to have a new
> > primitive for such tests, and implement it on Windows so that it will
> > cater to this special case.  Any other solution is likely to lie about
> > the file's security attributes.
> >   
> 
> We are telling a lie already by attempting to map ACLs to POSIX 
> ownership.

The current lie is relatively small: it is limited to the
interpretation of the group ID, while the owner of the file is
displayed and interpreted correctly.

> If we are going to attempt this, then it is better to tell a lie
> that fits with the expectations of POSIX (ie that owners of files
> are individual users).

The problem is, I don't see how we can do this reliably.  In this
particular case, Emacs compares the file's ownership with the UID of
the user running Emacs, so we could pretend the file is owned by that
user.  But in other cases, Emacs could compare the ownership to a UID
of some other user, and what will we do then?

That said, I won't necessarily object if you find a clever way out of
this that leaves existing Lisp code intact.

> A different API that tells the full story might be a good idea, but
> any new API is only going to be used by future developers who know
> about the API, it cannot fix problems in existing Lisp code that
> might make the same assumptions as server.el.

We are talking about Emacs 23, so it's not too late to find all those
places (only in the Emacs distro, of course) and fix them.  I just
looked, there aren't so many of them.  And server.el should have an
entirely different code to do what it wants on Windows, anyway.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2008 16:02:21 +0000
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 m84G2H79014881
	for <submit@HIDDEN>; Thu, 4 Sep 2008 09:02:18 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KbHHk-0000AM-U4
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 12:02:17 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KbHHj-00008t-Ru
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 12:02:16 -0400
Received: from [199.232.76.173] (port=41213 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KbHHj-00008V-LN
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 12:02:15 -0400
Received: from pcls4.std.com ([192.74.137.84]:37364 helo=TheWorld.com)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <flitterio@HIDDEN>)
	id 1KbHHg-00053V-NC
	for bug-gnu-emacs@HIDDEN; Thu, 04 Sep 2008 12:02:13 -0400
Received: from usenlittefl1c.theworld.com (IDENT:105@HIDDEN [192.74.137.71])
	by TheWorld.com (8.13.6/8.13.6) with ESMTP id m84G1qIl025682
	for <bug-gnu-emacs@HIDDEN>; Thu, 4 Sep 2008 12:01:54 -0400
From: Francis Litterio <flitterio@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Date: Thu, 04 Sep 2008 11:56:39 -0400
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
	<48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
	<mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN>
X-Random-Quote: Those who profess to favor freedom, and yet deprecate
	agitation, are men who want rain without thunder and lightning.
	They want the ocean without the roar of its many waters. --
	Frederick Douglass
In-Reply-To: <mailman.18384.1220500061.18990.bug-gnu-emacs@HIDDEN> (Jason
	Rumney's message of "Thu, 04 Sep 2008 11:30:57 +0800")
Message-ID: <i5i6zlmnaoi7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6

Jason Rumney wrote:

> Eli Zaretskii wrote:
>>> From: Jason Rumney

>>>>   (or (eql (nth 2 attrs) (user-uid))
>>>>       (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))

>>> I am trying to find a solution that will work without Lisp coders needing to
>>> be aware of the strange situation on Windows that files can be owned by a
>>> group.

>> I think the only good solution in that venue would be to have a new
>> primitive for such tests, and implement it on Windows so that it will
>> cater to this special case.  Any other solution is likely to lie about
>> the file's security attributes.

> We are telling a lie already by attempting to map ACLs to POSIX ownership. If we
> are going to attempt this, then it is better to tell a lie that fits with the
> expectations of POSIX (ie that owners of files are individual users).

Doesn't POSIX define both a user owner and group owner for each file?
Could a Windows file owned by a group be mapped to POSIX by showing the
Windows group as the POSIX group owner and a pseudo-user (e.g., nobody,
root, emacs) as the user owner?
--
Fran





Acknowledgement sent to Francis Litterio <flitterio@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 4 Sep 2008 03:31:54 +0000
Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m843VpoI021443
	for <865@HIDDEN>; Wed, 3 Sep 2008 20:31:52 -0700
X-Trace: 78185116/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/61.4.103.130
X-SBRS: None
X-RemoteIP: 61.4.103.130
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ag0BABzzvkg9BGeC/2dsb2JhbAAItw2BZw
X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; 
   d="scan'208";a="78185116"
X-IP-Direction: OUT
Received: from unknown (HELO [10.1.1.113]) ([61.4.103.130])
  by smtp.f2s.tiscali.co.uk with ESMTP; 04 Sep 2008 04:31:42 +0100
Message-ID: <48BF5671.1040705@HIDDEN>
Date: Thu, 04 Sep 2008 11:30:57 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
In-Reply-To: <uej407fz6.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Eli Zaretskii wrote:
>> Date: Thu, 04 Sep 2008 07:44:49 +0800
>> From: Jason Rumney <jasonr@HIDDEN>
>> CC: 865@HIDDEN, emacs-pretest-bug@HIDDEN
>>
>>     
>>>   (or (eql (nth 2 attrs) (user-uid))
>>>       (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))
>>>   
>>>       
>> I am trying to find a solution that will work without Lisp coders 
>> needing to be aware of the strange situation on Windows that files can 
>> be owned by a group.
>>     
>
> I think the only good solution in that venue would be to have a new
> primitive for such tests, and implement it on Windows so that it will
> cater to this special case.  Any other solution is likely to lie about
> the file's security attributes.
>   

We are telling a lie already by attempting to map ACLs to POSIX 
ownership. If we are going to attempt this, then it is better to tell a 
lie that fits with the expectations of POSIX (ie that owners of files 
are individual users). A different API that tells the full story might 
be a good idea, but any new API is only going to be used by future 
developers who know about the API, it cannot fix problems in existing 
Lisp code that might make the same assumptions as server.el.






Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2008 03:31:57 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m843VsPG021446
	for <submit@HIDDEN>; Wed, 3 Sep 2008 20:31:55 -0700
Received: from mail.gnu.org ([199.232.76.166]:58564 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <jasonr@HIDDEN>)
	id 1Kb5Xy-0004ka-O4
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 23:30:14 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1Kb5ZX-0003ek-15
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 23:31:53 -0400
Received: from mk-outboundfilter-5.mail.uk.tiscali.com ([212.74.114.1]:3492)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1Kb5ZS-0003dn-PI; Wed, 03 Sep 2008 23:31:47 -0400
X-Trace: 78185116/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/61.4.103.130
X-SBRS: None
X-RemoteIP: 61.4.103.130
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ag0BABzzvkg9BGeC/2dsb2JhbAAItw2BZw
X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; 
   d="scan'208";a="78185116"
X-IP-Direction: OUT
Received: from unknown (HELO [10.1.1.113]) ([61.4.103.130])
  by smtp.f2s.tiscali.co.uk with ESMTP; 04 Sep 2008 04:31:42 +0100
Message-ID: <48BF5671.1040705@HIDDEN>
Date: Thu, 04 Sep 2008 11:30:57 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN> <uej407fz6.fsf@HIDDEN>
In-Reply-To: <uej407fz6.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

Eli Zaretskii wrote:
>> Date: Thu, 04 Sep 2008 07:44:49 +0800
>> From: Jason Rumney <jasonr@HIDDEN>
>> CC: 865@HIDDEN, emacs-pretest-bug@HIDDEN
>>
>>     
>>>   (or (eql (nth 2 attrs) (user-uid))
>>>       (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))
>>>   
>>>       
>> I am trying to find a solution that will work without Lisp coders 
>> needing to be aware of the strange situation on Windows that files can 
>> be owned by a group.
>>     
>
> I think the only good solution in that venue would be to have a new
> primitive for such tests, and implement it on Windows so that it will
> cater to this special case.  Any other solution is likely to lie about
> the file's security attributes.
>   

We are telling a lie already by attempting to map ACLs to POSIX 
ownership. If we are going to attempt this, then it is better to tell a 
lie that fits with the expectations of POSIX (ie that owners of files 
are individual users). A different API that tells the full story might 
be a good idea, but any new API is only going to be used by future 
developers who know about the API, it cannot fix problems in existing 
Lisp code that might make the same assumptions as server.el.






Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 4 Sep 2008 03:22:14 +0000
Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m843MAvf018195
	for <865@HIDDEN>; Wed, 3 Sep 2008 20:22:12 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6N00GY2IPYX341@i_mtaout3.012.net.il> for 865@HIDDEN; Thu, 04 Sep 2008 06:22:47 +0300 (IDT)
Date: Thu, 04 Sep 2008 06:22:05 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BF2171.8040101@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uej407fz6.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>

> Date: Thu, 04 Sep 2008 07:44:49 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> CC: 865@HIDDEN, emacs-pretest-bug@HIDDEN
> 
> >   (or (eql (nth 2 attrs) (user-uid))
> >       (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))
> >   
> 
> I am trying to find a solution that will work without Lisp coders 
> needing to be aware of the strange situation on Windows that files can 
> be owned by a group.

I think the only good solution in that venue would be to have a new
primitive for such tests, and implement it on Windows so that it will
cater to this special case.  Any other solution is likely to lie about
the file's security attributes.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2008 03:22:15 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m843MAih018196
	for <submit@HIDDEN>; Wed, 3 Sep 2008 20:22:12 -0700
Received: from mx10.gnu.org ([199.232.76.166]:57961)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1Kb5OZ-00043v-Hr
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 23:20:31 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kb5Q6-0002B6-ER
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 23:22:10 -0400
Received: from mtaout3.012.net.il ([84.95.2.7]:47992)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kb5Q6-0002Aq-20; Wed, 03 Sep 2008 23:22:06 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6N00GY2IPYX341@i_mtaout3.012.net.il>; Thu, 04 Sep 2008 06:22:47 +0300 (IDT)
Date: Thu, 04 Sep 2008 06:22:05 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BF2171.8040101@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uej407fz6.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1
X-CrossAssassin-Score: 2

> Date: Thu, 04 Sep 2008 07:44:49 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> CC: 865@HIDDEN, emacs-pretest-bug@HIDDEN
> 
> >   (or (eql (nth 2 attrs) (user-uid))
> >       (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))
> >   
> 
> I am trying to find a solution that will work without Lisp coders 
> needing to be aware of the strange situation on Windows that files can 
> be owned by a group.

I think the only good solution in that venue would be to have a new
primitive for such tests, and implement it on Windows so that it will
cater to this special case.  Any other solution is likely to lie about
the file's security attributes.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 4 Sep 2008 00:16:21 +0000
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m840GH2M019334
	for <865@HIDDEN>; Wed, 3 Sep 2008 17:16:19 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:63161 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kb2WH-0006xF-3K; Thu, 04 Sep 2008 02:16:17 +0200
Message-ID: <48BF28C7.4040405@HIDDEN>
Date: Thu, 04 Sep 2008 02:16:07 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Jason Rumney <jasonr@HIDDEN>, 865 <at> debbugs.gnu.org
CC: Eli Zaretskii <eliz@HIDDEN>, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
In-Reply-To: <48BF2171.8040101@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080903-0, 2008-09-03), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1Kb2WH-0006xF-3K.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Kb2WH-0006xF-3K 34c5a41cfb5420b71a117a4719412278

Jason Rumney wrote:
> Eli Zaretskii wrote:
> 
>> Sorry, I confused myself and thought about a different parameter.
>>
>> Yes, the last argument of LookupAccountSid does tell what type of
>> account is that.  But I'm not sure that what you suggest is a good
>> strategy: the fact that the current user is a member of Administrators
>> does not yet mean we can report that user as the file's owner.
>>
>> How about testing the user's primary group in addition to UID?  That
>> is,
>>   (or (eql (nth 2 attrs) (user-uid))
>>       (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))
>>   
> 
> I am trying to find a solution that will work without Lisp coders
> needing to be aware of the strange situation on Windows that files can
> be owned by a group.


Then, since it at this times seems like we want to forget about ACL
lists, then perhaps implementing a function for changing owner+group,
like chown, would be best?




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2008 00:16:34 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m840GUmN019345
	for <submit@HIDDEN>; Wed, 3 Sep 2008 17:16:32 -0700
Received: from mail.gnu.org ([199.232.76.166]:48702 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kb2Ut-0003Ce-Ts
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 20:14:52 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kb2WP-0000Rv-Nw
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 20:16:30 -0400
Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:47832)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kb2WI-0000R5-Gh; Wed, 03 Sep 2008 20:16:18 -0400
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:63161 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kb2WH-0006xF-3K; Thu, 04 Sep 2008 02:16:17 +0200
Message-ID: <48BF28C7.4040405@HIDDEN>
Date: Thu, 04 Sep 2008 02:16:07 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Jason Rumney <jasonr@HIDDEN>, 865 <at> debbugs.gnu.org
CC: Eli Zaretskii <eliz@HIDDEN>, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>	<uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN> <48BF2171.8040101@HIDDEN>
In-Reply-To: <48BF2171.8040101@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080903-0, 2008-09-03), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1Kb2WH-0006xF-3K.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Kb2WH-0006xF-3K 34c5a41cfb5420b71a117a4719412278
X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!)
X-CrossAssassin-Score: 2

Jason Rumney wrote:
> Eli Zaretskii wrote:
> 
>> Sorry, I confused myself and thought about a different parameter.
>>
>> Yes, the last argument of LookupAccountSid does tell what type of
>> account is that.  But I'm not sure that what you suggest is a good
>> strategy: the fact that the current user is a member of Administrators
>> does not yet mean we can report that user as the file's owner.
>>
>> How about testing the user's primary group in addition to UID?  That
>> is,
>>   (or (eql (nth 2 attrs) (user-uid))
>>       (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))
>>   
> 
> I am trying to find a solution that will work without Lisp coders
> needing to be aware of the strange situation on Windows that files can
> be owned by a group.


Then, since it at this times seems like we want to forget about ACL
lists, then perhaps implementing a function for changing owner+group,
like chown, would be best?




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 3 Sep 2008 23:54:02 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83NrwvD010383
	for <submit@HIDDEN>; Wed, 3 Sep 2008 16:53:59 -0700
Received: from mx10.gnu.org ([199.232.76.166]:46888)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <jasonr@HIDDEN>)
	id 1Kb295-0001xd-8U
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 19:52:19 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1Kb22h-0004yl-6T
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 19:45:44 -0400
Received: from mk-outboundfilter-4.mail.uk.tiscali.com ([212.74.114.32]:55788)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1Kb22d-0004xs-0X; Wed, 03 Sep 2008 19:45:39 -0400
X-Trace: 131755805/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.236.150
X-SBRS: None
X-RemoteIP: 124.82.236.150
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4AAKa+vkh8UuyW/2dsb2JhbAAIsEUIhxthAwh7
X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; 
   d="scan'208";a="131755805"
X-IP-Direction: OUT
Received: from unknown (HELO [172.16.0.17]) ([124.82.236.150])
  by smtp.f2s.tiscali.co.uk with ESMTP; 04 Sep 2008 00:45:35 +0100
Message-ID: <48BF2171.8040101@HIDDEN>
Date: Thu, 04 Sep 2008 07:44:49 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
In-Reply-To: <uod356pzf.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

Eli Zaretskii wrote:

> Sorry, I confused myself and thought about a different parameter.
>
> Yes, the last argument of LookupAccountSid does tell what type of
> account is that.  But I'm not sure that what you suggest is a good
> strategy: the fact that the current user is a member of Administrators
> does not yet mean we can report that user as the file's owner.
>
> How about testing the user's primary group in addition to UID?  That
> is, 
>
>   (or (eql (nth 2 attrs) (user-uid))
>       (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))
>   

I am trying to find a solution that will work without Lisp coders 
needing to be aware of the strange situation on Windows that files can 
be owned by a group.





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 23:45:47 +0000
Received: from mk-outboundfilter-4.mail.uk.tiscali.com (mk-outboundfilter-4.mail.uk.tiscali.com [212.74.114.32])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83Njhsg008242
	for <865@HIDDEN>; Wed, 3 Sep 2008 16:45:44 -0700
X-Trace: 131755805/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.236.150
X-SBRS: None
X-RemoteIP: 124.82.236.150
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4AAKa+vkh8UuyW/2dsb2JhbAAIsEUIhxthAwh7
X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; 
   d="scan'208";a="131755805"
X-IP-Direction: OUT
Received: from unknown (HELO [172.16.0.17]) ([124.82.236.150])
  by smtp.f2s.tiscali.co.uk with ESMTP; 04 Sep 2008 00:45:35 +0100
Message-ID: <48BF2171.8040101@HIDDEN>
Date: Thu, 04 Sep 2008 07:44:49 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN> <uod356pzf.fsf@HIDDEN>
In-Reply-To: <uod356pzf.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Eli Zaretskii wrote:

> Sorry, I confused myself and thought about a different parameter.
>
> Yes, the last argument of LookupAccountSid does tell what type of
> account is that.  But I'm not sure that what you suggest is a good
> strategy: the fact that the current user is a member of Administrators
> does not yet mean we can report that user as the file's owner.
>
> How about testing the user's primary group in addition to UID?  That
> is, 
>
>   (or (eql (nth 2 attrs) (user-uid))
>       (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))
>   

I am trying to find a solution that will work without Lisp coders 
needing to be aware of the strange situation on Windows that files can 
be owned by a group.





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 18:58:09 +0000
Received: from mtaout1.012.net.il (mtaout1.012.net.il [84.95.2.1])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83Iw5EP003115
	for <865@HIDDEN>; Wed, 3 Sep 2008 11:58:06 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6M00I2AVDD3O60@HIDDEN> for 865@HIDDEN; Wed, 03 Sep 2008 21:58:26 +0300 (IDT)
Date: Wed, 03 Sep 2008 21:57:45 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvk5dtxg08.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: lennart.borgman@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uk5dt6ora.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <48BD80C0.80707@HIDDEN> <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN> <48BEBCBE.8080700@HIDDEN> <jwvk5dtxg08.fsf-monnier+emacsbugreports@HIDDEN>
X-CrossAssassin-Score: 2

> From: Stefan Monnier <monnier@HIDDEN>
> Date: Wed, 03 Sep 2008 14:05:43 -0400
> Cc: emacs-pretest-bug@HIDDEN, 865@HIDDEN
> 
> > If you really want to make sure no one else can write you have to set up
> > the access rights for that. On w32 that means you should modify the ACL
> > list. The current code is far from that.
> 
> The current code "does just that" using file-modes.
> Now, of course, depending on how file-modes are mapped to&from ACLs,
> this may DTRT or not.

The problem is not the mapping of ACLs into file modes, the problem is
the opposite mapping.  The current Emacs code assumes Posix semantics,
where a file created like this:

  (letf (((default-file-modes) ?\700)) (make-directory dir t))

will not be accessible by anyone else but the user who created it.
But on Windows, this does not do what it does on Posix, because the
Posix rwx model does not map well into ACLs.  If we want this to work
on platforms that support ACLs (including some varieties of GNU/Linux
systems), we need to use a more sophisticated abstraction.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.6 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 3 Sep 2008 18:58:08 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83Iw5uL003166
	for <submit@HIDDEN>; Wed, 3 Sep 2008 11:58:06 -0700
Received: from mail.gnu.org ([199.232.76.166]:55797 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KaxWk-0005ph-Gc
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:56:26 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KaxYH-0007rb-F1
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:58:04 -0400
Received: from mtaout1.012.net.il ([84.95.2.1]:45358)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KaxYH-0007rL-3D
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:58:01 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6M00I2AVDD3O60@HIDDEN> for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 21:58:26 +0300 (IDT)
Date: Wed, 03 Sep 2008 21:57:45 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <jwvk5dtxg08.fsf-monnier+emacsbugreports@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Stefan Monnier <monnier@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: lennart.borgman@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uk5dt6ora.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <48BD80C0.80707@HIDDEN> <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN> <48BEBCBE.8080700@HIDDEN> <jwvk5dtxg08.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1

> From: Stefan Monnier <monnier@HIDDEN>
> Date: Wed, 03 Sep 2008 14:05:43 -0400
> Cc: emacs-pretest-bug@HIDDEN, 865@HIDDEN
> 
> > If you really want to make sure no one else can write you have to set up
> > the access rights for that. On w32 that means you should modify the ACL
> > list. The current code is far from that.
> 
> The current code "does just that" using file-modes.
> Now, of course, depending on how file-modes are mapped to&from ACLs,
> this may DTRT or not.

The problem is not the mapping of ACLs into file modes, the problem is
the opposite mapping.  The current Emacs code assumes Posix semantics,
where a file created like this:

  (letf (((default-file-modes) ?\700)) (make-directory dir t))

will not be accessible by anyone else but the user who created it.
But on Windows, this does not do what it does on Posix, because the
Posix rwx model does not map well into ACLs.  If we want this to work
on platforms that support ACLs (including some varieties of GNU/Linux
systems), we need to use a more sophisticated abstraction.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 18:31:25 +0000
Received: from mtaout4.012.net.il (mtaout4.012.net.il [84.95.2.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83IVLeA027168
	for <865@HIDDEN>; Wed, 3 Sep 2008 11:31:23 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6M00JPJU599Z21@i_mtaout4.012.net.il> for 865@HIDDEN; Wed, 03 Sep 2008 21:31:58 +0300 (IDT)
Date: Wed, 03 Sep 2008 21:31:16 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <uy7297vtc.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: 865 <at> debbugs.gnu.org
Cc: jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uod356pzf.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN>

> Date: Wed, 03 Sep 2008 06:27:43 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: emacs-pretest-bug@HIDDEN, 865@HIDDEN
> 
> > There is a variable in get_name_and_id called `ignore', which seems to 
> > have the required information.
> 
> Thanks.
> 
> I never found any sufficiently clear documentation of the meaning of
> that parameter.  Its value seems almost random.  If you can find an
> explanation or give one, please do.

Sorry, I confused myself and thought about a different parameter.

Yes, the last argument of LookupAccountSid does tell what type of
account is that.  But I'm not sure that what you suggest is a good
strategy: the fact that the current user is a member of Administrators
does not yet mean we can report that user as the file's owner.

How about testing the user's primary group in addition to UID?  That
is, 

  (or (eql (nth 2 attrs) (user-uid))
      (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))

(assuming we add a function user-gid)?




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 3 Sep 2008 18:31:27 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83IVMFs027170
	for <submit@HIDDEN>; Wed, 3 Sep 2008 11:31:23 -0700
Received: from mx10.gnu.org ([199.232.76.166]:52860)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1Kax6t-00045p-LU
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:29:43 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kax8P-0002FB-2K
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:31:21 -0400
Received: from mtaout4.012.net.il ([84.95.2.10]:11310)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kax8O-0002F5-NU; Wed, 03 Sep 2008 14:31:16 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6M00JPJU599Z21@i_mtaout4.012.net.il>; Wed, 03 Sep 2008 21:31:58 +0300 (IDT)
Date: Wed, 03 Sep 2008 21:31:16 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <uy7297vtc.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: 865 <at> debbugs.gnu.org
Cc: jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uod356pzf.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN> <uy7297vtc.fsf@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1
X-CrossAssassin-Score: 2

> Date: Wed, 03 Sep 2008 06:27:43 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: emacs-pretest-bug@HIDDEN, 865@HIDDEN
> 
> > There is a variable in get_name_and_id called `ignore', which seems to 
> > have the required information.
> 
> Thanks.
> 
> I never found any sufficiently clear documentation of the meaning of
> that parameter.  Its value seems almost random.  If you can find an
> explanation or give one, please do.

Sorry, I confused myself and thought about a different parameter.

Yes, the last argument of LookupAccountSid does tell what type of
account is that.  But I'm not sure that what you suggest is a good
strategy: the fact that the current user is a member of Administrators
does not yet mean we can report that user as the file's owner.

How about testing the user's primary group in addition to UID?  That
is, 

  (or (eql (nth 2 attrs) (user-uid))
      (and (eq system-type 'windows-nt) (eql (nth 2 attrs) (user-gid)))

(assuming we add a function user-gid)?




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 18:14:08 +0000
Received: from mtaout4.012.net.il (mtaout4.012.net.il [84.95.2.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83IE3Bx020757
	for <865@HIDDEN>; Wed, 3 Sep 2008 11:14:05 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6M00J7CTC49Z11@i_mtaout4.012.net.il> for 865@HIDDEN; Wed, 03 Sep 2008 21:14:29 +0300 (IDT)
Date: Wed, 03 Sep 2008 21:13:48 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BEBCBE.8080700@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org
Cc: monnier@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <usksh6qsj.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <48BD80C0.80707@HIDDEN> <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN> <48BEBCBE.8080700@HIDDEN>
X-CrossAssassin-Score: 2

> Date: Wed, 03 Sep 2008 18:35:10 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
> Cc: emacs-pretest-bug@HIDDEN, 865@HIDDEN
> 
> If you really want to make sure no one else can write you have to set up
> the access rights for that. On w32 that means you should modify the ACL
> list. The current code is far from that.

Patches to do that are most welcome.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.1 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 3 Sep 2008 18:14:07 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83IE3ZF020758
	for <submit@HIDDEN>; Wed, 3 Sep 2008 11:14:05 -0700
Received: from mail.gnu.org ([199.232.76.166]:51027 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1Kawq9-0003Bn-4C
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:12:25 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kawrf-0007mM-Dz
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:14:03 -0400
Received: from mtaout4.012.net.il ([84.95.2.10]:8903)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kawre-0007m6-VO
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:13:59 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6M00J7CTC49Z11@i_mtaout4.012.net.il> for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 21:14:29 +0300 (IDT)
Date: Wed, 03 Sep 2008 21:13:48 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BEBCBE.8080700@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org
Cc: monnier@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <usksh6qsj.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <48BD80C0.80707@HIDDEN> <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN> <48BEBCBE.8080700@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1

> Date: Wed, 03 Sep 2008 18:35:10 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
> Cc: emacs-pretest-bug@HIDDEN, 865@HIDDEN
> 
> If you really want to make sure no one else can write you have to set up
> the access rights for that. On w32 that means you should modify the ACL
> list. The current code is far from that.

Patches to do that are most welcome.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 18:05:52 +0000
Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83I5jQR018720
	for <865@HIDDEN>; Wed, 3 Sep 2008 11:05:46 -0700
Received: from alfajor.home (vpn-132-204-232-121.acd.umontreal.ca [132.204.232.121])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m83I5h3w020816;
	Wed, 3 Sep 2008 14:05:43 -0400
Received: by alfajor.home (Postfix, from userid 20848)
	id 1AE1E1C971; Wed,  3 Sep 2008 14:05:43 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, Jason Rumney <jasonr@HIDDEN>,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvk5dtxg08.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<48BD80C0.80707@HIDDEN>
	<jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN>
	<48BEBCBE.8080700@HIDDEN>
Date: Wed, 03 Sep 2008 14:05:43 -0400
In-Reply-To: <48BEBCBE.8080700@HIDDEN> (Lennart Borgman's message of "Wed,
	03 Sep 2008 18:35:10 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3096=0
X-CrossAssassin-Score: 2

> If you really want to make sure no one else can write you have to set up
> the access rights for that. On w32 that means you should modify the ACL
> list. The current code is far from that.

The current code "does just that" using file-modes.
Now, of course, depending on how file-modes are mapped to&from ACLs,
this may DTRT or not.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.0 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 3 Sep 2008 18:06:15 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83I67Qj018733
	for <submit@HIDDEN>; Wed, 3 Sep 2008 11:06:09 -0700
Received: from mx10.gnu.org ([199.232.76.166]:50307)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1KawiT-0002mc-Dw
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:04:29 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1Kawk0-0006Qj-8T
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 14:06:07 -0400
Received: from chene.dit.umontreal.ca ([132.204.246.20]:37673)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1Kawju-0006PX-WE; Wed, 03 Sep 2008 14:05:59 -0400
Received: from alfajor.home (vpn-132-204-232-121.acd.umontreal.ca [132.204.232.121])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m83I5h3w020816;
	Wed, 3 Sep 2008 14:05:43 -0400
Received: by alfajor.home (Postfix, from userid 20848)
	id 1AE1E1C971; Wed,  3 Sep 2008 14:05:43 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, Jason Rumney <jasonr@HIDDEN>,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwvk5dtxg08.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<48BD80C0.80707@HIDDEN>
	<jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN>
	<48BEBCBE.8080700@HIDDEN>
Date: Wed, 03 Sep 2008 14:05:43 -0400
In-Reply-To: <48BEBCBE.8080700@HIDDEN> (Lennart Borgman's message of "Wed,
	03 Sep 2008 18:35:10 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3096=0
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)

> If you really want to make sure no one else can write you have to set up
> the access rights for that. On w32 that means you should modify the ACL
> list. The current code is far from that.

The current code "does just that" using file-modes.
Now, of course, depending on how file-modes are mapped to&from ACLs,
this may DTRT or not.


        Stefan




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 16:35:25 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83GZHj7019294
	for <865@HIDDEN>; Wed, 3 Sep 2008 09:35:19 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:63977 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KavK8-00075X-6z; Wed, 03 Sep 2008 18:35:16 +0200
Message-ID: <48BEBCBE.8080700@HIDDEN>
Date: Wed, 03 Sep 2008 18:35:10 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Stefan Monnier <monnier@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Jason Rumney <jasonr@HIDDEN>,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<48BD80C0.80707@HIDDEN> <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN>
In-Reply-To: <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080903-0, 2008-09-03), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1KavK8-00075X-6z.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KavK8-00075X-6z 11db618388bd148655585a35292d8a72

Stefan Monnier wrote:
>> I can see what you want to achieve, but why not just check with
>> file-writeable-p here? Is not that more correct?
> 
> The purpose of the check is not to make sure we can make the server
> work, but that it is safe to do so.  I.e. it doesn't check that we have
> write access, but that nobody else does.


Yes, as I said in my reply to Eli, I realized that. I suggested another
way to try to achieve that which I think is much better.

If you really want to make sure no one else can write you have to set up
the access rights for that. On w32 that means you should modify the ACL
list. The current code is far from that.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 3 Sep 2008 16:35:31 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83GZRkv019657
	for <submit@HIDDEN>; Wed, 3 Sep 2008 09:35:28 -0700
Received: from mx10.gnu.org ([199.232.76.166]:42594)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KavIi-00030C-QT
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 12:33:48 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KavKF-0006lH-BY
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 12:35:26 -0400
Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:43444)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KavKA-0006kc-L6; Wed, 03 Sep 2008 12:35:19 -0400
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:63977 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KavK8-00075X-6z; Wed, 03 Sep 2008 18:35:16 +0200
Message-ID: <48BEBCBE.8080700@HIDDEN>
Date: Wed, 03 Sep 2008 18:35:10 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Stefan Monnier <monnier@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Jason Rumney <jasonr@HIDDEN>,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	<48BD80C0.80707@HIDDEN> <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN>
In-Reply-To: <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080903-0, 2008-09-03), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1KavK8-00075X-6z.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KavK8-00075X-6z 11db618388bd148655585a35292d8a72
X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!)
X-CrossAssassin-Score: 2

Stefan Monnier wrote:
>> I can see what you want to achieve, but why not just check with
>> file-writeable-p here? Is not that more correct?
> 
> The purpose of the check is not to make sure we can make the server
> work, but that it is safe to do so.  I.e. it doesn't check that we have
> write access, but that nobody else does.


Yes, as I said in my reply to Eli, I realized that. I suggested another
way to try to achieve that which I think is much better.

If you really want to make sure no one else can write you have to set up
the access rights for that. On w32 that means you should modify the ACL
list. The current code is far from that.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 16:29:12 +0000
Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83GT21B016684
	for <865@HIDDEN>; Wed, 3 Sep 2008 09:29:06 -0700
Received: from alfajor.home (vpn-132-204-232-121.acd.umontreal.ca [132.204.232.121])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m83GT155006590;
	Wed, 3 Sep 2008 12:29:01 -0400
Received: by alfajor.home (Postfix, from userid 20848)
	id 084451C971; Wed,  3 Sep 2008 12:29:00 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, Jason Rumney <jasonr@HIDDEN>,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<48BD80C0.80707@HIDDEN>
Date: Wed, 03 Sep 2008 12:29:00 -0400
In-Reply-To: <48BD80C0.80707@HIDDEN> (Lennart Borgman's message of "Tue, 02
	Sep 2008 20:06:56 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3095=0

> I can see what you want to achieve, but why not just check with
> file-writeable-p here? Is not that more correct?

The purpose of the check is not to make sure we can make the server
work, but that it is safe to do so.  I.e. it doesn't check that we have
write access, but that nobody else does.


        Stefan





Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 3 Sep 2008 16:29:27 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83GTOJ2016691
	for <submit@HIDDEN>; Wed, 3 Sep 2008 09:29:25 -0700
Received: from mail.gnu.org ([199.232.76.166]:42107 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <monnier@HIDDEN>)
	id 1KavCr-0004Cr-B8
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 12:27:45 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KavEN-0005md-DF
	for emacs-pretest-bug@HIDDEN; Wed, 03 Sep 2008 12:29:23 -0400
Received: from chene.dit.umontreal.ca ([132.204.246.20]:47013)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <monnier@HIDDEN>)
	id 1KavEI-0005lU-Ni; Wed, 03 Sep 2008 12:29:14 -0400
Received: from alfajor.home (vpn-132-204-232-121.acd.umontreal.ca [132.204.232.121])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m83GT155006590;
	Wed, 3 Sep 2008 12:29:01 -0400
Received: by alfajor.home (Postfix, from userid 20848)
	id 084451C971; Wed,  3 Sep 2008 12:29:00 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, Jason Rumney <jasonr@HIDDEN>,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Message-ID: <jwv1w01yz22.fsf-monnier+emacsbugreports@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	<48BD80C0.80707@HIDDEN>
Date: Wed, 03 Sep 2008 12:29:00 -0400
In-Reply-To: <48BD80C0.80707@HIDDEN> (Lennart Borgman's message of "Tue, 02
	Sep 2008 20:06:56 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3095=0
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)
X-CrossAssassin-Score: 2

> I can see what you want to achieve, but why not just check with
> file-writeable-p here? Is not that more correct?

The purpose of the check is not to make sure we can make the server
work, but that it is safe to do so.  I.e. it doesn't check that we have
write access, but that nobody else does.


        Stefan





Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 03:29:20 +0000
Received: from mtaout7.012.net.il (mtaout7.012.net.il [84.95.2.19])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m833TGlA032240
	for <865@HIDDEN>; Tue, 2 Sep 2008 20:29:17 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6L00JJ0OBBUFB0@HIDDEN> for 865@HIDDEN; Wed, 03 Sep 2008 06:28:24 +0300 (IDT)
Date: Wed, 03 Sep 2008 06:27:43 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BDD155.8060005@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, lennart.borgman@HIDDEN,
        emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uy7297vtc.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
X-CrossAssassin-Score: 2

> Date: Wed, 03 Sep 2008 07:50:45 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> CC: 865@HIDDEN, lennart.borgman@HIDDEN, 
>  emacs-pretest-bug@HIDDEN
> 
> Eli Zaretskii wrote:
> > If you mean to ask whether LookupAccountSid we use to get the owner or
> > group name by their SID can tell us if the name it returns is a group
> > rather than a user, then no, I don't think so, unfortunately.
> 
> There is a variable in get_name_and_id called `ignore', which seems to 
> have the required information.

Thanks.

I never found any sufficiently clear documentation of the meaning of
that parameter.  Its value seems almost random.  If you can find an
explanation or give one, please do.  Otherwise, I don't like to rely
on a variable whose behavior we don't understand.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.1 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 3 Sep 2008 03:29:19 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m833TF7p032241
	for <submit@HIDDEN>; Tue, 2 Sep 2008 20:29:16 -0700
Received: from mx10.gnu.org ([199.232.76.166]:38983)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1Kaj1t-0006r6-9L
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 23:27:37 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kaj3P-0008HY-RE
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 23:29:14 -0400
Received: from mtaout7.012.net.il ([84.95.2.19]:38260)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kaj3P-0008HO-Et; Tue, 02 Sep 2008 23:29:11 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6L00JJ0OBBUFB0@HIDDEN>; Wed, 03 Sep 2008 06:28:24 +0300 (IDT)
Date: Wed, 03 Sep 2008 06:27:43 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BDD155.8060005@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, lennart.borgman@HIDDEN,
        emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <uy7297vtc.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN> <48BDD155.8060005@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?)

> Date: Wed, 03 Sep 2008 07:50:45 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> CC: 865@HIDDEN, lennart.borgman@HIDDEN, 
>  emacs-pretest-bug@HIDDEN
> 
> Eli Zaretskii wrote:
> > If you mean to ask whether LookupAccountSid we use to get the owner or
> > group name by their SID can tell us if the name it returns is a group
> > rather than a user, then no, I don't think so, unfortunately.
> 
> There is a variable in get_name_and_id called `ignore', which seems to 
> have the required information.

Thanks.

I never found any sufficiently clear documentation of the meaning of
that parameter.  Its value seems almost random.  If you can find an
explanation or give one, please do.  Otherwise, I don't like to rely
on a variable whose behavior we don't understand.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 00:06:05 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8306184028368
	for <865@HIDDEN>; Tue, 2 Sep 2008 17:06:02 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61401 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kafsm-0006v5-8B; Wed, 03 Sep 2008 02:06:00 +0200
Message-ID: <48BDD4E5.50300@HIDDEN>
Date: Wed, 03 Sep 2008 02:05:57 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BDC9F1.8090105@HIDDEN>	 <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>	 <48BDCBD1.4000505@HIDDEN>	 <f7ccd24b0809021638t6a65a261o722c6060ddd5430@HIDDEN>	 <48BDCF20.1080305@HIDDEN>	 <f7ccd24b0809021644j31f3e483mc5d4b6d8f0152403@HIDDEN>	 <48BDD14B.7090302@HIDDEN>	 <f7ccd24b0809021652k63f2610axec8c4f48ae7bca7b@HIDDEN>	 <48BDD30E.4000304@HIDDEN> <f7ccd24b0809021700t63102ab1of53450e46a39355c@HIDDEN>
In-Reply-To: <f7ccd24b0809021700t63102ab1of53450e46a39355c@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1Kafsm-0006v5-8B.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1Kafsm-0006v5-8B 7ba3df02478d67d8c82a196ffbc40cad

Juanma Barranquero wrote:
> On Wed, Sep 3, 2008 at 01:58, Lennart Borgman (gmail)
> <lennart.borgman@HIDDEN> wrote:
> 
>> Just check if it exists immediately after the delete. As you have
>> pointed out some race condition (which one is unclear to me) can exist
>> so that it exists there again.
>>
>> However I did not say that we should raise an error in that case. It
>> might be legitimate. So we can perhaps instead check file modification
>> time and see if it is a new file. In that case we could just give a
>> message (which might be good for hunting errors).
>>
>> If file modification time says it is the same old file then it is an error.
> 
> You want to do a lot of work for nothing.


Hm, I do not like doing cleaning without any reason.

I think you might be missing that the situation can be complicated when
ACL lists are involved. But I guess it is not common.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 3 Sep 2008 00:00:06 +0000
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m83002lp024793
	for <865@HIDDEN>; Tue, 2 Sep 2008 17:00:04 -0700
Received: by an-out-0708.google.com with SMTP id b20so455809ana.9
        for <865@HIDDEN>; Tue, 02 Sep 2008 17:00:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=xov8V1j/GnkdjWqrCypQLkjR0BnU+587u1Skb7ssjJU=;
        b=gvhuPlMmHDGUZJmu9AgDOaW1m/ceLcYEdfiV3T2IPE8VkZCcpnXgJpo52fOHPGD5nI
         m4wF8yS7Uz0G3MIteijZDOPKfOgIQDN6hDZNFaavwCKHK5n2iCiDM3LObchN59a++Pkh
         XJN4Pcr82bUcGD06yfykoOQmqNnRr4Kn0FEPw=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=vRjwyTAD2Pi3z01YUKVG4HDCz7xZnV66UnnkNW7CU2ak+tGeLFIZkKZN4gukIXXH1M
         rLj3yFervpQRA305qpig4R4PBb4Q78TID2BdrMnv0mfu+x7qZa3uDlhpweo51gfDc9M4
         cd4EsBYlFY+vc/1U2CgMuJ9OTUqmg66UuINW8=
Received: by 10.100.249.10 with SMTP id w10mr8247605anh.139.1220400002669;
        Tue, 02 Sep 2008 17:00:02 -0700 (PDT)
Received: by 10.100.194.19 with HTTP; Tue, 2 Sep 2008 17:00:02 -0700 (PDT)
Message-ID: <f7ccd24b0809021700t63102ab1of53450e46a39355c@HIDDEN>
Date: Wed, 3 Sep 2008 02:00:02 +0200
From: "Juanma Barranquero" <lekktu@HIDDEN>
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>
In-Reply-To: <48BDD30E.4000304@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BDC9F1.8090105@HIDDEN>
	 <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>
	 <48BDCBD1.4000505@HIDDEN>
	 <f7ccd24b0809021638t6a65a261o722c6060ddd5430@HIDDEN>
	 <48BDCF20.1080305@HIDDEN>
	 <f7ccd24b0809021644j31f3e483mc5d4b6d8f0152403@HIDDEN>
	 <48BDD14B.7090302@HIDDEN>
	 <f7ccd24b0809021652k63f2610axec8c4f48ae7bca7b@HIDDEN>
	 <48BDD30E.4000304@HIDDEN>

On Wed, Sep 3, 2008 at 01:58, Lennart Borgman (gmail)
<lennart.borgman@HIDDEN> wrote:

> Just check if it exists immediately after the delete. As you have
> pointed out some race condition (which one is unclear to me) can exist
> so that it exists there again.
>
> However I did not say that we should raise an error in that case. It
> might be legitimate. So we can perhaps instead check file modification
> time and see if it is a new file. In that case we could just give a
> message (which might be good for hunting errors).
>
> If file modification time says it is the same old file then it is an error.

You want to do a lot of work for nothing.

   Juanma




Acknowledgement sent to "Juanma Barranquero" <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:58:14 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NwAXQ024540
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:58:11 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61491 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KaflB-0003oU-7b; Wed, 03 Sep 2008 01:58:09 +0200
Message-ID: <48BDD30E.4000304@HIDDEN>
Date: Wed, 03 Sep 2008 01:58:06 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BDC832.40503@HIDDEN>	 <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>	 <48BDC9F1.8090105@HIDDEN>	 <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>	 <48BDCBD1.4000505@HIDDEN>	 <f7ccd24b0809021638t6a65a261o722c6060ddd5430@HIDDEN>	 <48BDCF20.1080305@HIDDEN>	 <f7ccd24b0809021644j31f3e483mc5d4b6d8f0152403@HIDDEN>	 <48BDD14B.7090302@HIDDEN> <f7ccd24b0809021652k63f2610axec8c4f48ae7bca7b@HIDDEN>
In-Reply-To: <f7ccd24b0809021652k63f2610axec8c4f48ae7bca7b@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1KaflB-0003oU-7b.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KaflB-0003oU-7b 6adf36bdde62cc34d1fb161dac6050d4

Juanma Barranquero wrote:
> On Wed, Sep 3, 2008 at 01:50, Lennart Borgman (gmail)
> <lennart.borgman@HIDDEN> wrote:
> 
>> And in that case it might be good to
>> check if it really was deleted.
> 
> How?


Just check if it exists immediately after the delete. As you have
pointed out some race condition (which one is unclear to me) can exist
so that it exists there again.

However I did not say that we should raise an error in that case. It
might be legitimate. So we can perhaps instead check file modification
time and see if it is a new file. In that case we could just give a
message (which might be good for hunting errors).

If file modification time says it is the same old file then it is an error.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:52:54 +0000
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NqpXq022858
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:52:52 -0700
Received: by an-out-0708.google.com with SMTP id b20so455385ana.9
        for <865@HIDDEN>; Tue, 02 Sep 2008 16:52:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=yhVwnqeOyVgSKShbtqjTNIT5seFtpeqqnv2irMVdW+4=;
        b=offbBk25iiWgIQoB9wt5Okbff/z/UGi+lj9dyG4qRAA434QmlUeW6GuClbd3T3LbwK
         tSw31+QUUly3fn6dnYKpVZCoDmvCs9EUbVlR/LzNunheX4cbjRet0l/hf2A81BkYK0V+
         EosNtlryX/QaxFOi3j6neksQFt1/QtG11tLXU=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=dUlcvLa2isi8bOkRQmxVrjraA/gA+jxqN0lQrjDCcEt7OnjXDzqWJ3vupki/kspYvA
         AEdlVGVG60+E68letb0nAChAbrrW4gT+ENiWwxjQ+KV97iXZpxpYNh6+0c/mMuizThcF
         ArLecvEsibXgF9pMJ/Go5z+jvQMCrhSvxrI7A=
Received: by 10.100.143.12 with SMTP id q12mr8300762and.24.1220399570792;
        Tue, 02 Sep 2008 16:52:50 -0700 (PDT)
Received: by 10.100.194.19 with HTTP; Tue, 2 Sep 2008 16:52:50 -0700 (PDT)
Message-ID: <f7ccd24b0809021652k63f2610axec8c4f48ae7bca7b@HIDDEN>
Date: Wed, 3 Sep 2008 01:52:50 +0200
From: "Juanma Barranquero" <lekktu@HIDDEN>
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>
In-Reply-To: <48BDD14B.7090302@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BDC832.40503@HIDDEN>
	 <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>
	 <48BDC9F1.8090105@HIDDEN>
	 <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>
	 <48BDCBD1.4000505@HIDDEN>
	 <f7ccd24b0809021638t6a65a261o722c6060ddd5430@HIDDEN>
	 <48BDCF20.1080305@HIDDEN>
	 <f7ccd24b0809021644j31f3e483mc5d4b6d8f0152403@HIDDEN>
	 <48BDD14B.7090302@HIDDEN>

On Wed, Sep 3, 2008 at 01:50, Lennart Borgman (gmail)
<lennart.borgman@HIDDEN> wrote:

> And in that case it might be good to
> check if it really was deleted.

How?

   Juanma




Acknowledgement sent to "Juanma Barranquero" <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:51:42 +0000
Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82Npc4f022730
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:51:40 -0700
X-Trace: 77637140/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.237.250
X-SBRS: None
X-RemoteIP: 124.82.237.250
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AuoAAN1tvUh8Uu36/2dsb2JhbAAItEWBaQ
X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; 
   d="scan'208";a="77637140"
X-IP-Direction: OUT
Received: from unknown (HELO [172.16.0.17]) ([124.82.237.250])
  by smtp.f2s.tiscali.co.uk with ESMTP; 03 Sep 2008 00:51:30 +0100
Message-ID: <48BDD155.8060005@HIDDEN>
Date: Wed, 03 Sep 2008 07:50:45 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, lennart.borgman@HIDDEN,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN>
In-Reply-To: <ubpz68ifg.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Eli Zaretskii wrote:
> If you mean to ask whether LookupAccountSid we use to get the owner or
> group name by their SID can tell us if the name it returns is a group
> rather than a user, then no, I don't think so, unfortunately.

There is a variable in get_name_and_id called `ignore', which seems to 
have the required information.
I'll try to come up with a patch later today.




Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:50:45 +0000
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NofNu022625
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:50:42 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61863 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kafdw-0005uu-46; Wed, 03 Sep 2008 01:50:40 +0200
Message-ID: <48BDD14B.7090302@HIDDEN>
Date: Wed, 03 Sep 2008 01:50:35 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BDC5E4.4080205@HIDDEN>	 <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>	 <48BDC832.40503@HIDDEN>	 <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>	 <48BDC9F1.8090105@HIDDEN>	 <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>	 <48BDCBD1.4000505@HIDDEN>	 <f7ccd24b0809021638t6a65a261o722c6060ddd5430@HIDDEN>	 <48BDCF20.1080305@HIDDEN> <f7ccd24b0809021644j31f3e483mc5d4b6d8f0152403@HIDDEN>
In-Reply-To: <f7ccd24b0809021644j31f3e483mc5d4b6d8f0152403@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1Kafdw-0005uu-46.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Kafdw-0005uu-46 76abb954c96264a9f1a43870fb8e211a

Juanma Barranquero wrote:
> On Wed, Sep 3, 2008 at 01:41, Lennart Borgman (gmail)
> <lennart.borgman@HIDDEN> wrote:
> 
>> But in this case the dirt is back just in few lines below ...
> 
> I miss your point.


You are doing the cleanup just before you expect the file to be created
again. Not that cleanup use to last very long but the life time of this
one is very short.

The only reason I can see to delete the file is that it matters when the
network process creates it again. And in that case it might be good to
check if it really was deleted.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:51:43 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82Npda0022746
	for <submit@HIDDEN>; Tue, 2 Sep 2008 16:51:41 -0700
Received: from mail.gnu.org ([199.232.76.166]:55288 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <jasonr@HIDDEN>)
	id 1KafdK-00069Z-5d
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 19:50:02 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1Kafeq-0005NM-NO
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 19:51:39 -0400
Received: from mk-outboundfilter-5.mail.uk.tiscali.com ([212.74.114.1]:60527)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1Kafen-0005MV-Pq; Tue, 02 Sep 2008 19:51:33 -0400
X-Trace: 77637140/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.237.250
X-SBRS: None
X-RemoteIP: 124.82.237.250
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AuoAAN1tvUh8Uu36/2dsb2JhbAAItEWBaQ
X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; 
   d="scan'208";a="77637140"
X-IP-Direction: OUT
Received: from unknown (HELO [172.16.0.17]) ([124.82.237.250])
  by smtp.f2s.tiscali.co.uk with ESMTP; 03 Sep 2008 00:51:30 +0100
Message-ID: <48BDD155.8060005@HIDDEN>
Date: Wed, 03 Sep 2008 07:50:45 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, lennart.borgman@HIDDEN,
        emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <ubpz68ifg.fsf@HIDDEN>
In-Reply-To: <ubpz68ifg.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.
X-CrossAssassin-Score: 2

Eli Zaretskii wrote:
> If you mean to ask whether LookupAccountSid we use to get the owner or
> group name by their SID can tell us if the name it returns is a group
> rather than a user, then no, I don't think so, unfortunately.

There is a variable in get_name_and_id called `ignore', which seems to 
have the required information.
I'll try to come up with a patch later today.




Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.4 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:44:34 +0000
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NiV18019660
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:44:32 -0700
Received: by an-out-0708.google.com with SMTP id b20so454617ana.9
        for <865@HIDDEN>; Tue, 02 Sep 2008 16:44:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=h4T8ThavbyagxXxtqBjWsyMWNrhU0ZXX+nkgqb9vjOU=;
        b=lJoOzBeSx8kJMwMFf7E0f2ZhIdYwvXZE5LS8WosQPgODYyDCBqZETNwS8auoZqvN9A
         FQbWNWU3yitviL1V7X63kDH0v78uS26bhDlJ45xTS07XU2CDnmEHmPVH0fNq/Pwrg96P
         /bdsCuQTQZgSw0m1sPpCt0N8cbTZw9RbyA6hM=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=ZZ1j1D7ROKy1O5dYAisdobXhKgHGbBCNICOeY2BB+Fop91D2M3gEE8nrR3kUiTkcGe
         tNNWgWJuwY5wkUgSeuDuD/5XDj0gfkpOp0KxrifARjIpvWs8safaB09WxDLWK+sXdZAL
         N4XO2r7dMzUfCWCIjtdi1VtUfAQRYlfFvOChE=
Received: by 10.100.172.16 with SMTP id u16mr8286965ane.50.1220399070968;
        Tue, 02 Sep 2008 16:44:30 -0700 (PDT)
Received: by 10.100.194.19 with HTTP; Tue, 2 Sep 2008 16:44:30 -0700 (PDT)
Message-ID: <f7ccd24b0809021644j31f3e483mc5d4b6d8f0152403@HIDDEN>
Date: Wed, 3 Sep 2008 01:44:30 +0200
From: "Juanma Barranquero" <lekktu@HIDDEN>
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>
In-Reply-To: <48BDCF20.1080305@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BDC5E4.4080205@HIDDEN>
	 <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>
	 <48BDC832.40503@HIDDEN>
	 <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>
	 <48BDC9F1.8090105@HIDDEN>
	 <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>
	 <48BDCBD1.4000505@HIDDEN>
	 <f7ccd24b0809021638t6a65a261o722c6060ddd5430@HIDDEN>
	 <48BDCF20.1080305@HIDDEN>

On Wed, Sep 3, 2008 at 01:41, Lennart Borgman (gmail)
<lennart.borgman@HIDDEN> wrote:

> But in this case the dirt is back just in few lines below ...

I miss your point.

   Juanma




Acknowledgement sent to "Juanma Barranquero" <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:41:27 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NfN2M019353
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:41:25 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61723 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KafUx-0006jr-6w; Wed, 03 Sep 2008 01:41:23 +0200
Message-ID: <48BDCF20.1080305@HIDDEN>
Date: Wed, 03 Sep 2008 01:41:20 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BDC0EE.1080104@HIDDEN>	 <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>	 <48BDC5E4.4080205@HIDDEN>	 <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>	 <48BDC832.40503@HIDDEN>	 <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>	 <48BDC9F1.8090105@HIDDEN>	 <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>	 <48BDCBD1.4000505@HIDDEN> <f7ccd24b0809021638t6a65a261o722c6060ddd5430@HIDDEN>
In-Reply-To: <f7ccd24b0809021638t6a65a261o722c6060ddd5430@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1KafUx-0006jr-6w.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KafUx-0006jr-6w ad839c7db5219a3325afe98d7d3a474e

Juanma Barranquero wrote:
> On Wed, Sep 3, 2008 at 01:27, Lennart Borgman (gmail)
> <lennart.borgman@HIDDEN> wrote:
> 
>> So you mean there is no more problem if the old file was not deleted?
> 
> I didn't say that. But the problem is not that you deleted it or not,
> but whether that affects creating the new server-file or opening the
> new local socket.
> 
>> Why delete it at all in that case?
> 
> Cleanup is a good prophilactic measure, but it is not always required:

But in this case the dirt is back just in few lines below ...

>  (with-temp-file "~/temp.dat" (insert "Hi!"))
>  (with-temp-file "~/temp.dat" (insert "Bye!"))
> 
>  Juanma
> 




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.4 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:38:18 +0000
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NcEZo017877
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:38:15 -0700
Received: by an-out-0708.google.com with SMTP id b20so454124ana.9
        for <865@HIDDEN>; Tue, 02 Sep 2008 16:38:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=Jpvv2BFGdM1/WI4BFeBgEPxFaU2yPMq3a/15rM1ydzU=;
        b=LBPtKYusZKH2+OFBun0jv4I016C+XFjhS8IzVxHWyjSCOEn7CYjVyBi0tbZLuMYQfw
         K8xM5wSKbqboViG06IHeUAyzKOuXdd7u9OlTt/FVQscX8RLa98jm19pgfD9GmKnpqw58
         Kli5/QuTrATC82nvLUlsDYvLOen+UYvUWb85M=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=qinmfyc6hemR80rsV0NueVIQRhCuwBMPSm9ZkcTrZwQRdhMkTOMzQclpKiLo7QG9O8
         t3VeOuzrTl+R8WBcmQ55lLIxIUhL6xkp7Cb+RAtxAXK825yDVBlGp5bNA2jJ9JURAkHI
         akBf7b91OkaVKTfkUK9INbdgzPlPvaU1QpsaU=
Received: by 10.100.178.7 with SMTP id a7mr8256179anf.80.1220398694228;
        Tue, 02 Sep 2008 16:38:14 -0700 (PDT)
Received: by 10.100.194.19 with HTTP; Tue, 2 Sep 2008 16:38:14 -0700 (PDT)
Message-ID: <f7ccd24b0809021638t6a65a261o722c6060ddd5430@HIDDEN>
Date: Wed, 3 Sep 2008 01:38:14 +0200
From: "Juanma Barranquero" <lekktu@HIDDEN>
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>
In-Reply-To: <48BDCBD1.4000505@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BDC0EE.1080104@HIDDEN>
	 <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>
	 <48BDC5E4.4080205@HIDDEN>
	 <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>
	 <48BDC832.40503@HIDDEN>
	 <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>
	 <48BDC9F1.8090105@HIDDEN>
	 <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>
	 <48BDCBD1.4000505@HIDDEN>

On Wed, Sep 3, 2008 at 01:27, Lennart Borgman (gmail)
<lennart.borgman@HIDDEN> wrote:

> So you mean there is no more problem if the old file was not deleted?

I didn't say that. But the problem is not that you deleted it or not,
but whether that affects creating the new server-file or opening the
new local socket.

> Why delete it at all in that case?

Cleanup is a good prophilactic measure, but it is not always required:

 (with-temp-file "~/temp.dat" (insert "Hi!"))
 (with-temp-file "~/temp.dat" (insert "Bye!"))

 Juanma




Acknowledgement sent to "Juanma Barranquero" <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:27:20 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NRHej014386
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:27:18 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61267 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KafHI-0000pb-74; Wed, 03 Sep 2008 01:27:16 +0200
Message-ID: <48BDCBD1.4000505@HIDDEN>
Date: Wed, 03 Sep 2008 01:27:13 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD8FA8.6030707@HIDDEN>	 <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>	 <48BDC0EE.1080104@HIDDEN>	 <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>	 <48BDC5E4.4080205@HIDDEN>	 <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>	 <48BDC832.40503@HIDDEN>	 <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>	 <48BDC9F1.8090105@HIDDEN> <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>
In-Reply-To: <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1KafHI-0000pb-74.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KafHI-0000pb-74 8eacac27bcf19921085fc7df6d075f79

Juanma Barranquero wrote:
> On Wed, Sep 3, 2008 at 01:19, Lennart Borgman (gmail)
> <lennart.borgman@HIDDEN> wrote:
> 
>> I got your point, but I still think it is better to try to catch the
>> error there.
> 
> Why? Deleting the old server-file is irrelevant, it's just cleanup.
> Failing to do it does not affect the Emacs server.
> 
> Failing to write a new server file *is* a problem: you won't be able
> to communicate with emacsclient, or it will use erroneous or malicious
> data.

So you mean there is no more problem if the old file was not deleted?
Why delete it at all in that case?

> The relevant operations there are `(make-network-process ... :service
> server-file ...)' and `(with-temp-file server-file ...)'; these are
> the ones that should signal an error if something fails. And they do.
> 
>  Juanma
> 




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.2 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:25:47 +0000
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NPi0o014278
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:25:45 -0700
Received: by an-out-0708.google.com with SMTP id b20so453363ana.9
        for <865@HIDDEN>; Tue, 02 Sep 2008 16:25:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=ogoflJ6UYvRcI2IL+h5VslzdID1j17cNu5UOtDyybfA=;
        b=WzmWid1onIKguQuAB3zTBqGtXDCHarVfaC/D97r81/CDDozsny6S3iOQ7AvRCz64YZ
         71Y2LixjkVKlbRcDoDwi3P3DjHqHNOu8FEPB4QabeqpURW6H1AGrduhdfetrq3fMWjo9
         kq+qoX/RwaErPTPbNgP0Wau/izNoPu9XL/8Ac=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=Vq9soYf8x7fQ+UTuVtMDk6OmOeL1A7sGOoPgh6clW6ADaHZMninqidrVN6+rTLjCnK
         wCteEre4Hx/u0X/654+cNgEH84XAADTCJl0ugkGOcG4QuWx2i6oO99fFD3oHjjOHh78q
         boshlh/q8CECQUzN5CyZHbBxN1BogcWQ/wyb4=
Received: by 10.100.216.12 with SMTP id o12mr8227931ang.117.1220397943837;
        Tue, 02 Sep 2008 16:25:43 -0700 (PDT)
Received: by 10.100.194.19 with HTTP; Tue, 2 Sep 2008 16:25:43 -0700 (PDT)
Message-ID: <f7ccd24b0809021625j79efc1exf865fab816bb3fe8@HIDDEN>
Date: Wed, 3 Sep 2008 01:25:43 +0200
From: "Juanma Barranquero" <lekktu@HIDDEN>
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>
In-Reply-To: <48BDC9F1.8090105@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BD8FA8.6030707@HIDDEN>
	 <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>
	 <48BDC0EE.1080104@HIDDEN>
	 <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>
	 <48BDC5E4.4080205@HIDDEN>
	 <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>
	 <48BDC832.40503@HIDDEN>
	 <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>
	 <48BDC9F1.8090105@HIDDEN>

On Wed, Sep 3, 2008 at 01:19, Lennart Borgman (gmail)
<lennart.borgman@HIDDEN> wrote:

> I got your point, but I still think it is better to try to catch the
> error there.

Why? Deleting the old server-file is irrelevant, it's just cleanup.
Failing to do it does not affect the Emacs server.

Failing to write a new server file *is* a problem: you won't be able
to communicate with emacsclient, or it will use erroneous or malicious
data.

The relevant operations there are `(make-network-process ... :service
server-file ...)' and `(with-temp-file server-file ...)'; these are
the ones that should signal an error if something fails. And they do.

 Juanma




Acknowledgement sent to "Juanma Barranquero" <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:19:20 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NJGkD011248
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:19:18 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61445 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kaf9Y-000673-6W; Wed, 03 Sep 2008 01:19:16 +0200
Message-ID: <48BDC9F1.8090105@HIDDEN>
Date: Wed, 03 Sep 2008 01:19:13 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD80C0.80707@HIDDEN>	 <ud4jm8k5z.fsf@HIDDEN> <48BD8FA8.6030707@HIDDEN>	 <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>	 <48BDC0EE.1080104@HIDDEN>	 <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>	 <48BDC5E4.4080205@HIDDEN>	 <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>	 <48BDC832.40503@HIDDEN> <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>
In-Reply-To: <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1Kaf9Y-000673-6W.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1Kaf9Y-000673-6W 761123767c062c6e972d4f7ce459d403

Juanma Barranquero wrote:
> On Wed, Sep 3, 2008 at 01:11, Lennart Borgman (gmail)
> <lennart.borgman@HIDDEN> wrote:
> 
>> Yes, but is it not easier to understand what is happening and catch the
>> message right after the delete-file?
> 
> You still haven't shown how you would do that without a race condition.


I will not do that ... ;-)

I got your point, but I still think it is better to try to catch the
error there.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.1 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:17:24 +0000
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NHKwB011139
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:17:21 -0700
Received: by an-out-0708.google.com with SMTP id b20so452781ana.9
        for <865@HIDDEN>; Tue, 02 Sep 2008 16:17:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=Aejb2+XJCHZdJzMGWV+/oLeI+ycwcfPbAKvtzQH09vI=;
        b=px9+IdAt6nMVyogJbE8cL9qVO7v5XePGLWdXfNx84Ze2+kV5x1Q/Ia6bsukHEtesys
         VFgcGQ3+AZfKjuuFaitefU8UIW0XKaMOyP+suNY4L6Ig6SeqEvx1gnpvFoSEhpAIzpvF
         XFt/T2Y0ZVF1Yyeygd7yD/fPj+VZwJMzU2ces=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=AQrPya7Jadh8dTvvFHwMPr7l31Dvsbokcl6RaYPsRehy9uYrMZ7UifFsXlpG/q4dN4
         jYBiImqujwKofApeBkk9VgSeeiw6jMEB0IsBEKtiZiJ9DWqyeEgSsOmLSs4mCQoNLc4k
         k8dTexNKpQXw9K60oZ14LCxecwTlTH0FRAgWE=
Received: by 10.100.41.4 with SMTP id o4mr8303884ano.7.1220397439532;
        Tue, 02 Sep 2008 16:17:19 -0700 (PDT)
Received: by 10.100.194.19 with HTTP; Tue, 2 Sep 2008 16:17:19 -0700 (PDT)
Message-ID: <f7ccd24b0809021617l47cac16fj1bd068523393860a@HIDDEN>
Date: Wed, 3 Sep 2008 01:17:19 +0200
From: "Juanma Barranquero" <lekktu@HIDDEN>
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>
In-Reply-To: <48BDC832.40503@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BD80C0.80707@HIDDEN>
	 <ud4jm8k5z.fsf@HIDDEN> <48BD8FA8.6030707@HIDDEN>
	 <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>
	 <48BDC0EE.1080104@HIDDEN>
	 <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>
	 <48BDC5E4.4080205@HIDDEN>
	 <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>
	 <48BDC832.40503@HIDDEN>

On Wed, Sep 3, 2008 at 01:11, Lennart Borgman (gmail)
<lennart.borgman@HIDDEN> wrote:

> Yes, but is it not easier to understand what is happening and catch the
> message right after the delete-file?

You still haven't shown how you would do that without a race condition.

   Juanma




Acknowledgement sent to "Juanma Barranquero" <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:11:55 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82NBp2Q009346
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:11:52 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61515 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kaf2M-0004Wq-7E; Wed, 03 Sep 2008 01:11:50 +0200
Message-ID: <48BDC832.40503@HIDDEN>
Date: Wed, 03 Sep 2008 01:11:46 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	 <48BD80C0.80707@HIDDEN> <ud4jm8k5z.fsf@HIDDEN>	 <48BD8FA8.6030707@HIDDEN>	 <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>	 <48BDC0EE.1080104@HIDDEN>	 <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>	 <48BDC5E4.4080205@HIDDEN> <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>
In-Reply-To: <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1Kaf2M-0004Wq-7E.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1Kaf2M-0004Wq-7E 37c222f6bf8b9f20eb9758789f3d8068

Juanma Barranquero wrote:
> On Wed, Sep 3, 2008 at 01:01, Lennart Borgman (gmail)
> <lennart.borgman@HIDDEN> wrote:
> 
>> Maybe it is better to just test if the file really was deleted then.
> 
> And, again, how would you guarantee that the file isn't created by
> another process between the delete-file call and the check?
> 
>> The reason I want to test this is that errors in these parts often are
>> confusing and hard to find. There could be something that prevents the
>> file from beeing deleted.
> 
> The server file is deleted to make room for the new server file. If
> writing it fails, you'll notice.

Yes, but is it not easier to understand what is happening and catch the
message right after the delete-file?

> Are you chasing a real error, or the possibility of one?

A possible one.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-4.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:06:43 +0000
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82N6dGk007649
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:06:41 -0700
Received: by an-out-0708.google.com with SMTP id b20so451917ana.9
        for <865@HIDDEN>; Tue, 02 Sep 2008 16:06:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=TE6LV/PB5DNhvuFm3x9oE9+2cEMCiXO0Xoju4N4+CbA=;
        b=Ak0nGAFarssz8dxNNh4tM7nf1j9Hj8TQ6pyzxrWExnSUB0AB416GjqAazLnS2FKsop
         xFGXnnxPPR3RzM/NMMPqdR/ZcOS+Fa2AyAhho6BCZppGBQ3jYIYEkk1n7PR774wpvRzS
         qE2ZI5rBknbO584kPT1bkEajY9N24ff3VkvSo=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=sliuw+mlVUeGotHNU+as0urpa5emqUIC0/ma5Cti/un5goGwvCiDERjaU/kucqp/Mu
         7osjtzKr/+38IO5A6Oduk/HUPwmHuL9ptjwrchMYGBow3YAS4H9urO5JdKpI+diM77bo
         1Ck4Uo3p6LmSU8IiWWZneOutH26KwoXa3iMEo=
Received: by 10.100.255.17 with SMTP id c17mr8238866ani.76.1220396799431;
        Tue, 02 Sep 2008 16:06:39 -0700 (PDT)
Received: by 10.100.194.19 with HTTP; Tue, 2 Sep 2008 16:06:39 -0700 (PDT)
Message-ID: <f7ccd24b0809021606r44667fbfs4171cd09a19933e3@HIDDEN>
Date: Wed, 3 Sep 2008 01:06:39 +0200
From: "Juanma Barranquero" <lekktu@HIDDEN>
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>
In-Reply-To: <48BDC5E4.4080205@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	 <48BD80C0.80707@HIDDEN> <ud4jm8k5z.fsf@HIDDEN>
	 <48BD8FA8.6030707@HIDDEN>
	 <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>
	 <48BDC0EE.1080104@HIDDEN>
	 <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>
	 <48BDC5E4.4080205@HIDDEN>

On Wed, Sep 3, 2008 at 01:01, Lennart Borgman (gmail)
<lennart.borgman@HIDDEN> wrote:

> Maybe it is better to just test if the file really was deleted then.

And, again, how would you guarantee that the file isn't created by
another process between the delete-file call and the check?

> The reason I want to test this is that errors in these parts often are
> confusing and hard to find. There could be something that prevents the
> file from beeing deleted.

The server file is deleted to make room for the new server file. If
writing it fails, you'll notice.

Are you chasing a real error, or the possibility of one?

   Juanma




Acknowledgement sent to "Juanma Barranquero" <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 23:02:04 +0000
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82N20YL005329
	for <865@HIDDEN>; Tue, 2 Sep 2008 16:02:01 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:65329 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kaesp-0000JV-6B; Wed, 03 Sep 2008 01:02:00 +0200
Message-ID: <48BDC5E4.4080205@HIDDEN>
Date: Wed, 03 Sep 2008 01:01:56 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	 <48BD80C0.80707@HIDDEN> <ud4jm8k5z.fsf@HIDDEN>	 <48BD8FA8.6030707@HIDDEN>	 <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>	 <48BDC0EE.1080104@HIDDEN> <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>
In-Reply-To: <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1Kaesp-0000JV-6B.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Kaesp-0000JV-6B a1a622358ef2fa08019a00523dd15ba7

Juanma Barranquero wrote:
> On Wed, Sep 3, 2008 at 00:40, Lennart Borgman (gmail)
> <lennart.borgman@HIDDEN> wrote:
> 
>> Forgot that discussion. Yes, but why not check the error returned instead?
> 
> Check for what?


Hm, I see that you can just get the rather general `file-error' error.

Maybe it is better to just test if the file really was deleted then.

The reason I want to test this is that errors in these parts often are
confusing and hard to find. There could be something that prevents the
file from beeing deleted.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-4.5 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 22:42:41 +0000
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82Mgbke031173
	for <865@HIDDEN>; Tue, 2 Sep 2008 15:42:38 -0700
Received: by an-out-0708.google.com with SMTP id b20so450295ana.9
        for <865@HIDDEN>; Tue, 02 Sep 2008 15:42:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=AQUUdqCcsSiuq30UYwkrIy1LoNH9flwmDtH7s0tlfHY=;
        b=DP1PbSb6WDJjan7IsgGZvkPv9HpwSiVN7hz3VegIWWhWBQToZp//voeSNqrxR08jkH
         xNyVVLzVM3mfKL1wIvIDGFcq/c8htgrZiaV/2xESNoJBpbdm3N+Sxr5qK7RkYhhtluEy
         vvTPxRD370hfu7B1ZvKvaI+WoPSm6ILWIi2xk=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=J4YaalhenElgpV8p4oIytnb8CEpo6nf+xwNDNw4Qv3OxH11ayCcgexg6hqkfh/BrZA
         AYMZG+lu4PZlMsp4HypbmxIrTEYlqMtHoNHgEMwtlG2Dsmz7GmXPbKP72S9JqA7gQtio
         +D4yrD3rg/Ugc5YE20rZA2ilpd9eUocP4YOaY=
Received: by 10.100.144.11 with SMTP id r11mr8234874and.68.1220395357097;
        Tue, 02 Sep 2008 15:42:37 -0700 (PDT)
Received: by 10.100.194.19 with HTTP; Tue, 2 Sep 2008 15:42:37 -0700 (PDT)
Message-ID: <f7ccd24b0809021542n313dbfc6vcb80ade1933bae26@HIDDEN>
Date: Wed, 3 Sep 2008 00:42:37 +0200
From: "Juanma Barranquero" <lekktu@HIDDEN>
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: 865 <at> debbugs.gnu.org, "Eli Zaretskii" <eliz@HIDDEN>
In-Reply-To: <48BDC0EE.1080104@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	 <48BD80C0.80707@HIDDEN> <ud4jm8k5z.fsf@HIDDEN>
	 <48BD8FA8.6030707@HIDDEN>
	 <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>
	 <48BDC0EE.1080104@HIDDEN>

On Wed, Sep 3, 2008 at 00:40, Lennart Borgman (gmail)
<lennart.borgman@HIDDEN> wrote:

> Forgot that discussion. Yes, but why not check the error returned instead?

Check for what?

   Juanma




Acknowledgement sent to "Juanma Barranquero" <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 22:40:55 +0000
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82MepNH030976
	for <865@HIDDEN>; Tue, 2 Sep 2008 15:40:53 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61773 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KaeYM-0004Xq-5f; Wed, 03 Sep 2008 00:40:51 +0200
Message-ID: <48BDC0EE.1080104@HIDDEN>
Date: Wed, 03 Sep 2008 00:40:46 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
CC: 865 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>	 <48BD80C0.80707@HIDDEN> <ud4jm8k5z.fsf@HIDDEN>	 <48BD8FA8.6030707@HIDDEN> <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>
In-Reply-To: <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1KaeYM-0004Xq-5f.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KaeYM-0004Xq-5f 690aa905c5b41cdfadec6002529f8011

Juanma Barranquero wrote:
> On Tue, Sep 2, 2008 at 21:10, Lennart Borgman (gmail)
> <lennart.borgman@HIDDEN> wrote:
> 
>> BTW there is a
>>
>>  (ignore-errors (delete-file server-file))
>>
>> in server-start. I do not like the ignore-errors there. Check if the
>> file is there first and if it is delete it.
> 
> How are you going to guarantee that the file isn't deleted by another
> process between the check and the delete-file call?


Forgot that discussion. Yes, but why not check the error returned instead?




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 22:38:22 +0000
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82McIIj029584
	for <865@HIDDEN>; Tue, 2 Sep 2008 15:38:19 -0700
Received: by an-out-0708.google.com with SMTP id b20so449992ana.9
        for <865@HIDDEN>; Tue, 02 Sep 2008 15:38:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:cc:in-reply-to:mime-version:content-type
         :content-transfer-encoding:content-disposition:references;
        bh=YOLTfHW3i5Lmzo+EkTJEX/4N3HOCRi4KI2Qyt5ACzRs=;
        b=mjSwNQ3K7PH535NbL0KTCDgbO9NmhsTSNPMWGXFShzULeakL5ItoExCzmXVXDtnIqP
         EPL1GHwQWDhG1/+jzXAOx3QqGSM5jecrSExTcleN3ClbQxhF7Dqws1P7e1jQTdfi6JIf
         Dqp+88LMdZzcvJDa83jhzsCMZTmXwJmkkGC6Q=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
         :content-type:content-transfer-encoding:content-disposition
         :references;
        b=I7L2Bn9HYXPymI/TRyGSGHajYhmUpSwmmcFNWhJO/QFT2FRjQg3TeR6TUW9AlLGGoE
         j0plyA8hrvcXO2zm+Yvb3ujz8yBV5V7A13qgGdW8aLEBCNVc6zuwvmsAMpIEZkPcSZMp
         edcZuYV3xpTm8y1QPkpsrNf1hZFG7kpUdDayM=
Received: by 10.100.33.13 with SMTP id g13mr8220254ang.79.1220395098273;
        Tue, 02 Sep 2008 15:38:18 -0700 (PDT)
Received: by 10.100.194.19 with HTTP; Tue, 2 Sep 2008 15:38:18 -0700 (PDT)
Message-ID: <f7ccd24b0809021538s5ca4afc7u2fbc7a0550640dc6@HIDDEN>
Date: Wed, 3 Sep 2008 00:38:18 +0200
From: "Juanma Barranquero" <lekktu@HIDDEN>
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Cc: "Eli Zaretskii" <eliz@HIDDEN>
In-Reply-To: <48BD8FA8.6030707@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
	 <48BD80C0.80707@HIDDEN> <ud4jm8k5z.fsf@HIDDEN>
	 <48BD8FA8.6030707@HIDDEN>

On Tue, Sep 2, 2008 at 21:10, Lennart Borgman (gmail)
<lennart.borgman@HIDDEN> wrote:

> BTW there is a
>
>  (ignore-errors (delete-file server-file))
>
> in server-start. I do not like the ignore-errors there. Check if the
> file is there first and if it is delete it.

How are you going to guarantee that the file isn't deleted by another
process between the check and the delete-file call?

  Juanma




Acknowledgement sent to "Juanma Barranquero" <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 19:37:48 +0000
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82JbipB032609
	for <865@HIDDEN>; Tue, 2 Sep 2008 12:37:45 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:60743 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kabh8-0003WX-6R; Tue, 02 Sep 2008 21:37:43 +0200
Message-ID: <48BD9602.2040904@HIDDEN>
Date: Tue, 02 Sep 2008 21:37:38 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, jasonr@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <48BD80C0.80707@HIDDEN> <ud4jm8k5z.fsf@HIDDEN> <48BD8FA8.6030707@HIDDEN> <u7i9u8hu9.fsf@HIDDEN>
In-Reply-To: <u7i9u8hu9.fsf@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1Kabh8-0003WX-6R.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Kabh8-0003WX-6R 1a9d53c394c37548192f07b2028a812b

Eli Zaretskii wrote:
>> Date: Tue, 02 Sep 2008 21:10:32 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
>> CC: 865@HIDDEN, jasonr@HIDDEN
>>
>> On the other hand the doc string is wrong.
> 
> I agree that the doc string "needs work".  It sounds like the function
> started from something like what the doc string describes, but then
> additional functionality was added to the code, and the doc string
> never caught up.

What I was trying to say was that the doc string seems to have started
from some ideas of how to solve the race condition problem. Those ideas
just does not fit very well here.

Checking the owner for example may fit much better on a file system that
is not using ACL-lists (are they dead on *nix?).

The ideas to use may have to be different on different systems.

So I think it is better to start with the ideas again. I guess the ideas
that someone tried to expressed in the doc strings may fit *nix. It that
is the case then let the doc string say that.

For w32 other criterias should be used in my opinion.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 19:32:08 +0000
Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82JW40K030939
	for <865@HIDDEN>; Tue, 2 Sep 2008 12:32:06 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6L00HLB2AFGZ51@i_mtaout3.012.net.il> for 865@HIDDEN; Tue, 02 Sep 2008 22:32:40 +0300 (IDT)
Date: Tue, 02 Sep 2008 22:31:58 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BD8FA8.6030707@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
Cc: 865 <at> debbugs.gnu.org, jasonr@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <u7i9u8hu9.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <48BD80C0.80707@HIDDEN> <ud4jm8k5z.fsf@HIDDEN> <48BD8FA8.6030707@HIDDEN>

> Date: Tue, 02 Sep 2008 21:10:32 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
> CC: 865@HIDDEN, jasonr@HIDDEN
> 
> On the other hand the doc string is wrong.

I agree that the doc string "needs work".  It sounds like the function
started from something like what the doc string describes, but then
additional functionality was added to the code, and the doc string
never caught up.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 19:19:26 +0000
Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82JJMxL026190
	for <865@HIDDEN>; Tue, 2 Sep 2008 12:19:23 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6L00NWO1P810X0@i_mtaout3.012.net.il> for 865@HIDDEN; Tue, 02 Sep 2008 22:19:56 +0300 (IDT)
Date: Tue, 02 Sep 2008 22:19:15 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BD74D5.4050800@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: lennart.borgman@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ubpz68ifg.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
X-CrossAssassin-Score: 2

> Date: Wed, 03 Sep 2008 01:16:05 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> Cc: emacs-pretest-bug@HIDDEN
> 
> Lennart Borgman (gmail) wrote:
> >   drwxrwxrwx  1 Administrators Domain Users 0 03-07 11:14 server
> >
> > The part that where server-unsure-safe-dir barks is
> >
> >   (eql (nth 2 attrs) (user-uid))
> >
> > This check is maybe something that should be skipped on w32? As you can
> > see from the dired output above it will get "Domain Users" in my case.
> >   
> 
> I think it will get "Administrators" in fact

Yes, because `nth's argument counts from zero.

> Eli, is it possible to tell the difference between an individual user 
> and a group when we get the owner from the system?

If you mean to ask whether LookupAccountSid we use to get the owner or
group name by their SID can tell us if the name it returns is a group
rather than a user, then no, I don't think so, unfortunately.  AFAIK,
Windows doesn't really know that itself, it stores the user and group
names in the same place.  In particular, no user can have a SID that
is identical to a SID of some group.

However, Administrators and Everyone have universally fixed RID values
(544 and 0 respectively), so we could make special code for those two
values on Windows (the offending function already makes exceptions for
Windows anyway).

We can also list all the groups to which the user belongs, and check
if one of them is Administrators.

Btw, I think erroring out if what server-ensure-safe-dir wants to see
is not true is too draconian.  It may be better to ask, at least an an
optional behavior.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,RCVD_IN_DNSWL_MED
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 19:19:26 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82JJMAm026191
	for <submit@HIDDEN>; Tue, 2 Sep 2008 12:19:23 -0700
Received: from mail.gnu.org ([199.232.76.166]:59324 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KabNp-0000Ko-21
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 15:17:45 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KabPK-0000ry-0w
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 15:19:22 -0400
Received: from mtaout3.012.net.il ([84.95.2.7]:14257)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1KabPJ-0000rU-BL; Tue, 02 Sep 2008 15:19:17 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K6L00NWO1P810X0@i_mtaout3.012.net.il>; Tue, 02 Sep 2008 22:19:56 +0300 (IDT)
Date: Tue, 02 Sep 2008 22:19:15 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BD74D5.4050800@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Jason Rumney <jasonr@HIDDEN>, 865 <at> debbugs.gnu.org
Cc: lennart.borgman@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ubpz68ifg.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 9.1

> Date: Wed, 03 Sep 2008 01:16:05 +0800
> From: Jason Rumney <jasonr@HIDDEN>
> Cc: emacs-pretest-bug@HIDDEN
> 
> Lennart Borgman (gmail) wrote:
> >   drwxrwxrwx  1 Administrators Domain Users 0 03-07 11:14 server
> >
> > The part that where server-unsure-safe-dir barks is
> >
> >   (eql (nth 2 attrs) (user-uid))
> >
> > This check is maybe something that should be skipped on w32? As you can
> > see from the dired output above it will get "Domain Users" in my case.
> >   
> 
> I think it will get "Administrators" in fact

Yes, because `nth's argument counts from zero.

> Eli, is it possible to tell the difference between an individual user 
> and a group when we get the owner from the system?

If you mean to ask whether LookupAccountSid we use to get the owner or
group name by their SID can tell us if the name it returns is a group
rather than a user, then no, I don't think so, unfortunately.  AFAIK,
Windows doesn't really know that itself, it stores the user and group
names in the same place.  In particular, no user can have a SID that
is identical to a SID of some group.

However, Administrators and Everyone have universally fixed RID values
(544 and 0 respectively), so we could make special code for those two
values on Windows (the offending function already makes exceptions for
Windows anyway).

We can also list all the groups to which the user belongs, and check
if one of them is Administrators.

Btw, I think erroring out if what server-ensure-safe-dir wants to see
is not true is too draconian.  It may be better to ask, at least an an
optional behavior.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 19:10:45 +0000
Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82JAfjV024189
	for <865@HIDDEN>; Tue, 2 Sep 2008 12:10:43 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:59915 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KabGy-0005Sx-8Y; Tue, 02 Sep 2008 21:10:41 +0200
Message-ID: <48BD8FA8.6030707@HIDDEN>
Date: Tue, 02 Sep 2008 21:10:32 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
CC: 865 <at> debbugs.gnu.org, jasonr@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <48BD80C0.80707@HIDDEN> <ud4jm8k5z.fsf@HIDDEN>
In-Reply-To: <ud4jm8k5z.fsf@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1KabGy-0005Sx-8Y.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KabGy-0005Sx-8Y 3c1ef08dc8d834528f52079a74001984

Eli Zaretskii wrote:
>> Date: Tue, 02 Sep 2008 20:06:56 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
>> Cc: emacs-pretest-bug@HIDDEN, 865@HIDDEN
>>
>> why not just check with file-writeable-p here?
> 
> Don't forget that on Windows, almost every file is writable.  You
> don't want everybody and their dog to be able to look at your server
> directory, do you?
> 
> IOW, this test is not about being able to write to a directory, it's
> about keeping your private data private.

Yes, you are right it was a silly suggestion.

On the other hand the doc string is wrong. Isn't it impossible to be
sure that there are no race conditions? And the list with different
things can't be fullfilled.

On w32 the location is maybe more meaningful than the owner? I would
suggest checking for that instead on w32.

BTW there is a

  (ignore-errors (delete-file server-file))

in server-start. I do not like the ignore-errors there. Check if the
file is there first and if it is delete it.




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 18:42:38 +0000
Received: from mtaout7.012.net.il (mtaout7.012.net.il [84.95.2.19])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82IgVwA013542
	for <865@HIDDEN>; Tue, 2 Sep 2008 11:42:33 -0700
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6K00HIEZYOTIB0@HIDDEN> for 865@HIDDEN; Tue, 02 Sep 2008 21:42:25 +0300 (IDT)
Date: Tue, 02 Sep 2008 21:41:44 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BD80C0.80707@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org
Cc: jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ud4jm8k5z.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <48BD80C0.80707@HIDDEN>

> Date: Tue, 02 Sep 2008 20:06:56 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
> Cc: emacs-pretest-bug@HIDDEN, 865@HIDDEN
> 
> why not just check with file-writeable-p here?

Don't forget that on Windows, almost every file is writable.  You
don't want everybody and their dog to be able to look at your server
directory, do you?

IOW, this test is not about being able to write to a directory, it's
about keeping your private data private.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.1 required=4.0 tests=AWL,BAYES_00,GMAIL,
	HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 18:42:37 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82IgXE1013548
	for <submit@HIDDEN>; Tue, 2 Sep 2008 11:42:34 -0700
Received: from mx10.gnu.org ([199.232.76.166]:56351)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1KaaoB-0006dn-G2
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 14:40:55 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kaapg-0001oH-Aa
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 14:42:32 -0400
Received: from mtaout7.012.net.il ([84.95.2.19]:27620)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <eliz@HIDDEN>)
	id 1Kaapf-0001o0-Hv; Tue, 02 Sep 2008 14:42:28 -0400
Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K6K00HIEZYOTIB0@HIDDEN>; Tue, 02 Sep 2008 21:42:25 +0300 (IDT)
Date: Tue, 02 Sep 2008 21:41:44 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
In-reply-to: <48BD80C0.80707@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org
Cc: jasonr@HIDDEN, emacs-pretest-bug@HIDDEN
Reply-to: Eli Zaretskii <eliz@HIDDEN>
Message-id: <ud4jm8k5z.fsf@HIDDEN>
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN> <48BD80C0.80707@HIDDEN>
X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?)
X-CrossAssassin-Score: 2

> Date: Tue, 02 Sep 2008 20:06:56 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
> Cc: emacs-pretest-bug@HIDDEN, 865@HIDDEN
> 
> why not just check with file-writeable-p here?

Don't forget that on Windows, almost every file is writable.  You
don't want everybody and their dog to be able to look at your server
directory, do you?

IOW, this test is not about being able to write to a directory, it's
about keeping your private data private.




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,RCVD_IN_DNSWL_MED
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 18:31:39 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82IVZxM010095
	for <submit@HIDDEN>; Tue, 2 Sep 2008 11:31:37 -0700
Received: from mx10.gnu.org ([199.232.76.166]:55231)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kaada-00065m-AV
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 14:29:58 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1Kaaf5-0007mA-3n
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 14:31:34 -0400
Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:53354)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KaaHc-0003Yl-13; Tue, 02 Sep 2008 14:07:16 -0400
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:59553 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KaaHZ-0008Kb-6I; Tue, 02 Sep 2008 20:07:14 +0200
Message-ID: <48BD80C0.80707@HIDDEN>
Date: Tue, 02 Sep 2008 20:06:56 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Jason Rumney <jasonr@HIDDEN>
CC: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
In-Reply-To: <48BD74D5.4050800@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1KaaHZ-0008Kb-6I.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KaaHZ-0008Kb-6I 73f7c3dd8ade71a5348c465fce0acdf9
X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!)
X-CrossAssassin-Score: 2

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>>   drwxrwxrwx  1 Administrators Domain Users 0 03-07 11:14 server
>>
>> The part that where server-unsure-safe-dir barks is
>>
>>   (eql (nth 2 attrs) (user-uid))
>>
>> This check is maybe something that should be skipped on w32? As you can
>> see from the dired output above it will get "Domain Users" in my case.
>>   
> 
> I think it will get "Administrators" in fact, but it is still wrong.
> This is caused by a misfeature of Windows, that if the creator of a file
> is a member of the local "Administrators" group, then ownership is
> assigned to "Administrators" instead of the individual user. I think a
> similar problem will occur on FAT32 systems where ownership is assigned
> to "Everyone".
> 
> Eli, is it possible to tell the difference between an individual user
> and a group when we get the owner from the system? If so, we could check
> if the current user is a member of that group, and if so report them as
> the owner rather than the whole group, to work around ownership tests
> like this in lisp code.

I can see what you want to achieve, but why not just check with
file-writeable-p here? Is not that more correct?




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,RCVD_IN_DNSWL_LOW
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 18:07:18 +0000
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82I7EoH001645
	for <865@HIDDEN>; Tue, 2 Sep 2008 11:07:16 -0700
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:59553 helo=[127.0.0.1])
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KaaHZ-0008Kb-6I; Tue, 02 Sep 2008 20:07:14 +0200
Message-ID: <48BD80C0.80707@HIDDEN>
Date: Tue, 02 Sep 2008 20:06:56 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Jason Rumney <jasonr@HIDDEN>
CC: 865 <at> debbugs.gnu.org, emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN> <48BD74D5.4050800@HIDDEN>
In-Reply-To: <48BD74D5.4050800@HIDDEN>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-ACL-Warn: Too high rate of unknown addresses received from you
X-Scan-Result: No virus found in message 1KaaHZ-0008Kb-6I.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KaaHZ-0008Kb-6I 73f7c3dd8ade71a5348c465fce0acdf9

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>>   drwxrwxrwx  1 Administrators Domain Users 0 03-07 11:14 server
>>
>> The part that where server-unsure-safe-dir barks is
>>
>>   (eql (nth 2 attrs) (user-uid))
>>
>> This check is maybe something that should be skipped on w32? As you can
>> see from the dired output above it will get "Domain Users" in my case.
>>   
> 
> I think it will get "Administrators" in fact, but it is still wrong.
> This is caused by a misfeature of Windows, that if the creator of a file
> is a member of the local "Administrators" group, then ownership is
> assigned to "Administrators" instead of the individual user. I think a
> similar problem will occur on FAT32 systems where ownership is assigned
> to "Everyone".
> 
> Eli, is it possible to tell the difference between an individual user
> and a group when we get the owner from the system? If so, we could check
> if the current user is a member of that group, and if so report them as
> the owner rather than the whole group, to work around ownership tests
> like this in lisp code.

I can see what you want to achieve, but why not just check with
file-writeable-p here? Is not that more correct?




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-5.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,SPF_HELO_PASS
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 865) by emacsbugs.donarmstrong.com; 2 Sep 2008 17:17:04 +0000
Received: from mk-outboundfilter-4.mail.uk.tiscali.com (mk-outboundfilter-4.mail.uk.tiscali.com [212.74.114.32])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82HGxHD015800
	for <865@HIDDEN>; Tue, 2 Sep 2008 10:17:00 -0700
X-Trace: 131140709/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.237.250
X-SBRS: None
X-RemoteIP: 124.82.237.250
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AkcBAMERvUh8Uu36/2dsb2JhbAAIsWiBaQ
X-IronPort-AV: E=Sophos;i="4.32,317,1217804400"; 
   d="scan'208";a="131140709"
X-IP-Direction: OUT
Received: from unknown (HELO [172.16.0.12]) ([124.82.237.250])
  by smtp.f2s.tiscali.co.uk with ESMTP; 02 Sep 2008 18:16:50 +0100
Message-ID: <48BD74D5.4050800@HIDDEN>
Date: Wed, 03 Sep 2008 01:16:05 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org
CC: emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN>
In-Reply-To: <48BD642C.5050405@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-CrossAssassin-Score: 2

Lennart Borgman (gmail) wrote:
>   drwxrwxrwx  1 Administrators Domain Users 0 03-07 11:14 server
>
> The part that where server-unsure-safe-dir barks is
>
>   (eql (nth 2 attrs) (user-uid))
>
> This check is maybe something that should be skipped on w32? As you can
> see from the dired output above it will get "Domain Users" in my case.
>   

I think it will get "Administrators" in fact, but it is still wrong. 
This is caused by a misfeature of Windows, that if the creator of a file 
is a member of the local "Administrators" group, then ownership is 
assigned to "Administrators" instead of the individual user. I think a 
similar problem will occur on FAT32 systems where ownership is assigned 
to "Everyone".

Eli, is it possible to tell the difference between an individual user 
and a group when we get the owner from the system? If so, we could check 
if the current user is a member of that group, and if so report them as 
the owner rather than the whole group, to work around ownership tests 
like this in lisp code.





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	IMPRONONCABLE_1,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,RCVD_IN_DNSWL_MED
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 17:17:01 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82HGvw9015801
	for <submit@HIDDEN>; Tue, 2 Sep 2008 10:16:58 -0700
Received: from mx10.gnu.org ([199.232.76.166]:48189)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <jasonr@HIDDEN>)
	id 1KaZTM-0001tb-AC
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 13:15:20 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1KaZUs-0001zh-JN
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 13:16:57 -0400
Received: from mk-outboundfilter-4.mail.uk.tiscali.com ([212.74.114.32]:14013)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <jasonr@HIDDEN>)
	id 1KaZUs-0001zb-AQ
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 13:16:54 -0400
X-Trace: 131140709/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.237.250
X-SBRS: None
X-RemoteIP: 124.82.237.250
X-IP-MAIL-FROM: jasonr@HIDDEN
X-IP-BHB: Once
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AkcBAMERvUh8Uu36/2dsb2JhbAAIsWiBaQ
X-IronPort-AV: E=Sophos;i="4.32,317,1217804400"; 
   d="scan'208";a="131140709"
X-IP-Direction: OUT
Received: from unknown (HELO [172.16.0.12]) ([124.82.237.250])
  by smtp.f2s.tiscali.co.uk with ESMTP; 02 Sep 2008 18:16:50 +0100
Message-ID: <48BD74D5.4050800@HIDDEN>
Date: Wed, 03 Sep 2008 01:16:05 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>,
        865 <at> debbugs.gnu.org
CC: emacs-pretest-bug@HIDDEN
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
References: <48BD642C.5050405@HIDDEN>
In-Reply-To: <48BD642C.5050405@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized.

Lennart Borgman (gmail) wrote:
>   drwxrwxrwx  1 Administrators Domain Users 0 03-07 11:14 server
>
> The part that where server-unsure-safe-dir barks is
>
>   (eql (nth 2 attrs) (user-uid))
>
> This check is maybe something that should be skipped on w32? As you can
> see from the dired output above it will get "Domain Users" in my case.
>   

I think it will get "Administrators" in fact, but it is still wrong. 
This is caused by a misfeature of Windows, that if the creator of a file 
is a member of the local "Administrators" group, then ownership is 
assigned to "Administrators" instead of the individual user. I think a 
similar problem will occur on FAT32 systems where ownership is assigned 
to "Everyone".

Eli, is it possible to tell the difference between an individual user 
and a group when we get the owner from the system? If so, we could check 
if the current user is a member of that group, and if so report them as 
the owner rather than the whole group, to work around ownership tests 
like this in lisp code.





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,IMPRONONCABLE_1,
	IMPRONONCABLE_2,MURPHY_DRUGS_REL8,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 16:05:18 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82G59lO021877
	for <submit@HIDDEN>; Tue, 2 Sep 2008 09:05:10 -0700
Received: from mail.gnu.org ([199.232.76.166]:43041 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KaYLs-0007DA-GS
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 12:03:32 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KaYNO-0007NA-Q9
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 12:05:09 -0400
Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:37990)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KaYNO-0007Mq-Dc
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 12:05:06 -0400
Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:65003 helo=[127.0.0.1])
	by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from <lennart.borgman@HIDDEN>)
	id 1KaYNL-0007jr-8T
	for emacs-pretest-bug@HIDDEN; Tue, 02 Sep 2008 18:05:03 +0200
Message-ID: <48BD642C.5050405@HIDDEN>
Date: Tue, 02 Sep 2008 18:05:00 +0200
From: "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: emacs-pretest-bug@HIDDEN
Subject: 23.0.60; The directory is unsafe today
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080902-0, 2008-09-02), Outbound message
X-Antivirus-Status: Clean
X-Originating-IP: 83.254.151.87
X-Scan-Result: No virus found in message 1KaYNL-0007jr-8T.
X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KaYNL-0007jr-8T c6758d989745ef0f0f0cdf0b564b5d92
X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!)

server-ensure-safe-dir complained today during server-start. Examining
the values in server-ensure-safe-dir I found the following:

  (default-file-modes) => 511 (#o777, #x1ff)
  (user-uid) => 30675 (#o73723, #x77d3)

  dir's value is
  "c:/Documents and Settings/my-userid/Application Data/.emacs.d/server"

  drwxrwxrwx  1 Administrators Domain Users 0 03-07 11:14 server

  attrs's value is
  (t 1 544 513
     (18621 8536)
     (18385 5511)
     (17762 50477)
     0 "drwxrwxrwx" nil
     (44800 0 . 20258)
     (32879 . 13859))


The part that where server-unsure-safe-dir barks is

  (eql (nth 2 attrs) (user-uid))

This check is maybe something that should be skipped on w32? As you can
see from the dired output above it will get "Domain Users" in my case.



(This is from my patched version, but there is no patches in w32.c or
server.el.)

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-09-02 on (patched)
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/g/include'




Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#865; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 21 Oct 2017 20:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.