Secure floppy filesyetms (was Re: interesting feature on AMIX..)

Bernd Felsche bernie at metapro.DIALix.oz.au
Thu Jun 27 13:01:31 AEST 1991


In <2761 at amix.commodore.com> ag at amix.commodore.com (Keith Gabryelski) writes:

>dillon at overload.Berkeley.CA.US (Matthew Dillon) writes:
>>     There is no way to secure a floppy.

>Sure there is: one rule must be followed, though.  If a user mounts a
>filesystem then set[ug]id or device files on that fileystem should not work.

Let's just refuse to mount a floppy with set[ug]id files and devices,
except for when "root" mounts it. The tools are there. Why make the
thing _more_ complex?

A setuid program, which runs /etc/ncheck first, inspect its output for
anomalies, and the exec's /etc/mount with appropriate arguments if it
is safe. It could even log intrusion attempts for the paranoid!

main(argc,argv)
integer argc;
char *argv[];
{
	/* some stuff as preamble */

	if ( (user = getuid()) == 0 ) safe = FALSE ; else safe = TRUE;

	if ( ! safe ) { /* fancy footwork to run /etc/ncheck on a pipe */
		/* pipe() */
		/* fork() */
		/* close fds not req'd */
		/* exec /etc/ncheck in child */
		/* parse output */
		if ( specials ) { /* funny business */
			/* break pipe, killing ncheck */
			/* log attempt */
			/* report error */
			exit(1);
		}
	}
	/* do the mount */
	execl(/*the mount*/);
}

The main danger is when people insert floppies in the drive which are
only slightly different to the one mounted.

The securemount program could read in all the directories as soon a
the floppy's mounted "for performance reasons" so that the blocks are
buffered, and won't be read from the floppy if it is changed.

Will the device driver return an error if a disk change has occurred
since the block device was mounted?? It seems like the right place to
handle this sort of thing.
-- 
Bernd Felsche,                 _--_|\   #include <std/disclaimer.h>
Metapro Systems,              / sold \  Fax:   +61 9 472 3337
328 Albany Highway,           \_.--._/  Phone: +61 9 362 9355
Victoria Park,  Western Australia   v   Email: bernie at metapro.DIALix.oz.au



More information about the Comp.unix.amiga mailing list