home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
misc
/
volume30
/
netvote
/
part01
/
single
/
perlsu.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS
UTF-8
Wrap
C/C++ Source or Header
|
1992-06-19
|
392 b
|
24 lines
/*
* PERLSU.C - SetUid wrapper for PERL
*/
#include <malloc.h>
/*
* Here is the working directory. Should be defined on the command line
*/
#ifndef PWD
#define PWD "./"
#endif
main(argc,argv,envp) int argc; char *argv[]; char *envp[]; {
char *buf;
buf = malloc(sizeof(argv[0]) + 100);
strcpy(buf,PWD);
strcat(buf,argv[0]);
strcat(buf,".pl");
execve(buf,argv,envp);
}