From: "richard n. frank" <rnfrank () wolfram ! llnl ! gov>
To: tru64-unix-managers
Subject: Summary: C program to mount/umount disks
Date: Mon, 17 Aug 1998 20:45:03 +0000 [thread overview]
Message-ID: <96078718211756.tru64-unix-managers.marc@archive.invalid> (raw)
Many thanks for the excellent information. This group is a tremendous
resource.
rich frank
rnfrank@llnl.gov
George Gallen <ggallen@slackinc.com>
Bob Sloane sloane@UKANS.EDU
georg.buesse@db.com
Dave Courtade <drc@amherst.com>
Kevin Reardon <kreardon@na.astro.it>
Tom Webster <webster@ssdpdc.lgb.cal.boeing.com>
Stefan Heim <sheim@gwdg.de>
Biggerstaff, Craig T" <Craig.T.Biggerstaff@USAHQ.UnitedSpaceAlliance.com>
---------------------------------------------------------------------------------
Several suggestions promoted the sudo program, but I think I prefer
the direct approach.
Georg Buesse provided this C program which looks very servicable:
...we used this script to start predefined .sh scripts on an AIX workstation.
It should be possible to either write an .sh-script for mounting or to change
the system call to use the mount-instruction.
#include <stdio.h>
#include <strings.h>
#include <usersec.h>
main(argc, argv)
char *argv[];
int argc;
{
char sys_call[50];
const char user[] = "root";
if (argc != 1)
{
printf("Bitte Aufrufsyntax beachten! \n");
printf("z.B:> start_script \n");
}else {
sprintf(sys_call, "/home/xxxxx/start_script.sh %s \0 ", "");
printf ("%s \n" , sys_call);
/*printf ("%s \n", user);*/
setpcred(user,NULL);
system (sys_call);
}
}
--------------------------------------------------------------------------------
Kevin Reardon also furnished a C program complete with documentation. It is
fairly long so I won't post it here. I will be happy to foreward it to anyone
who is interested.
---------------------------------------------------------------------------------
David R. Courtade has a program specifically for a JAZ drive available at:
ftp.amherst.com/pub/jazstuf
---------------------------------------------------------------------------------
Craig Biggerstaff remembered a program that was posted by Emanuele Lombardi.
This should be in the archives.
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
original question:
Good morning,
I will be putting a Jaz drive on a 4.0D personal workstation. On VMS systems
I have a Fortran program which is installed with privilege. It calls .com file
which mounts a disk. I would think the same sort of thing could be done in UNIX
with a C program. I'd experiment with a Fortran program but alas, we have a C
compiler for DU but no Fortran.
Has anyone created a C program which can be set to "suid" to allow unprivilged
users to mount and umount a disk?
Thanks for the help.
rich frank
rnfrank@llnl.gov
reply other threads:[~1998-08-17 20:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox