Re: C set-user-ID program wrapper for Perl script and security
- From: Richard<rgrdev@xxxxxxxxx>
- Date: Sun, 31 Aug 2008 12:21:55 +0200
"Malcolm McLean" <regniztar@xxxxxxxxxxxxxx> writes:
<s0suk3@xxxxxxxxx> wrote in message news:
On Aug 31, 3:18 am, Keith Thompson <kst-u@xxxxxxx> wrote:That's the answer. Hardcoded paths are a nuisance in a C
Peter Michaux <petermichaux@xxxxxxxxx> writes:
On Aug 30, 3:03 pm, "Malcolm McLean" <regniz...@xxxxxxxxxxxxxx> wrote:
it is reasonable to hardcode paths in a Perl script,
much less sensible to do so in a C program.
Why is that?
Speaking as both a C programmer and a Perl programmer, I can't think
of any good reason.
Perl is typically used as a "scripting language", i.e., a glue
language, a language to automate typical tasks, a test driver, etc.
C programs are usually targeted at more serious tasks and are
therefore better structured and developed with maintainability and
reusability in mind. Thus, there's no reason why such a program would
have hard-coded paths, except for example during testing.
program. Typically C source is thousands of lines long, and the
executable might be detached from the source for use. So its a big job
to change the paths.
On the other hand users expect Perl scripts to contain
paths. Typically they are quite short and farm out most of the
"serious" work to other programs. Perl started as a glorified shell
script, after all.
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.
.
- Follow-Ups:
- Re: C set-user-ID program wrapper for Perl script and security
- From: Malcolm McLean
- Re: C set-user-ID program wrapper for Perl script and security
- 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
- C set-user-ID program wrapper for Perl script and security
- Prev by Date: Re: char**
- Next by Date: Re: Help with understanding this please
- 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):
Relevant Pages
|