From: Eli Zaretskii Date: Sat, 22 Aug 2009 10:07:25 +0000 (+0000) Subject: (server-ensure-safe-dir): Disable the security check for Windows. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4d75aaba27c978813c955288eb814ff147544193;p=emacs.git (server-ensure-safe-dir): Disable the security check for Windows. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ce3493a2b6..f683afb9cfd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-08-22 Eli Zaretskii + + * server.el (server-ensure-safe-dir): Disable the security check + for Windows. + 2009-08-18 Kenichi Handa * textmodes/paragraphs.el: Change to utf-8. Adjust coding cookie. diff --git a/lisp/server.el b/lisp/server.el index 10b08ad4a3b..cf308893113 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -452,9 +452,10 @@ Creates the directory if necessary and makes sure: (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))))