Newsgroups: comp.sys.apollo
Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!hellgate.utah.edu!cs.utah.edu!zeleznik
From: zeleznik@cs.utah.edu (Mike Zeleznik)
Subject: Re: DM editor as a process
Date: 29 Nov 89 09:45:55 MST
Message-ID: <1989Nov29.094555.24366@hellgate.utah.edu>
Keywords: dm edit editor 
Organization: University of Utah CS Dept
References: <5431@ncar.ucar.edu> <1149@cernvax.UUCP>

In article <1149@cernvax.UUCP> achille@cernvax.UUCP (achille petrilli) writes:
>Hi, I wrote a program some times ago that does what you want, I called
>it dmed and use it to replace vi in mail (we all have the same ideas it
>seems :-). This is not particularly difficult.
>
>About using it when you're su'd, sorry, no way. As the program calls 
>pad_$xxxx, the editor is still owned by DM and the person logged into
>the DM.

We got around this problem of DM owning the editor in the past with a
small shell script wrapped around the "dmed" program.  

The script simply copied the desired file into /tmp with world write
access, and edited it there.  On exit, it moved the original file to a .bak
version (thus keeping original ACLs), copied the /tmp file back to the
original location, and then set the ACLs on this new file from the .bak
file.  It also had lots of checks to make sure you didn't lose things on
abort or error.

**** Obviously this is NOT secure **** but it does serve the purpose if
security of that sort is not a primary issue.

Mike

  Michael Zeleznik              Computer Science Dept.
                                University of Utah
  zeleznik@cs.utah.edu          Salt Lake City, UT  84112
                                (801) 581-5617
