[1036] in Moira

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

Re: chowning a volume to a gid

daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Dec 12 06:22:08 1996

Date: Wed, 11 Dec 1996 04:15:09 -0500
From: Greg Hudson <ghudson@MIT.EDU>
To: Jonathon Weiss <jweiss@MIT.EDU>
Cc: afsdev@MIT.EDU, moiradev@MIT.EDU
In-Reply-To: "[531] in AFS-developers"

Well, I didn't wait for an answer before going off and implementing
what I proposed.  I hope you don't mind too much; I figured a
four-hour response time was worth the lack of communication,
especially since I didn't know how to write Solaris kernel modules
before you sent your mail. :)

In /afs/dev.mit.edu/user/ghudson/uchown, you will find sources for a
kernel module and a userland program which implement an unrestricted
version of the chown system call.  I borrowed nine lines of code from
the Solaris kernel (the body of the "uchown" system call with a few
lines deleted), so you cannot distribute the kernel module source
outside of MIT.  jweiss and dkk have access to the directory; I didn't
give danw access because he's not full-time staff.  (This is a piddly
amount of Solaris source code to be worrying about, but I don't want
to cause any problems.)

To build the module and program, copy the sources and type "make" on a
Solaris machine.  You can install them on a machine with "make
install", although I assume what you really want to do is add stuff to
"mkserv moira".  (Otherwise the additions to /etc/rc2.d will be blown
away on the next update, and the addition you must make to
/etc/name_to_sysnum will be blown away by the update to the 8.1
release.)  What needs to happen on a machine for this to work is:

	* The module (uchown_mod) needs to be installed somewhere; I
	  recommend /kernel/sys/uchown.

	* The userland program (uchown) needs to be installed
	  somewhere.

	* /etc/name_to_sysnum needs an entry for "uchown" with the
	  number 201.

	* You need to "modload /kernel/sys/uchown" at some point
	  before the userland program will work.  The uchown.rc script
	  will handle this; the install target in the Makefile shows
	  how to install it in /etc/init.d/uchown and make symlinks in
	  /etc/rc0.d and /etc/rc2.d.

I've tested the kernel module and uchown program; I haven't tested the
uchown.rc script particularly, but it's really simple.

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