[19194] in Perl-Users-Digest
Perl-Users Digest, Issue: 1389 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 27 00:05:34 2001
Date: Thu, 26 Jul 2001 21:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <996206708-v10-i1389@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 26 Jul 2001 Volume: 10 Number: 1389
Today's topics:
Re: \nhelp <mbudash@sonic.net>
Re: CGI:standard (Eric Bohlman)
Re: CGI:standard <greenbd@u.washington.edu>
Re: CGI:standard <greenbd@u.washington.edu>
complex data structures in dbm files? <rlogsdon@io.com>
Re: complex data structures in dbm files? <bwalton@rochester.rr.com>
Re: complex data structures in dbm files? <andras@mortgagestats.com>
Re: dynamically resizing pictures for a web page (Martien Verbruggen)
Re: Extract the relative sorting of items from multiple <mjcarman@home.com>
Re: Extract the relative sorting of items from multiple <mjcarman@home.com>
Re: Extract the relative sorting of items from multiple (Logan Shaw)
ftp hangs <leoncini@metsun1.met.sjsu.edu>
Help with Linux Programming <ryan@bong.net>
How do I make sure I get all form fields and values? <mhunt5@nospam.net>
Re: log file to html (David Efflandt)
Perl Docs (Doug McGrath)
Re: Stripping extention from a filename in a string <ron@savage.net.au>
Re: Stripping extention from a filename in a string <qumsieh@sympatico.ca>
Re: Stripping extention from a filename in a string <godzilla@stomp.stomp.tokyo>
suidperl works on one system, not another (David Efflandt)
Re: THIS GUY NEEDS A BULLET <ahamm@sanderson.net.au>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 27 Jul 2001 02:37:34 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: \nhelp
Message-Id: <mbudash-37F2C9.19373626072001@news.sonic.net>
In article <3B60B75A.EEE0172F@courrier.usherb.ca>, jtjohnston
<jtjohnston@courrier.usherb.ca> wrote:
> > let me know if this works for you - i've been wrong plenty of times,
> > and
> > i want to know if this is one of those times!
>
> Hi,
>
> THANKS!!
>
> File 3a.txt outputted: "4294967295" Whatever that was? Did I miss
> something in
> your explanation?
>
> Here is my script;
>
[snip]
> $buffer3 = ~s/\n(&&1;)/$1/g;
> $buffer3 = ~s/\n(&&2;)/$1/g;
> $buffer3 = ~s/\n(&&3;)/$1/g;
> $buffer3 = ~s/\n(&&4;)/$1/g;
> $buffer3 = ~s/\n(&&5;)/$1/g;
[snip]
that stack has a typo, and after looking at the my post, i see it's mine
(damn): each of theoccurences of '= ~' should be '=~', yielding:
$buffer3 =~ s/\n(&&1;)/$1/g;
$buffer3 =~ s/\n(&&2;)/$1/g;
$buffer3 =~ s/\n(&&3;)/$1/g;
$buffer3 =~ s/\n(&&4;)/$1/g;
$buffer3 =~ s/\n(&&5;)/$1/g;
sorry...
--
Michael Budash ~~~~~~~~~~ mbudash@sonic.net
------------------------------
Date: 27 Jul 2001 01:11:38 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: CGI:standard
Message-Id: <9jqf4a$ikr$2@bob.news.rcn.net>
Eric Bohlman <ebohlman@omsdev.com> wrote:
> Of course, you could replace everything between the open and the close
> with:
> print SAVE "$date|",map({$query->param($_).'|'} $query->param()),"\n";
> and get rid of @items altogether.
Right after posting I realized that there's a problem with both your
original code and my revision, namely that parameters are added to the
pipe separated file in the order in which they were received from the
browser. While the current version of the HTML spec requires browsers to
submit parameters in the same order as the form fields themselves, many
commonly-used browsers were released before that provision made it into
the spec, and we all know how well browsers comply with the spec in any
case. So it's probably not a good thing to count on. You'd be better off
making an explicit list of parameter names that you're expecting and
iterating over that rather than the list result of param().
------------------------------
Date: Thu, 26 Jul 2001 19:15:54 -0700
From: "Brian D. Green" <greenbd@u.washington.edu>
Subject: Re: CGI:standard
Message-Id: <Pine.A41.4.33.0107261859150.76598-100000@dante21.u.washington.edu>
On 27 Jul 2001, Eric Bohlman wrote:
> Brian D. Green <greenbd@u.washington.edu> wrote:
>
> > $netid = $ENV{'REMOTE_USER'};
>
> > open(SAVE, ">>$netid.out") || die("Can't open $netid.out for writing:
> > $!\n");
>
> It's *not* a good idea to open a file for writing or appending when its
> name comes from outside your program and you haven't checked the name to
> make sure it's reasonable.
Thanks for the reminder. The user id's in this situation are all limited
to alphanumerics with a maximum of eight characters, so I think they're
pretty safe.
> > foreach $item (@items) {
> > chomp ($item);
>
> No need to do this.
I'd like the database to have only one line per entry and replace all the
newline characters with <br> tags. Before, I was using this slightly
modified code from a cgi101.com tutorial for character substitution:
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9] [a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/\r//g; #remove hard returns
$value =~ s/\cM//g; #delete ^M's
$value =~ s/\%0D/<br>/g; #replace carriage
#returns with line breaks
$FORM{$name} = $value;
}
But most of the surrounding code is irrelevant with the CGI:standard
module, right? What expression would I need to apply the switches to, and
in what context?
> Of course, you could replace everything between the open and the close
> with:
>
> print SAVE "$date|",map({$query->param($_).'|'} $query->param()),"\n";
>
> and get rid of @items altogether.
Thanks! That works well.
Sincerely,
Brian Green http://students.washington.edu/greenbd/
O-----------------------------------------------------------------------O
|"I am not ashamed of the gospel, because it is the power of God for the|
| salvation of everyone who believes: first for the Jew, then for the |
| Gentile." --Romans 1:16, NIV |
O-----------------------------------------------------------------------O
------------------------------
Date: Thu, 26 Jul 2001 19:23:56 -0700
From: "Brian D. Green" <greenbd@u.washington.edu>
Subject: Re: CGI:standard
Message-Id: <Pine.A41.4.33.0107261916070.76598-100000@dante21.u.washington.edu>
On 27 Jul 2001, Eric Bohlman wrote:
> Eric Bohlman <ebohlman@omsdev.com> wrote:
> > Of course, you could replace everything between the open and the close
> > with:
>
> > print SAVE "$date|",map({$query->param($_).'|'} $query->param()),"\n";
>
> > and get rid of @items altogether.
>
> Right after posting I realized that there's a problem with both your
> original code and my revision, namely that parameters are added to the
> pipe separated file in the order in which they were received from the
> browser. While the current version of the HTML spec requires browsers to
> submit parameters in the same order as the form fields themselves, many
> commonly-used browsers were released before that provision made it into
> the spec, and we all know how well browsers comply with the spec in any
> case. So it's probably not a good thing to count on. You'd be better off
> making an explicit list of parameter names that you're expecting and
> iterating over that rather than the list result of param().
Hmm.... The reason why I left the parameters open-ended is that although
the first two objects of the form are textarea fields and must be filled
out, the rest of the form consists of up to 100 checkboxes that may or
may not be checked. I don't want to generate a bunch of null values and
extra pipes to be checked over. Is there an efficient way to list the
parameter names explicitly, or would I have to make lots of for or if
loops?
Yours,
Brian Green http://students.washington.edu/greenbd/
O-----------------------------------------------------------------------O
|"I am not ashamed of the gospel, because it is the power of God for the|
| salvation of everyone who believes: first for the Jew, then for the |
| Gentile." --Romans 1:16, NIV |
O-----------------------------------------------------------------------O
------------------------------
Date: Thu, 26 Jul 2001 21:37:31 -0500
From: Reuben Logsdon <rlogsdon@io.com>
Subject: complex data structures in dbm files?
Message-Id: <Pine.LNX.4.33.0107262133370.21337-100000@fnord.io.com>
Hello,
I have a coding problem where the most obvious approach would be to create
a hash of hashes as the main data structure. Each child hash could
potentially have more data than is safe to load in memory at one time, and
the whole hash o' hashes is much too big. dbm files are a good solution
for a single hash, but the docs suggested that they won't accept complex
data structures. Has anyone experienced this and found a word around?
Perhaps by using some specific type of hash that has extra features?
Are there any other Perl-native solutions for storing large amounts of
structured data?
--
Regards,
Reuben Logsdon
http://www.io.com/~rlogsdon/
------------------------------
Date: Fri, 27 Jul 2001 02:58:39 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: complex data structures in dbm files?
Message-Id: <3B60D8AF.943CF338@rochester.rr.com>
Reuben Logsdon wrote:
...
> I have a coding problem where the most obvious approach would be to create
> a hash of hashes as the main data structure. Each child hash could
> potentially have more data than is safe to load in memory at one time, and
> the whole hash o' hashes is much too big. dbm files are a good solution
> for a single hash, but the docs suggested that they won't accept complex
> data structures. Has anyone experienced this and found a word around?
> Perhaps by using some specific type of hash that has extra features?
>
> Are there any other Perl-native solutions for storing large amounts of
> structured data?
...
> Reuben Logsdon
...
use MLDBM;
Be sure to read the docs thoroughly and carefully. Don't assume
anything, as your assumptions may be wrong when it comes to the behavior
of MLDBM.
--
Bob Walton
------------------------------
Date: Thu, 26 Jul 2001 23:35:48 -0400
From: Andras Malatinszky <andras@mortgagestats.com>
Subject: Re: complex data structures in dbm files?
Message-Id: <3B60E194.FFEF1526@mortgagestats.com>
Reuben Logsdon wrote:
> Hello,
>
> I have a coding problem where the most obvious approach would be to create
> a hash of hashes as the main data structure. Each child hash could
> potentially have more data than is safe to load in memory at one time, and
> the whole hash o' hashes is much too big. dbm files are a good solution
> for a single hash, but the docs suggested that they won't accept complex
> data structures. Has anyone experienced this and found a word around?
> Perhaps by using some specific type of hash that has extra features?
>
> Are there any other Perl-native solutions for storing large amounts of
> structured data?
>
> --
> Regards,
> Reuben Logsdon
>
> http://www.io.com/~rlogsdon/
Yes, check out the MLDBM (multi-level DBM) module. The syntax is a little
quirky, but it allows you to store pretty much any kind of Perl object in a
database. Several levels of hashes are no problem.. Chapter 14.8 of the Perl
Cookbook has a decent primer on it.
------------------------------
Date: Fri, 27 Jul 2001 02:59:40 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: dynamically resizing pictures for a web page
Message-Id: <slrn9m1m8t.1rf.mgjv@verbruggen.comdyn.com.au>
On Thu, 26 Jul 2001 17:29:58 GMT,
Bart Lateur <bart.lateur@skynet.be> wrote:
> Daniel Davidson wrote:
>
>> And with the quantity of photos
>>we will be handeling, storing both is not an option (well, that is what
>>I was told anyway).
>
> Since the smaller one can take roughly 20 to 40 times less than the big
> one (a JPEG of 100k to 200k, for good quality), so this sounds like a
> stupid argument.
>
> However, resizing on the fly will take up lots of computer power. So it
> sounds like a bad idea anyway.
Agreed. Disk space is really, really cheap compared to memory and CPU.
>>The only way
>>I can think of how to do this is to have a temporary - resized image
>>that the browser uses to load the picture.
>
> You can directly send an image to the browser without saving it first.
> Er... CGI allows it. I'm not too sure about Image::Magick.
Yes, Image::Magick does this without problem. Use "-" as the file name
in the Write() method.
Martien
--
Martien Verbruggen |
Interactive Media Division | 42.6% of statistics is made up on the
Commercial Dynamics Pty. Ltd. | spot.
NSW, Australia |
------------------------------
Date: Fri, 27 Jul 2001 01:55:51 GMT
From: Michael Carman <mjcarman@home.com>
Subject: Re: Extract the relative sorting of items from multiple lists
Message-Id: <3B60C9C4.4E395890@home.com>
Bart Lateur wrote:
>
> Michael Carman wrote:
>
> > I don't think that scales well. It's like programming in BASIC.
>
> Nothing demands that these must be integers. Floating points works
> just as well.
Oh, I'm aware of that, but using floats would only seem to postpone the
inevitable. I've no idea how many elements you'ld have to have before
that would become a problem, though. It probably doesn't matter for
"real" situations.
-mjc
------------------------------
Date: Fri, 27 Jul 2001 02:11:51 GMT
From: Michael Carman <mjcarman@home.com>
Subject: Re: Extract the relative sorting of items from multiple lists
Message-Id: <3B60CD84.BFC61E96@home.com>
Bart Lateur wrote:
>
> Ren Maddox wrote:
>
>> As to an algorithm to solve the original problem, that is more
>> tricky. My first pass is to build a graph of the elements and
>> then remove short-cuts.
>
> A graph, huh? I'm thinking of pools of currently equivalent
> items (a hash?),in an array, that get split up as more gets
> known about them. But I'm still contemplating the details.
I thought of doing the same thing (Well, I think it's the same; I've no
training in fancy algorithm vocabulary :) ) only with nested lists such
that e.g. after the first pass, you'd have something like this:
['A', 'B', 'C', [['D', 'E'], 'F']]
Meaning that D E F all come after C, and E comes after D, but we don't
know where F fits in yet. I didn't pursue it too far because it seemed
messy to deal with which elements are data and which are refs, and when
order means order and when it means paralellism. Maybe if we used [['D',
'E'], ['F']] and kept track of the nesting level...
A LoH would seem to work around part of that, but I can't see how would
you represent the DEF situation above.
-mjc
------------------------------
Date: 26 Jul 2001 21:20:31 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Extract the relative sorting of items from multiple lists
Message-Id: <9jqj5f$6dm$1@charity.cs.utexas.edu>
In article <3B60C9C4.4E395890@home.com>,
Michael Carman <mjcarman@home.com> wrote:
>Bart Lateur wrote:
>>
>> Michael Carman wrote:
>>
>> > I don't think that scales well. It's like programming in BASIC.
>>
>> Nothing demands that these must be integers. Floating points works
>> just as well.
>
>Oh, I'm aware of that, but using floats would only seem to postpone the
>inevitable. I've no idea how many elements you'ld have to have before
>that would become a problem, though. It probably doesn't matter for
>"real" situations.
It probably does, because each time you "insert" by averaging, you're
using a less significant bit than you've used before. So each
insertion uses up a bit. Your floating point numbers are probably not
more than 80 bits (the largest number ever in common use that I can
recall), so 80 inserts (if they come in the right order) can exhaust
your capacity to insert any more.
- Logan
--
"Our grandkids love that we get Roadrunner and digital cable."
(Advertisement for Time Warner cable TV and internet access, July 2001)
------------------------------
Date: Thu, 26 Jul 2001 18:48:47 -0700
From: Giovanni Leoncini <leoncini@metsun1.met.sjsu.edu>
Subject: ftp hangs
Message-Id: <Pine.GSO.3.96.1010726184350.4985E-100000@metsun1.met.sjsu.edu>
Hi all! :)
we recently updated our OS from Red Hat 7.0 to 7.1. Now the perl script
that ftps data into the machine hangs when retrieving a file or doing an
ls. Using the debugger I noticed that other commands like cd, or size work
fine and the instruction that waits for ever is
$peer = accept($new,$sock) (line 177 of Socket.pm)
Before the update everything was fine, and I've been using per 5.6.0
before and after the update.
Ftp to the same site, from the command line is still fine.
I tried to install the library again, using ecgs instead of gcc but it
didn't help. I feel in serious trouble .........
any clue?
Giovanni
*****************************************************************************
Giovanni Leoncini
Graduate Student
Meteorology Department
San Jose State University
One Washington Square, tel : 408-924-5199
San Jose, CA, 95112 email: leoncini@met.sjsu.edu
*****************************************************************************
------------------------------
Date: Fri, 27 Jul 2001 03:59:13 GMT
From: "Ryan Gralinski" <ryan@bong.net>
Subject: Help with Linux Programming
Message-Id: <lG587.57837$d26.475949@news1.wwck1.ri.home.com>
Can someone help me out with perl and linux, i'm trying to read raw data
from a USB Device that is not supported
this is the info dmesg gives me
usb.c: USB device 2 (vend/prod 0x8e6/0x432) is not claimed by any active
driver.
How could i open this port and read the raw data? it is not a device in /dev
Ryan
------------------------------
Date: Thu, 26 Jul 2001 22:53:37 -0500
From: "M Hunt" <mhunt5@nospam.net>
Subject: How do I make sure I get all form fields and values?
Message-Id: <9jqomi$l$1@slb2.atl.mindspring.net>
I'm writing out a CSV file which contains all the names and values submitted
from a form. My question is: for checkboxes and/or fields that were not
answered, I get nothing back. This considered, how do I maintain the
integrity of my fields in the CSV. What I need to do is somehow append a ",
NULL" or something when fields are not filled in. This gets difficult when
nothing is returned; with a checkbox for example.
Also, I just saw in another thread where someone was saying that I can't
even count on the form fields being returned in a particular order. How is
this typically handled -- anyone with a code sample or something?
Any tips/examples appreciated
M
------------------------------
Date: Fri, 27 Jul 2001 02:56:48 +0000 (UTC)
From: see-sig@from.invalid (David Efflandt)
Subject: Re: log file to html
Message-Id: <slrn9m1m3g.t3b.see-sig@typhoon.xnet.com>
On Thu, 26 Jul 2001, novastar <subscriber@novastar.dtdns.net> wrote:
> I have a perl program that generates a really big log file ( printed to
> screen also ) . I thought that it would me more intresting for the users
> watching the log file entries to Internet Explorer at real time . So I
> created a framed page . The bottom is the log file with a refresh period of
> one second, but this is not smooth ( blocks of text every 1 sec ) . Can you
> help me ?
You need a longer time before refreshes. Normally it would be almost
impossible to make a request and have the data returned within 1 second,
so your page is requesting more data before it even has the previous data.
That is totally unrelated to Perl.
--
David Efflandt (Reply-To is valid) http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
------------------------------
Date: 26 Jul 2001 19:20:31 -0700
From: doug.mcgrath@us.telegyr.com (Doug McGrath)
Subject: Perl Docs
Message-Id: <a4e10296.0107261820.1ff8a5c8@posting.google.com>
Hi,
I'm a reasonably good tech writer and a reasonably decent programmer.
I've recently spent about 8 hours tracking down a weird problem that
would've never happened if a simple note existed in the Perl docs that
cross-referenced two functions. (For some, the technique is probably
old hat, but it happened to be something I had never used before.)
I also see occasional grammatical problems, broken links in the HTML
version of the POD (which is what I use exclusively), and just plain
bad writing.
I'm a decent programmer, but not a great one, so I probably can't
contribute much in the way of new or unusual modules, but I would be
delighted to contribute to the documentation.
How do I go about submitting changes for inclusion in future releases
of Perl?
Thanks,
Doug McGrath
------------------------------
Date: Fri, 27 Jul 2001 11:14:25 +1000
From: "Ron Savage" <ron@savage.net.au>
Subject: Re: Stripping extention from a filename in a string
Message-Id: <Zi387.65$Vk2.4479@ozemail.com.au>
Jason
See below.
--
Cheers
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html
Jason LaPenta <lapenta_jm@yahoo.com> wrote in message news:3B60B687.B08F6531@yahoo.com...
> Hi,
>
> I have a string var $filename = "filename.ext" and I want it to be
> turned into $filename = "filename" by removing the ".ext" How can I do
> this? I've been reading about pattern matching for an hour and can't
> find even the slightest reference the such and operation.
Tested code (under WinNT):
-----><8-----
#!/usr/bin/perl
use integer;
use strict;
use warnings;
use File::Basename;
# ----------------------------------------------------------------------------
my($file_name) = "c:\\filename.ext";
if ($file_name =~ /\\/)
{
fileparse_set_fstype("MSDOS");
}
elsif ($file_name =~ /:/)
{
fileparse_set_fstype("MacOS");
}
my($file_base, $file_path, $file_suffix) = fileparse($file_name, 'ext');
print "file_name: <$file_name>. \n";
print "file_base: <$file_base>. file_path: <$file_path>. file_suffix: <$file_suffix>. \n";
-----><8-----
> BTW: I'm finding it very difficult to find out how to do the simplest
> things in perl. I go though the tutorials.. which seem to be written for
> people who already know the language. And I have the book Programming
> Perl by O'reilly, but it seems that I have to read like 2days each time
> I want to find out how to do the simplest thing... then I just wind up
> going to the newsgroups and asking. Is there some resource I'm missing?
We all have to go thru a long apprenticeship for any new endeavour...
Perl is a complex beast.
------------------------------
Date: Thu, 26 Jul 2001 22:44:17 -0400
From: "Ala Qumsieh" <qumsieh@sympatico.ca>
Subject: Re: Stripping extention from a filename in a string
Message-Id: <ny487.27069$PA1.3062613@news20.bellglobal.com>
"Jason LaPenta" <lapenta_jm@yahoo.com> wrote in message
news:3B60B687.B08F6531@yahoo.com...
> Hi,
>
> I have a string var $filename = "filename.ext" and I want it to be
> turned into $filename = "filename" by removing the ".ext" How can I do
> this? I've been reading about pattern matching for an hour and can't
> find even the slightest reference the such and operation.
Perl comes with a plethora of documentation. Admittedly, it is a bit
overwhelming to wade through at first, but once you get used to it, it
becomes invaluable.
For you specific task, you should read the perlre man page. Type 'perldoc
perlre' on the command line and read on.
Anyway, this code does what you want:
$filename =~ s/\.[^.]+$//;
> BTW: I'm finding it very difficult to find out how to do the simplest
> things in perl. I go though the tutorials.. which seem to be written for
> people who already know the language. And I have the book Programming
> Perl by O'reilly, but it seems that I have to read like 2days each time
> I want to find out how to do the simplest thing... then I just wind up
> going to the newsgroups and asking. Is there some resource I'm missing?
Perldoc is your friend. Type 'perldoc perldoc' on a command line to get
familiar with it. Then, type 'perldoc perltoc' to get to a summary of the
all the documentation that comes with Perl.
I also suggest you buy the books "Learning Perl" by Schwartz et al., and
"Perl Cookbook" by Christiansen and Torkington. They are invaluable.
HTH,
--Ala
------------------------------
Date: Thu, 26 Jul 2001 20:02:21 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Stripping extention from a filename in a string
Message-Id: <3B60D9BD.4140F4F@stomp.stomp.tokyo>
Jason LaPenta wrote:
> I have a string var $filename = "filename.ext" and I want it to be
> turned into $filename = "filename" by removing the ".ext"
substr ($filename, rindex ($filename, "."), 4, "");
> I want to find out how to do the simplest thing...
http://wdvl.com/Authoring/Languages/Perl/PerlfortheWeb/toc.html
http://hotwired.lycos.com/webmonkey/programming/perl_cgi/index.html
http://www.bignosebird.com/
Godzilla!
--
TEST SCRIPT:
___________
#!perl
print "Content-type: text/plain\n\n";
@Array = qw (file.txt file.pl file.h file.);
for (@Array)
{
substr ($_, rindex ($_, "."), 4, "");
print "$_\n";
}
exit;
PRINTED RESULTS:
________________
file
file
file
file
------------------------------
Date: Fri, 27 Jul 2001 03:25:48 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: suidperl works on one system, not another
Message-Id: <slrn9m1npr.t3b.see-sig@typhoon.xnet.com>
The following simple script (4755 permission) works on Linux Mandrake 7.0
with Perl 5.005_03. However, on Linux SuSE 7.1 with Perl v5.6.0 it fails
with simply "Can't do setuid" and no further explaination, if I am anyone
other that root when I run it:
#!/usr/bin/suidperl -Tw
# suidtest
print "real id: $<, effective id: $>\n";
efflandt@compaq:~ > su -
Password:
compaq:~ # ls -l /home/efflandt/suidtest
-rwsr-xr-x 1 efflandt users 76 Jul 26 22:12 /home/efflandt/suidtest
compaq:~ # /home/efflandt/suidtest
real id: 0, effective id: 500
compaq:~ # su - deffland
deffland@compaq:~ > ls -l /home/efflandt/suidtest
-rwsr-xr-x 1 efflandt users 76 Jul 26 22:12 /home/efflandt/suidtest
deffland@compaq:~ > /home/efflandt/suidtest
Can't do setuid
deffland@compaq:~ > ls -l /usr/bin/suidperl
-rwxr-xr-x 2 root root 765243 Jan 18 2001 /usr/bin/suidperl
deffland@compaq:~ > suidperl -v
This is perl, v5.6.0 built for i586-linux
Copyright 1987-2000, Larry Wall
(etc.)
Any clue why suidperl will NOT work for users on this system?
--
David Efflandt http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
------------------------------
Date: Fri, 27 Jul 2001 11:55:34 +1000
From: "Andrew Hamm" <ahamm@sanderson.net.au>
Subject: Re: THIS GUY NEEDS A BULLET
Message-Id: <3b60ca77@news.iprimus.com.au>
Brad G wrote in message ...
>I know this post was off topic and has no place in our Perl forum, but
since
>it's here and people will undoubtedly read it (and I can't stand those who
>insult our intelligence), I'd like to point out that Hal Turner is a true
>American, and the bonehead who posted this message is not.
>
BEWARE, Brad! You have just fallen into a troll trap. This message comes
around every few months and it is designed to trigger enormous arguments on
the newsgroups. Whatever you do, DON'T ANSWER the original message, and now
that you've read Brads message, DON'T ANSWER OR ARGUE EITHER!!!
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.
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 V10 Issue 1389
***************************************