A C program that calls unix shell scripts 
Author Message
 A C program that calls unix shell scripts

Hi,

I'm trying to implement a utility that will backup and restore Oracle
database files using unix shell scripts for test databases.
However to ensure the file permissions are retained they must be run as
Oracle user. This is OK for development of the scripts, but for general use
I'd hoped to set the suid on these scripts owned by Oracle and allow users
to perform these tasks while ensuring traceability as each user uses a
unique log on. However because of the security problems associated with
suid on shell scripts my version of unix doesn't allow this facility to
work.
The solution I envisaged was to write a thin wrapper to each unix script,
written in C and then set the SUID of the resulting executable.
My question is, how do I invoke unix shell scripts from within my C program
?
Many thanks for reading this far !

Thanks in advance for any assistance

Barry Jones
Logica UK Ltd.



Mon, 18 Dec 2000 03:00:00 GMT  
 A C program that calls unix shell scripts

Quote:

> ...
> The solution I envisaged was to write a thin wrapper to each unix script,
> written in C and then set the SUID of the resulting executable.
> My question is, how do I invoke unix shell scripts from within my C program
> ?

See man-pages for system() fork() and exec()
Regards Rainer


Mon, 18 Dec 2000 03:00:00 GMT  
 A C program that calls unix shell scripts

A bit off topic, but you can download the C source for such a beast
from:

http://wwwcgi.umr.edu/~cgiwrap/



Quote:

> > ...
> > The solution I envisaged was to write a thin wrapper to each unix
script,
> > written in C and then set the SUID of the resulting executable.
> > My question is, how do I invoke unix shell scripts from within my C
program
> > ?
> See man-pages for system() fork() and exec()
> Regards Rainer



Tue, 19 Dec 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. how to call a unix shell script from a c program

2. Calling a KORN shell script (AIX) from a C-program

3. Calling shell script from a C program..

4. unix shell script execution

5. From a Unix shell script to a C function

6. UNIX shell scripts/commands..??

7. How can i return a variable to a Unix shell script

8. Calling Shell scripts from C

9. Running a shell script from C program

10. C program input redirect in shell script

11. Convert Unix Shell Program to C

12. BOOKS HOW TO UNIX/PERL/C-SHELL PROGRAMMING???

 

 
Powered by phpBB® Forum Software