From: Noam Postavsky Date: Sat, 21 Oct 2017 15:52:24 +0000 (-0400) Subject: Another fix for unsafe directory error message (Bug#865) X-Git-Tag: emacs-26.0.91~495 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d719ea6ad5419bba2b376384c370dc2744dc718f;p=emacs.git Another fix for unsafe directory error message (Bug#865) * lisp/server.el (server-ensure-safe-dir): Put file owner's uid, not current user's for the wrong owner case. Show expanded file name in error message. --- diff --git a/lisp/server.el b/lisp/server.el index 33800a98682..4c591a5ee7c 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -546,14 +546,15 @@ See variable `server-auth-dir' for details." ;; 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))) + (user-full-name uid) 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))))) + (error "`%s' is not a safe directory because %s" + (expand-file-name dir) unsafe))))) (defun server-generate-key () "Generate and return a random authentication key.