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

Previous Next

Package: emacs;

Reported by: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>

Date: Tue, 2 Sep 2008 16:10:05 UTC

Severity: normal

Merged with 3281, 4197, 8787

Found in version 23.3

Full log


Message #485 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: lennart.borgman <at> gmail.com, 865 <at> debbugs.gnu.org,
        emacs-pretest-bug <at> gnu.org
Subject: Re: bug#865: 23.0.60; The directory is unsafe today
Date: Fri, 05 Sep 2008 20:19:42 +0300
> From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
> Cc: Lennart Borgman <lennart.borgman <at> gmail.com>,
>         865 <at> emacsbugs.donarmstrong.com, emacs-pretest-bug <at> gnu.org
> 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.




This bug report was last modified 7 years and 236 days ago.

Previous Next


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