[sudo-users] sudoedit allow people to edit a file at the same time

Todd C. Miller Todd.Miller at courtesan.com
Tue Aug 9 11:10:09 EDT 2011


On Tue, 02 Aug 2011 13:46:24 +0200, "Simon, Hendrik" wrote:

> If people  use vi to edit a file at the same time, the second get
> a hint the file is editing.  If people  use sudoedit to edit a file
> at the same time, nobody get a hint the file is editing by someone
> else.  The last one who save the file wins.

There's not currently a good solution for this since each user is
editing a separate copy of the file.  Sudo could try to lock the
original file and issue a warning it may already be in use if another
process already has it locked.

Matching the exact behavior of every editor is not really possible
but it could detect when the editor is vi, nvi or vim and use the
-R flag to open the session readonly.

 - todd



More information about the sudo-users mailing list