GNU bug report logs - #4197
23.1; error when try to run `server-start': directory .emacs.d/server is unsafe

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Thu, 20 Aug 2009 20:34:41 UTC

Severity: normal

Merged with 865, 3281, 8787

Found in version 23.3

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: 4197 <at> debbugs.gnu.org
Cc: drew.adams <at> oracle.com
Subject: Re: bug#4197: 23.1;	error when try to run `server-start': directory .emacs.d/server	is	unsafe
Date: Sat, 22 Aug 2009 13:07:04 +0300
> Date: Fri, 21 Aug 2009 23:35:58 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 4197 <at> emacsbugs.donarmstrong.com
> 
> > From: "Drew Adams" <drew.adams <at> oracle.com>
> > Cc: <4197 <at> emacsbugs.donarmstrong.com>, <lennart.borgman <at> gmail.com>
> > Date: Fri, 21 Aug 2009 11:55:27 -0700
> > 
> > But if the default value of the variable is inappropriate for some platform
> > (disk format), then it should be changed - at least on that platform.
> > 
> > Can you not test for this (e.g. using code similar to what you asked me to
> > evaluate to test this), and set the default value accordingly?
> 
> I don't think we need to change the value of
> w32-get-true-file-attributes on FAT32 volumes.  All we need is fix
> server.el to not barf on FAT32 volumes.  I'll see what I can do.

Can you please try the following patch to server.el?  It is checked in
on the release branch.

2009-08-22  Eli Zaretskii  <eliz <at> gnu.org>

	* server.el (server-ensure-safe-dir): Disable the security check
	for Windows.

Index: lisp/server.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/server.el,v
retrieving revision 1.192
diff -u -r1.192 server.el
--- lisp/server.el	10 Mar 2009 14:09:26 -0000	1.192
+++ lisp/server.el	22 Aug 2009 10:06:05 -0000
@@ -452,9 +452,10 @@
     (unless attrs
       (letf (((default-file-modes) ?\700)) (make-directory dir t))
       (setq attrs (file-attributes dir)))
-    ;; Check that it's safe for use.
-    (unless (and (eq t (car attrs)) (eql (nth 2 attrs) (user-uid))
-                 (or (eq system-type 'windows-nt)
+    ;; Check that it's safe for use.  Windows doesn't support
+    ;; Posix-style file security, so don't check there.
+    (unless (or (eq system-type 'windows-nt)
+		(and (eq t (car attrs)) (eql (nth 2 attrs) (user-uid))
                      (zerop (logand ?\077 (file-modes dir)))))
       (error "The directory %s is unsafe" dir))))
 



This bug report was last modified 14 years and 71 days ago.

Previous Next


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