* Need Help writing a secure mountcd program
@ 1998-03-16 22:05 Steve McLaughlin
0 siblings, 0 replies; only message in thread
From: Steve McLaughlin @ 1998-03-16 22:05 UTC (permalink / raw)
To: tru64-unix-managers
DU Gurus,
I'm trying to write a very secure version of mountcd that will do the
following:
1) When invoked, appends session information to security log.
2) Dynamically determines default CD-ROM device (not statically in the
program).
3) Prompts user for a CD-ROM device and/or mount point that is not the
default ones. If the user selects a non-default CD-ROM device, check
the validity of it.
4) Check mount point directory to ensure it's valid and empty.
5) If all checks, mount CD-ROM.
6) Closes security log.
I've got all of this EXCEPT how to determine if a raw file is a valid
CD-ROM device. For example, in a shell script (our environment) the
following command works nicely,
# file /dev/rrz*c | grep offline | cut -c 1-5,7-10
How can I do the equivalent in a C program? This is the only thing
left to do. I really don't want to wrap this is in a script or add a
system call to the program.
Many thanks in advance! I'll summarize.
Steve Mc.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-03-16 22:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-16 22:05 Need Help writing a secure mountcd program Steve McLaughlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox