mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
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.
This commit is contained in:
parent
b060e091c3
commit
d719ea6ad5
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user