Re: C set-user-ID program wrapper for Perl script and security
- From: "Malcolm McLean" <regniztar@xxxxxxxxxxxxxx>
- Date: Sun, 31 Aug 2008 13:45:41 +0100
"Richard" <rgrdev@xxxxxxxxx> wrote in message
The alternative to hardcode paths is softcoded paths. However Perl is already an evolved shell script. The major thing that the shell does is to allow the user to specify files by path. By demanding softcoded paths in Perl you are taking away the natural facilities of the shell, and creating a dependency.
You have just stated that they exist. There is still no good reason why
hard coded paths *should* exist in Perl any more than they should in C.
On the other hand C is a compiled language. It is not possible to edit the source and run, one must recompile. There might well be several executables on different machines derived from the one C source. So updating the C program when paths change is a major nuisance.
Basically, write everything that doesn't need hardcoded paths in C, then write a Perl script to drive your C programs, with the paths coded into the Perl script where it is too much of a burden on the user to put them on the commandline.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
.
- Follow-Ups:
- References:
- C set-user-ID program wrapper for Perl script and security
- From: Peter Michaux
- Re: C set-user-ID program wrapper for Perl script and security
- From: Peter Michaux
- Re: C set-user-ID program wrapper for Perl script and security
- From: Keith Thompson
- Re: C set-user-ID program wrapper for Perl script and security
- From: Richard
- C set-user-ID program wrapper for Perl script and security
- Prev by Date: Re: Storgae durations
- Next by Date: Re: C set-user-ID program wrapper for Perl script and security
- Previous by thread: Re: C set-user-ID program wrapper for Perl script and security
- Next by thread: Re: C set-user-ID program wrapper for Perl script and security
- Index(es):