Commit d719ea6a authored by Noam Postavsky's avatar Noam Postavsky

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.
parent b060e091
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment