[13713] in Athena Bugs

home help back first fref pref prev next nref lref last post

emacs-19 elisp file vc-hooks.el "bug" report

daemon@ATHENA.MIT.EDU (Jeremy H. Brown)
Fri Aug 4 01:29:43 1995

From: jhbrown@ai.mit.edu (Jeremy H. Brown)
Date: Fri, 4 Aug 95 01:29:17 EDT
To: eggert@twinsun.com
Cc: emacsdev@MIT.EDU, bugs@MIT.EDU, jhbrown@MIT.EDU


This may or may not be considered a bug, but I consider it undesirable
behavior:

The Athena computing environment at MIT uses AFS for its distributed
filesystem.  Under AFS, the owner of a particular file is not the only
person who can edit it if it has RW permissions in the "owner" field;
instead, people on an access-list associated with the containing
directory can modify all files within the directory, regardless of
owner.

vc-hooks.el depends on RCS's setting the owner of a checked-out file
to prevent non-owners from editing the file; this is how it determines
whether a loaded file should be placed in a read-only buffer or not.
Under AFS, unfortunately, this means that anyone can load up a
checked-out file and it will appear in a writable buffer.  I have
found in group projects that this is the frequent cause of unfortunate
accidents.

vc-hooks.el does contain code to deal with the problem by comparing
the current user name against the file owner, and placing the file in
a read-only buffer if they do not compare -- this situation arises
when the current user is root, and therefore under standard unix
filesystem semantics might be expected to be able to read and write
every file on the system.

By applying this code generally, instead of only when the user is
root, a much more pleasing interface arises in which files locked by
other people are brought up in write-protected buffers, even under
AFS.  I, personally, find this to be a vast improvement.  I'm
including a context-diff of vc-hooks.el which shows the simple change
I made; I hope you will agree with me that it is a good change!

Thank you for your time,
Jeremy Brown

--------

*** vc-hooks.el	Thu May 19 17:58:26 1994
--- /tmp/vc-hooks.el	Fri Aug  4 00:29:11 1995
***************
*** 144,150 ****
  	;; Even root shouldn't modify a registered file without locking it first.
  	(and vc-type
  	     (not buffer-read-only)
! 	     (zerop (user-uid))
  	     (require 'vc)
  	     (not (string-equal (user-login-name) (vc-locking-user file)))
  	     (setq buffer-read-only t))
--- 144,150 ----
  	;; Even root shouldn't modify a registered file without locking it first.
  	(and vc-type
  	     (not buffer-read-only)
! 	     ;;(zerop (user-uid))
  	     (require 'vc)
  	     (not (string-equal (user-login-name) (vc-locking-user file)))
  	     (setq buffer-read-only t))


home help back first fref pref prev next nref lref last post