Re: C set-user-ID program wrapper for Perl script and security



"Malcolm McLean" <regniztar@xxxxxxxxxxxxxx> writes:

"Richard" <rgrdev@xxxxxxxxx> wrote in message

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.

The alternative to hardcode paths is softcoded paths. However Perl is

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.
.



Relevant Pages

  • RE: Segmentation Fault(Core dumped)
    ... But when I started testing my perl script, ... Compilation failed in require at ./test.pl line 13. ... > official business of Sender. ...
    (perl.dbi.users)
  • Re: sharing variables-data perl-asp
    ... Also how do you invoke a perl script from an active server page? ... ASP in Perl. ... Why do you want to shell out to perl when you're already running perl? ...
    (comp.lang.perl.misc)
  • Re: environment variables in perl scripts
    ... Define a BEGIN block in your perl program. ... > perl script, something like: ... > environment variables are there and diag.txt shows ... > This communication is intended for the use of the ...
    (perl.dbi.users)
  • Re: kill process when file count reached,,.
    ... an infinite loop there, ... IMO you could just use readdir and grep in perl. ... You're using awk in backticks in a perl script? ... Perl has a kill builtin, why the hell not use that. ...
    (comp.lang.perl.modules)
  • Re: associating .pl extension with perl
    ... > On my laptop Linux system, I can execute perl scripts ... > associated with perl. ... interpreter that will execute the code contained therein. ... > I discovered this problem when using a perl script that I wrote on my ...
    (comp.lang.perl.misc)