Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Allocating tape devices
@ 1995-03-31  5:00 OXF Starlink
  1995-04-03  4:00 ` Angel Lopez-Sainz
  0 siblings, 1 reply; 3+ messages in thread
From: OXF Starlink @ 1995-03-31  5:00 UTC (permalink / raw)




 We are having a lot of difficulty with people writing over other peoples
 tapes. I am planning to write a script to allocate a tape based on the
 creation of a file in /tmp and write a wrapper for tar that checks this.

 My question is, is there a better way ?

 This is for DECstations running Ultrix and Alphas running OSF/1.   

 Cheers,
    Paul

+-------------------------------------------------------------------------+
| Paul Collison,                         email: p.collison@ph.ox.ac.uk    |
| Starlink Computer Systems Manager                                       |
| Dept. of Astrophysics                                                   |
| University of Oxford, UK             Tel: +44-(0) 865 273311 (direct)   |
|                                           +44-(0) 865 273303 (enquiries)|
|                                      Fax: +44-(0) 865 273418            |
+-------------------------------------------------------------------------+



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Allocating tape devices
  1995-03-31  5:00 Allocating tape devices OXF Starlink
@ 1995-04-03  4:00 ` Angel Lopez-Sainz
  1995-04-04  4:00   ` Joseph H. Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Angel Lopez-Sainz @ 1995-04-03  4:00 UTC (permalink / raw)


In article <3lhgmp$13n@star.rl.ac.uk>,
OXF Starlink (star@alderamin.astro.ox.ac.uk) wrote:

>  We are having a lot of difficulty with people writing over other peoples
>  tapes. I am planning to write a script to allocate a tape based on the
>  creation of a file in /tmp and write a wrapper for tar that checks this.

>  My question is, is there a better way ?


Ok. Three problems:

   1) What about cpio? What about programs (\eg data reduction packages and
      the like) which access tape devices directly? What about people w/
      their own copies of tar?
      
   2) This approach is not enforceable. Your users are free to ignore you,
      perhaps, out of ignorance.
      
   3) No sooner has your script verified that the control file is not
      present and thus concluded that the device is free a concurrent process
      running a few cycles ahead will create one. 
      (Murphy's second cousin's law)

   4) ...

Hmmm,... Ok. *4* problems: 1) What....      :-) :-)

   4) Tar and other archiving programs are often used accross the ethernet.
      Therefore the control file has to be visible from all machines. Am I
      wrong in thinking that /tmp is normally mounted as local?


Here is a different approach. I don't know if this is not going to create
a different set of problems but, then again, I'm not paid to know these
things. (\eg, this is just an idea which might or might not help you)

    1) Change the ownership and protection of the tape devices so that only
       root (or a group or whatever) has access to them. That prevents
       people from ignoring the procedure. If they don't comply then they
       get no tape access. (Possible problems w/ drastic reboots?)

    2) Write a small program, say "allocate" that changes ownership of the
       desired tape device to the user who invoked the program (only if the
       current owner is root.) Other users are then prevented from using the
       device at the same time and can easily check who is using it if busy 
       (perhaps, "allocate" can report that as well). In the case of
       simultaneous allocation by two diferent users, both users might get
       the green light but only one will actually be able to use the drive
       (alternatively, the program might pause and check that the new owner
       is indeed the user and, otherwise, report the device as busy)
       Obviously the program will need setuid so I think it will be safer to
       avoid scripts. Instead, install a true binary, statically linked,
       etc, just to be on the safe side.

    3) Write a second program, say "deallocate" that reverts ownership to
       root (only if the owner is the user) and does nothing otherwise (so
       you can put it in the system's loginout sequence, thus preventing
       people from leaving devices allocated all weekend, etc.)
       


>  This is for DECstations running Ultrix and Alphas running OSF/1.   

In that case you might want to see if the RTL still provides support for ACLs
and use that instead of ownership, which seems a bit messy to me.


>  Cheers,
>     Paul

El Angel
------------------------------------------------------------------------------
      A. Lopez-Sainz      |   Internet: als@ast.cam.ac.uk               
  Institute of Astronomy  |
   Cambridge University   |       "You might very well think so, but I could
      United Kingdom      |   not possibly comment"  --  Francis Urqhart, PM
------------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Allocating tape devices
  1995-04-03  4:00 ` Angel Lopez-Sainz
@ 1995-04-04  4:00   ` Joseph H. Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Joseph H. Kim @ 1995-04-04  4:00 UTC (permalink / raw)


In article <3lnr29$ss1@lyra.csx.cam.ac.uk>, als@ast.cam.ac.uk (Angel Lopez-Sainz) writes:
|> In article <3lhgmp$13n@star.rl.ac.uk>,
|> OXF Starlink (star@alderamin.astro.ox.ac.uk) wrote:
|> 
|> >  We are having a lot of difficulty with people writing over other peoples
|> >  tapes. I am planning to write a script to allocate a tape based on the
|> >  creation of a file in /tmp and write a wrapper for tar that checks this.
|> 
|> >  My question is, is there a better way ?
|> 
|> 
|> Ok. Three problems:
|> 
[...]

Yet another drastic solution might be to implement a trusted server that
serializes the access to the tape drives.  Something Mach IPC-based, perhaps,
going through the netmsgserver?  Then you can restrict all tape access
commands to be executable by root only, and the only way the users may, say,
do tar would be to go through this server.

Then again, who might have the time...:-)

Joe



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1995-04-04  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-03-31  5:00 Allocating tape devices OXF Starlink
1995-04-03  4:00 ` Angel Lopez-Sainz
1995-04-04  4:00   ` Joseph H. Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox