From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#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 Message-ID: <83r5v4f9h3.fsf@gnu.org> References: <86F491CE4D5C4E80B9B4FD5F110C3F12@us.oracle.com> <83ocq9h63s.fsf@gnu.org> <2BFC5C014BD64D93A209629F9B852FFC@us.oracle.com> <83bpm9gj0d.fsf@gnu.org> <838whdggwz.fsf@gnu.org> <6020B772F1FA4D3BB5EFF3426271FC41@us.oracle.com> <834os0hpld.fsf@gnu.org> Reply-To: Eli Zaretskii , 4197@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1250936833 17788 80.91.229.12 (22 Aug 2009 10:27:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Aug 2009 10:27:13 +0000 (UTC) To: 4197@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 22 12:27:06 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MenoP-0003k8-BO for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Aug 2009 12:27:06 +0200 Original-Received: from localhost ([127.0.0.1]:48261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MenoO-0004Lf-Ld for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Aug 2009 06:27:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MenoJ-0004K3-3N for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2009 06:26:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MenoE-0004F5-GJ for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2009 06:26:58 -0400 Original-Received: from [199.232.76.173] (port=56437 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MenoE-0004F1-Da for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2009 06:26:54 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37246) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MenoD-0003IX-Hx for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2009 06:26:53 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7MAQpnx002046; Sat, 22 Aug 2009 03:26:51 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7MAF7ew032447; Sat, 22 Aug 2009 03:15:07 -0700 Resent-Date: Sat, 22 Aug 2009 03:15:07 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com 2Resent-Date: Sat, 22 Aug 2009 10:15:07 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4197 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Original-Received: via spool by 4197-submit@emacsbugs.donarmstrong.com id=B4197.125093575031431 (code B ref 4197); Sat, 22 Aug 2009 10:15:07 +0000 Original-Received: (at 4197) by emacsbugs.donarmstrong.com; 22 Aug 2009 10:09:10 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7MA9816031414 for <4197@emacsbugs.donarmstrong.com>; Sat, 22 Aug 2009 03:09:09 -0700 Original-Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KOR00400VXKD600@i_mtaout3.012.net.il> for 4197@emacsbugs.donarmstrong.com; Sat, 22 Aug 2009 13:09:02 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.180.85]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KOR00CINW71GO80@i_mtaout3.012.net.il>; Sat, 22 Aug 2009 13:09:01 +0300 (IDT) In-reply-to: <834os0hpld.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 22 Aug 2009 06:26:58 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30473 Archived-At: > Date: Fri, 21 Aug 2009 23:35:58 +0300 > From: Eli Zaretskii > Cc: 4197@emacsbugs.donarmstrong.com > > > From: "Drew Adams" > > Cc: <4197@emacsbugs.donarmstrong.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 * 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))))