1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-08 15:35:02 +00:00

* net/tramp.el (tramp-handle-insert-file-contents): For root,

preserve owner and group when editing files.  (Bug#7289)

Please contact me, if you have problems syncing with the trunk.
This commit is contained in:
Michael Albinus 2010-10-30 18:28:17 +02:00
parent d2ce10d221
commit a057950d77
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-10-30 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-handle-insert-file-contents): For root,
preserve owner and group when editing files. (Bug#7289)
2010-10-29 Glenn Morris <rgm@gnu.org>
* speedbar.el (speedbar-mode):

View File

@ -5008,7 +5008,11 @@ coding system might not be determined. This function repairs it."
(setq buffer-file-name filename)
(setq buffer-read-only (not (file-writable-p filename)))
(set-visited-file-modtime)
(set-buffer-modified-p nil))
(set-buffer-modified-p nil)
;; For root, preserve owner and group when editing files.
(when (string-equal (file-remote-p filename 'user) "root")
(set (make-local-variable 'backup-by-copying-when-mismatch) t)
(put 'backup-by-copying-when-mismatch 'permanent-local t)))
(when (and (stringp local-copy)
(or remote-copy (null tramp-temp-buffer-file-name)))
(delete-file local-copy))