Re: C set-user-ID program wrapper for Perl script and security
- From: Richard<rgrdev@xxxxxxxxx>
- Date: Sun, 31 Aug 2008 15:09:15 +0200
"Malcolm McLean" <regniztar@xxxxxxxxxxxxxx> writes:
"Richard" <rgrdev@xxxxxxxxx> wrote in message
The alternative to hardcode paths is softcoded paths. However Perl is
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.
err, quite.
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
As do all file commands in C.
paths in Perl you are taking away the natural facilities of the shell,
and creating a dependency.
Rubbish. No one is demanding anything. Its just that hardcoded paths are
often questionable. One should calculate them based on querying the
system or constructing relative paths. "Hard coded" here I take to mean
a specific URL/link with root fixed.
On the other hand C is a compiled language. It is not possible to edit
Thanks for that too ....
the source and run, one must recompile. There might well be several
Uh huh. Recompile eh?
executables on different machines derived from the one C source. So
updating the C program when paths change is a major nuisance.
Updating ANY source when paths change is a nuisance. Hence you TRY to
make the sure the program has the information it needs to construct a
proper path regardless of system and install location.
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.
I don't necessarily disagree with that. But again, where hard coded
paths can be avoided in PERL/Python scripts too then do so. Hard coded
paths have been the bane of Linux adoption, for example, for years since
half the hacked up shell scripts to install certain SW assumes a certain
distro only to be run on a different distro where the paths are
nonsense.
.
- 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
- Re: C set-user-ID program wrapper for Perl script and security
- From: Malcolm McLean
- C set-user-ID program wrapper for Perl script and security
- Prev 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: diffrence?
- Index(es):
Relevant Pages
|