Newsgroups: comp.parallel.pvm
From: mapdjb@midge.bath.ac.uk (D J Batey)
Subject: multiuser PVM?
Organization: School of Mathematical Sciences, University of Bath, UK
Date: Thu, 7 Jul 1994 18:12:44 GMT
Message-ID: <CsL199.L0t@midge.bath.ac.uk>

Is anybody else out there interested in the idea of a multiuser PVM?
I have a feeling this was discussed last year sometime, but I can't
remember what was said, and I can't find it in the archives.

This afternoon, with some hints from Bob Manchek (thanks Bob), I
managed to make PVM usable by group, rather than by owner. This is
what I did:

- replaced all calls to getuid() with getgid(), so that the address
  and log files created in /tmp are created and accessed with the
  groupid rather than the userid as suffix 

  files:	lpvm.c
		pvmd.c

- changed all calls to open(..) that specify a 0600 mode to 0660, so 
  that address, log and authorisation files are created group
  read/writeable

  files:	lpvm.c
		pvmlog.c
		startup.c
		tdpro.c

The upshot of this is that all users whose primary group is the same
as that of the user who started the PVM in the first place can connect
to that PVM -- multiuser PVM! (sort of ;^)

A few tricksy points:

- I had to compile with -DNOTMPNAM because my OS creates authorisation
  files in /var/tmp rather than /tmp, which has the setgid bit set so
  that all files there are created with group 'staff'. With NOTMPNAM
  defined, PVM invents names in /tmp, where all is groovy. 

- I also have to make sure all prospective users have umask 002 rather
  than 022, otherwise the permissions on the address, log, and
  authorisation files get mangled after they've been created (there's
  probably a better way around this, but this is easy)

- When 'halt'ing or 'reset'ing the PVM, only those processes owned by
  the user who started the PVM are killed (for obvious reasons)

- Only one pvmd per group can run on a given machine at a time; PVM's
  in the same group can't overlap (fair enough, but a bit limiting
  in the long run, as is the one pvmd per user per machine in single
  user PVM)

Anybody else got any thoughts on/experiences of multiuser PVM? At some
point in the future I'm going to need a more explicit, secure,
multiuser connection mechanism than the hack outlined above. If at
that time PVM hasn't got one, I'll have to ditch it, which would be
a shame :(

-----------------------------------------------------------------------
 Duncan Batey                                          Computing Group,
 djb@maths.bath.ac.uk                            School of Mathematics,
 Postgraduate Research Student             University of Bath, England.
-----------------------------------------------------------------------







