[7805] in Perl-Users-Digest
Perl-Users Digest, Issue: 1430 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Dec 6 18:17:24 1997
Date: Sat, 6 Dec 97 15:00:23 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 6 Dec 1997 Volume: 8 Number: 1430
Today's topics:
Re: All files created by my script have permissions of <rootbeer@teleport.com>
Re: BSD/OS 3.0 killing Perl script? <rootbeer@teleport.com>
Re: Clearing a namespace <rootbeer@teleport.com>
Re: dbm denial from within a library - the answer is... <stk3364@stockton.edu>
Download PERL? <spice@gfherald.infi.net>
Re: Download PERL? <jrj120@psu.edu>
Re: eval and open: append vs new, i.e. >> vs > <rootbeer@teleport.com>
Re: FORM MAIL for Novell Web Server (Martin Vorlaender)
Re: formmail - IE works, netscape doesn't <rootbeer@teleport.com>
Getting variable from string search - stumped (Bob Maillet)
Re: HELP! I'm trying to customize/modify a shopping car <rootbeer@teleport.com>
How to find UNIX user mailboxes (Rob Edson)
Re: Inserting only the unique elements into an array .. <rootbeer@teleport.com>
Re: Inserting only the unique elements into an array .. <rootbeer@teleport.com>
Re: installing win32 <etta@none.com>
Re: need help with concatenation operation <mcinnis@cs.dal.ca>
Re: passing/returning a list of hashes to subs (how?) <rootbeer@teleport.com>
Re: PERL Frusterations (semi-newbie) <rootbeer@teleport.com>
perl's crypt and Apache's uncrypt() on SunOS <davidk@nospam.cnct.com>
Re: perl's crypt and Apache's uncrypt() on SunOS <marcs@znep.com>
Re: PERL<-->databases ???(newbie) <brianbaquiran@usa.net>
Re: perlsec setuid and my confusion and security issues <rootbeer@teleport.com>
search operator question (Ankur Pandya)
Tracing memory usage & related questions <boris@cs.jhu.edu>
Re: what's wrong with this? <rootbeer@teleport.com>
Re: Win32::EventLog rwstorer@iname.com
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 6 Dec 1997 10:57:44 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Brett Denner <Brett.W.Denner@lmco.com>
Subject: Re: All files created by my script have permissions of ----------
Message-Id: <Pine.GSO.3.96.971206104416.16254F-100000@usertest.teleport.com>
On Fri, 5 Dec 1997, Brett Denner wrote:
> I am running a large Perl script on both an Iris (6.2) and a Cray using
> Perl 5.004_04. The script works fine on the Cray, but on the Iris, all
> of the files created by the script have permissions set to ----------.
> BTW, when I run 'print umask, "\n";' with the script, it
> print out 18 (decimal), which equates to 022 octal.
It may be that there's a bug in your implementation of Perl. What does a
test script like this do?
umask 022;
$filename = '/tmp/testfile';
open FILE, ">$filename" or die "Can't open '$filename': $!";
printf "Mode is %03o\n", (stat FILE)[2] & 0777;
unlink $filename;
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 6 Dec 1997 11:37:01 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: ajni@iquill.net
Subject: Re: BSD/OS 3.0 killing Perl script?
Message-Id: <Pine.GSO.3.96.971206113531.16254M-100000@usertest.teleport.com>
On Sat, 6 Dec 1997 ajni@iquill.net wrote:
> However, when I try to run it on BSD/OS 3.0 and Perl 5.004 or 5.003, it
> just stops running after a while, with a "Killed" message (no core dump).
Is there a 'watchdog' process that kills anything that runs for too long?
Or are there some kind of quotas that you may be exceeding? Hope this
helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 6 Dec 1997 11:13:38 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Dave Wolfe <dwolfe@miaow.sps.mot.com>
Subject: Re: Clearing a namespace
Message-Id: <Pine.GSO.3.96.971206110407.16254H-100000@usertest.teleport.com>
On 5 Dec 1997, Dave Wolfe wrote:
> To keep from accumulating spurious definitions I need to undefine all
> the symbols in the namespace before defining the next set.
> I suspect the problem has to do with references made at compilation time
> that don't change just because the symbol table does,
Yes; the compiler is too smart. :-) Wiping out the symbol table for CFG::
won't guarantee that $CFG::testvar will seem to be wiped, since references
to that variable within the code are normally looked up at compile time.
Instead, you should probably use a different way to pass the symbols. For
example, storing them in a hash and passing the hash reference around.
This is likely to be more efficient, too. Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 06 Dec 1997 15:45:47 -0500
From: Wolf <stk3364@stockton.edu>
Subject: Re: dbm denial from within a library - the answer is...
Message-Id: <3489B97B.B75282BD@stockton.edu>
Bryan Teague pointed out that it was probably a permissions thing -- and
it was. I first wrote these as scripts that were called directly, and
they worked fine. When I altered them into libraries, to be called by
other scripts, I didn't take into account that unix would view them
differently, as respects their permissions.
Thanks,
Wolf
------------------------------
Date: Sat, 06 Dec 1997 13:27:11 -0600
From: Scott Olson <spice@gfherald.infi.net>
Subject: Download PERL?
Message-Id: <3489A70F.B9@gfherald.infi.net>
Can someone tell me where I can download Perl (the version where you
can make scripts)? (I think all of them make scripts but I want to know
where to get the latest version).
------------------------------
Date: Sat, 06 Dec 1997 15:24:54 +0000
From: James Juran <jrj120@psu.edu>
To: spice@gfherald.infi.net
Subject: Re: Download PERL?
Message-Id: <34896E46.28202C3@psu.edu>
[posted & mailed]
Scott Olson wrote:
>
> Can someone tell me where I can download Perl (the version where you
> can make scripts)? (I think all of them make scripts but I want to know
> where to get the latest version).
Try http://www.perl.com . That site may have a little bit of
information on Perl. :-)
--
James Juran
jrj120@psu.edu
------------------------------
Date: Sat, 6 Dec 1997 11:15:01 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Aaron Harsh <ajh@rtk.com>
Subject: Re: eval and open: append vs new, i.e. >> vs >
Message-Id: <Pine.GSO.3.96.971206111446.16254I-100000@usertest.teleport.com>
On Fri, 5 Dec 1997, Aaron Harsh wrote:
> my $funnel = $condition ? ">" : ">>";
> open(OUT, $funnel . $file);
Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 06 Dec 1997 16:26:49 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: FORM MAIL for Novell Web Server
Message-Id: <34896eb9.524144494f47414741@radiogaga.harz.de>
Guy Doucet (gdoucet@ait.acl.ca) wrote:
: Well, I found a SENDSMTP.PL script (part of a Toolkit v.2) from Novell's web
: site at:
: http://support.novell.com/Ftp/Updates/nwos/nwebs30/Date0.html
: The script asks for a MAILHOST that will accept and forward SMTP mail. The
: script apparently uses the basic SMTP (HELO) as opposed to the enhanced
: (EHLO). Don't ask me what all that means.
Don't care. These are the magics of the SMTP protocol.
: But nonetheless when I enter the
: IP address of my internet provider's MAIL server here in Canada (iStar),
...and you're sure that this is a _SMTP_ server?
: the
: script comes back and says "Error: Mail command failed sending: HELO" and
: also "501 syntactically invalid HELO argument(s)". Apparently the istar mail
: server is a POP3 Server if that means anything.
Ahhh! The POP3 protocol only is good for _receiving_ mail from a host,
not for _sending_ mail to a host. Look into your (normal) internet mail
configuration: Which host do you send your mail to? Try the script on
that host, and it'll work (provided the script does not contain bugs...)
: I don't expect anyone to
: download the script and troubleshoot it, but if any of the above means
: anything to you, would you shed some light on me.
Hope it helps,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
"UNIX is user friendly. | work: mv@pdv-systeme.de
It's just selective about | http://www.pdv-systeme.de/users/martinv/
who its friends are." | home: martin@radiogaga.harz.de
------------------------------
Date: Sat, 6 Dec 1997 11:51:02 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Greg Vinson <vinsong@olympus.not.spam>
Subject: Re: formmail - IE works, netscape doesn't
Message-Id: <Pine.GSO.3.96.971206114828.16254P-100000@usertest.teleport.com>
On 6 Dec 1997, Greg Vinson wrote:
> It works in Internet Explorer but not Netscape.
If you're following the protocols, then it's Netscape's fault. If you're
not following the protocols, then it's your fault. If you have read the
protocols and other docs and you're still not sure, then you could ask in
a newsgroup about the protocols. That will give you a better and
more-complete answer than anything we can give you here. Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 06 Dec 1997 15:38:35 -0500
From: bob@cafemedia.com (Bob Maillet)
Subject: Getting variable from string search - stumped
Message-Id: <bob-0612971538350001@apt2.tiac.net>
I am currently doing a string search which will print out the first 100
lines found..When I do a less detailed search the variable value of the
100th record prints out no problem..but when I include other parameters in
the search the last variable record from the entire string search is
printed (i.e. it would print the 124th value instead of the 100th value)
any ideas?
Bob
#This part breaks each line into an array and searches the variable of the
text #file to get the matches
foreach (@sort){
if ($count <= 100){
@ok = split(/\|/, $_);
if ($ok[0] eq $vara) {
if ($ok[2]=~/$varb/i){
if ($ok[5]=~/$varc/){
$count++;
print "$ok[1] $ok[2]$ok[3]$ok[4] $ok[5]\n"
}
}
}
}
}
# This does the same search by string to display the total count of the
records # found in the query
foreach (@sort){
if ($_=~/$ducat/ && $_=~/$vendor/i && $_=~/$platform/) {
$bount++;
}
}
#This SHOULD print out the variable value ($ok[1]) of the 100th
# record found in the search. This does work in less detailed searches.
if ($bount >= 101){
print "<P>100 of $bount records.<BR>";
print "$ok[1]";
}
--
To get random signatures put text files into a folder called 3Random Signatures2 into your Preferences folder.
------------------------------
Date: Sat, 6 Dec 1997 11:54:47 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: jay@secure800.com
Subject: Re: HELP! I'm trying to customize/modify a shopping cart script, and I can't get up!
Message-Id: <Pine.GSO.3.96.971206115134.16254Q-100000@usertest.teleport.com>
On Sat, 6 Dec 1997 jay@secure800.com wrote:
> Everybody has to start somewhere. I just started this job. I was hired
> to learn and maintain some "simple" html stuff.
It sounds as if you're having a problem with HTML. Maybe you need to check
the HTML docs, FAQs, and newsgroups.
> Please look at http://www.secure800.com/shop/frontpage.cgi
If you want help in debugging it, please post a small sample of source
code. Usually ten lines or so is plenty.
> and step through the process
> of order entry. WHY CAN'T I GET THE VALUE $subtotal to appear in the
> HIDDEN "amount" field at the bottom of the order form in cart.cgi?
If something isn't in the output, you probably need to print it so that it
will appear in the output.
Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 06 Dec 1997 14:34:25 -0500
From: roberteNOSPAM@cyboard.com (Rob Edson)
Subject: How to find UNIX user mailboxes
Message-Id: <roberteNOSPAM-ya023180000612971434250001@newsreader.digex.net>
It's not in %ENV unless the default shell is /bin/sh. Is there any way to
access the location of mailbox no matter what the login shell is?
--
Rob Edson
roberteNOSPAM@cyboard.com
------------------------------
Date: Sat, 6 Dec 1997 11:24:42 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Creede Lambard <fearless@io.com>
Subject: Re: Inserting only the unique elements into an array ...
Message-Id: <Pine.GSO.3.96.971206111731.16254J-100000@usertest.teleport.com>
On Fri, 5 Dec 1997, it was written:
> @_ = ("$candidate");
It's generally considered to be a bad idea to modify @_ like this. And
those quote marks don't do anything useful.
> push(@array,@_) unless ( join(";",@array) =~ /$candidate/ );
Have you considered what that does when @array has, say, 200_000 elements?
Or when $candidate contains shell metacharacters such as '.' or '('? Or
when it may contain semicolons? This is not a good solution to the
problem, which is really a FAQ.
Cheers!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 6 Dec 1997 11:26:47 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: anishxyz@worldnet.att.net
Subject: Re: Inserting only the unique elements into an array ...
Message-Id: <Pine.GSO.3.96.971206112613.16254K-100000@usertest.teleport.com>
On Sat, 6 Dec 1997, Narayan Moni wrote:
> I want the element to be inserted ONLY if the element is not already
> in the list.
http://www.perl.com/CPAN/doc/manual/html/pod/perlfaq4/
How_can_I_extract_just_the_uniqu.html
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 6 Dec 1997 14:42:19 -0800
From: "etta" <etta@none.com>
Subject: Re: installing win32
Message-Id: <66ckcv$34o@bgtnsc03.worldnet.att.net>
No, run it for the directory that it was made in. In my case its perl\bin
is where the
perl.exe file is. Just make sure that you have added the path in the
autoexec file.
path= C:\perl\bin;
Then to test the script all you have to do is type the following on the
command line.
perl testfile.pl
Hope this helps,
etta
JJ wrote in message <3489858B.436B@usa.net>...
>it says to test the program by running scripts from perl\ntt well it
>never made such a directory. did I do something wrong? I read every read
>me they have. Please help
------------------------------
Date: Sat, 6 Dec 1997 18:11:04 -0400
From: JASON ROBERT MCINNIS <mcinnis@cs.dal.ca>
To: Aqua Fantasies <webmaster@aquafan.com>
Subject: Re: need help with concatenation operation
Message-Id: <Pine.GSO.3.96.971206175801.22237A-100000@borg>
You could more easily look at it as :
> 05 $totals{$referer} = $totals{$referer} . $total . " ";
remember $totals{$referer} is a hash and $total is a total seperate scalar
variable with the same name as the hash. It is pretty confusing and not
good practice to name two different variables of two different data
structures the sam name. All it does is concatenates the current value of
the %totals hash at the key $referer with the value of $total and a blank
character and puts it back into the hash at the same point (at $referer)
I hope that answers your question.
On 5 Dec 1997, Aqua Fantasies wrote:
> Could someone please explain what line 5 does in this little snippet of
> code? It is derived from the Camel book and just doesn't make sense to me.
>
> 05 $totals{$referer} .= $total . " ";
> Laurel Bowen
> lbowen@vic.com
------------------------------
Date: Sat, 6 Dec 1997 11:48:02 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Simon Oosthoek <s.oosthoek@student.utwente.nl>
Subject: Re: passing/returning a list of hashes to subs (how?)
Message-Id: <Pine.GSO.3.96.971206114340.16254O-100000@usertest.teleport.com>
On 6 Dec 1997, Simon Oosthoek wrote:
> I'm trying to write a Perl script at work to read a configuration file
> in a sub. The file is built up of a list of entries with multiple lines
> of key/value pairs. I want to call a sub to read the file into a Perl
> datastructure.
>
> If I read all the documentation correctly, this should be done using
> hard references, but apparently I don't understand them enough to get it
> to work properly.
Here's some code which shows how to return a hashref from a sub.
sub fiddle {
my %hash; # the hash we'll be returning a ref to
$hash{key} = 'value';
$hash{other_key} = 'another value';
return \%hash; # Returning the reference
}
my $href = &fiddle; # get the reference
for (sort keys %$href) {
print "Key '$_' has value '$$href{$_}'\n";
}
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 6 Dec 1997 11:40:00 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Creede Lambard <fearless@io.com>
Subject: Re: PERL Frusterations (semi-newbie)
Message-Id: <Pine.GSO.3.96.971206113802.16254N-100000@usertest.teleport.com>
On Fri, 5 Dec 1997, it was written:
> $test = substr($group,0,1); # get first letter of group's name
> unless ($test =~ /$index/i) {
I think that that test could be done much more efficiently like this:
unless (lc($index) eq lc(substr($group, 0, 1)) ) {
It's generally a good idea to avoid recompiling regular expressions when
possible. Cheers!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 6 Dec 1997 13:55:15 -0500
From: "Dave Kaufman" <davidk@nospam.cnct.com>
Subject: perl's crypt and Apache's uncrypt() on SunOS
Message-Id: <66c7t9$pf8@world6.bellatlantic.net>
Hi,
I'm trying to install a CGI script that manipulates Apache 1.24's
.htpassword files.
My script calls perl's crypt() function to generate the encrypted password
for Apache. This all worked well under freeBSD with perl 5.004.
Now I'm trying to install it on another web host who's on SunOS 5.5 (as
reported by telnet login) or Solaris 2.5 (as reported by email from the
sysadmin -same thing??) and they are running perl 5.003 with EMBED +suidperl
security patch. Both servers are running Apache 1.24.
The script runs but the encrypted passwords it stores are different from the
ones I get on Perl 5.004 on FreeBSD, and Apache throws up all over them.
Does anyone know if this is perl calling an incompatible (with Apache) Sun
system call or a perl version conflict or what?
example:
username perl 5.004 crypt()ed on FreeBSD - $1$AB$7PObaBo9WbHGH1IufTKwc0
same username perl 5.003 crypt()ed on SunOS - ABy0GYslkMFbQ
Apache 1.24 can read the first one, but not the second... feature? bug?
workaround? clue?
TIA,
- Dave Kaufman <davidk@cnct.com>
please cc me by email (I don't get out much)
------------------------------------------------
Run, rabbit, run.
Dig that hole. Forget the sun.
When at last the work is done,
Don't sit down, it's time to dig another one.
- Pink Floyd
------------------------------------------------
------------------------------
Date: 6 Dec 1997 19:11:03 GMT
From: Marc Slemko <marcs@znep.com>
Subject: Re: perl's crypt and Apache's uncrypt() on SunOS
Message-Id: <66c807$ked$1@scanner.worldgate.com>
In <66c7t9$pf8@world6.bellatlantic.net> "Dave Kaufman" <davidk@nospam.cnct.com> writes:
>Hi,
>I'm trying to install a CGI script that manipulates Apache 1.24's
>.htpassword files.
>My script calls perl's crypt() function to generate the encrypted password
>for Apache. This all worked well under freeBSD with perl 5.004.
>Now I'm trying to install it on another web host who's on SunOS 5.5 (as
>reported by telnet login) or Solaris 2.5 (as reported by email from the
>sysadmin -same thing??) and they are running perl 5.003 with EMBED +suidperl
>security patch. Both servers are running Apache 1.24.
>The script runs but the encrypted passwords it stores are different from the
>ones I get on Perl 5.004 on FreeBSD, and Apache throws up all over them.
>Does anyone know if this is perl calling an incompatible (with Apache) Sun
>system call or a perl version conflict or what?
>example:
>username perl 5.004 crypt()ed on FreeBSD - $1$AB$7PObaBo9WbHGH1IufTKwc0
>same username perl 5.003 crypt()ed on SunOS - ABy0GYslkMFbQ
>Apache 1.24 can read the first one, but not the second... feature? bug?
>workaround? clue?
Apache does not know or care how your system's crypt() works. The
default FreeBSD crypt() uses md5, which gives you the first one.
Solaris uses a different crypt. Typically you should have no problems
using a perl compiled on Solars to crypt() passwords for Solaris.
crypt() is a library call, and both Apache and perl should use the
same one. It is possible for them to be different, but you need
to talk to your admin about that. No one else knows how your system
is setup.
You would have to be more specific than "throws up" to get any
ideas about the problem. It is very possible there is some other
problem. What does the error log say?
------------------------------
Date: Sat, 06 Dec 1997 23:53:54 +0800
From: Brian Baquiran <brianbaquiran@usa.net>
Subject: Re: PERL<-->databases ???(newbie)
Message-Id: <34897512.2C8A9C43@usa.net>
brian d foy wrote:
>
> In article <669b6q$og5@bagan.srce.hr>, dboraska@jagor.srce.hr (Damir Boraska) wrote:
>
> >HI there..I hope that there should be someone outhere who will help me with
> >this *problem*...
> >I'm using perl just ocasionally,so my knowledge of it is not really
> >impressive..however I find perl great for writing cgi scripts.
> >I need to write web form-data into a database,and also to offer a search
> >of the same database...
>
> if you are new to databases, you might want to read a database book
> to get the general idea of how databases work and what to watch
> out for. there might even be something like this on the net.
>
Excellent recommendation. A great online book, "How to be a Web Whore
Like Me" by Philip Greenspun is available at
http://www-swiss.ai.mit.edu/wtr/dead-trees/. It's the
full text (and more, only no diagrams) of his "Database Backed Web
Sites: the thinking person's guide to
web publishing".
> brian d foy <comdog@computerdog.com>
> NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
> CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Sat, 6 Dec 1997 11:33:08 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Mark Worsdall <jaydee@worsdall.demon.co.uk>
Subject: Re: perlsec setuid and my confusion and security issues please
Message-Id: <Pine.GSO.3.96.971206112858.16254L-100000@usertest.teleport.com>
On Sat, 6 Dec 1997, Mark Worsdall wrote:
> # Path of servers mail program
> $mailprog = '/usr/sbin/sendmail';
> # Open The Mail Program
> open(MAIL,"|$mailprog -t") or die "Error opening $mailprog: $!";
> So how has $mailprog become tainted?
It doesn't look as if it is; maybe you should check the error message (and
its description in perldiag) again.
> $ENV{PATH} = '/usr/sbin/sendmail';
That's not what you want in your PATH. The PATH is a colon-separated list
of directories (not binaries). In many cases, you may be able to use an
empty string; you can't get much safer than that! :-)
$ENV{PATH} = ''; # Gotta be safe
> The other confusion is that there is data from the outside world that is
> to be simply passed onto the mail program for mailing, so tainted no
> action will be initiated upon the data, so why worry? (Though I am).
You are what? Confused? :-)
But the mail program won't be checking for tainted data, so it can't give
you any errors about tainted data.
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 06 Dec 1997 22:29:10 GMT
From: asp201@is5.nyu.edu (Ankur Pandya)
Subject: search operator question
Message-Id: <3490d195.1826953@news.nyu.edu>
I was using the following bit of perl in a cgi script:
if ($string_line =~ /$word_to_match/i)
{
...
}
however whenever the $word_to_match starts with a + sign or has two
+'s in it (i.e. c++) the perl script aborts
anyone know what i have to do to fix the search string?
------------------------------
Date: Sat, 06 Dec 1997 15:47:39 -0500
From: Boris Statnikov <boris@cs.jhu.edu>
Subject: Tracing memory usage & related questions
Message-Id: <3489B9EB.C3F53D2E@cs.jhu.edu>
--------------7D59BE29A0791485056AC0F3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Is there a way to trace memory usage inside my Perl program? Inside the
(Perl) modules it uses? The ideal trace would say: This reference has X
bytes associated with it.
Also, is there a way to see the amount of memory which is free
internally but is not given back to the system?
Is it possible to kick off the garbage collector on demand?
Lastly, I was told that perl dbms cached all read data (without
removing entries via, say, LRU). What is the use of the DBM if my
memory has to store the whole 100MB of the data I might want to access?
Can I erase this cache?
--
Boris
Too many cooks spoil the brouhaha.
Harvard Lampoon
--------------7D59BE29A0791485056AC0F3
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
Is there a way to trace memory usage inside my Perl program? Inside
the (Perl) modules it uses? The ideal trace would say: This reference
has X bytes associated with it.
<P>Also, is there a way to see the amount of memory which is free internally
but is not given back to the system?
<P>Is it possible to kick off the garbage collector on demand?
<P>Lastly, I was told that perl dbms cached all read data (without
removing entries via, say, LRU). What is the use of the DBM if my
memory has to store the whole 100MB of the data I might want to access?
Can I erase this cache?
<PRE>--
Boris
Too many cooks spoil the brouhaha.
Harvard Lampoon</PRE>
</HTML>
--------------7D59BE29A0791485056AC0F3--
------------------------------
Date: Sat, 6 Dec 1997 12:29:42 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: John Nolan <nospam@domain.com>
Subject: Re: what's wrong with this?
Message-Id: <Pine.GSO.3.96.971206122853.16254S-100000@usertest.teleport.com>
On Sat, 6 Dec 1997, John Nolan wrote:
> ddrayton@aol.com wrote:
> >
> > open (FILE, "$sf_cfg") or die ("Can't open it");
> I think you meant to say:
>
> open (FILE, "<$sf_cfg") or die ("Can't open it");
I don't think that that will normally make any difference.
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sat, 06 Dec 1997 13:01:31 -0600
From: rwstorer@iname.com
Subject: Re: Win32::EventLog
Message-Id: <881434508.15084@dejanews.com>
According to the Microsoft Knowledge base there is an outstanding bug for
the call to ReadEventLog using the SEEK method. Use the FORWARDS and the
SEQUENTIAL methods instead i.e. (EVENTLOG_FORWARDS_READ or
EVENTLOG_SEQUENTIAL_READ). Furthermore, the article goes on to say the
error only occurs when the event log in question is 2K or larger. Hope
that helps.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 1430
**************************************