# HG changeset patch # User Richard M. Stallman # Date 835812102 0 # Node ID d9bb8f6b05a0a298bdece3ee75fcf882a22e6710 # Parent f8e362279cbb90a8bbeb0939bcd8e6c0bf76898b Comment changes. diff -r f8e362279cbb -r d9bb8f6b05a0 lisp/vc-hooks.el --- a/lisp/vc-hooks.el Wed Jun 26 18:00:52 1996 +0000 +++ b/lisp/vc-hooks.el Wed Jun 26 18:01:42 1996 +0000 @@ -880,15 +880,16 @@ (and vc-display-status (vc-status file))))) ;; If the file is locked by some other user, make ;; the buffer read-only. Like this, even root - ;; cannot modify a file without locking it first. + ;; cannot modify a file that someone else has locked. (and vc-type (equal file (buffer-file-name)) (vc-locking-user file) (not (string= (user-login-name) (vc-locking-user file))) (setq buffer-read-only t)) - ;; If the user is root, and the file is not owner-readable, - ;; then pretend that we can't read it - ;; even though we can (because root can read anything). + ;; If the user is root, and the file is not owner-writable, + ;; then pretend that we can't write it + ;; even though we can (because root can write anything). + ;; This way, even root cannot modify a file that isn't locked. (and vc-type (equal file (buffer-file-name)) (not buffer-read-only)