Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 53559
Status: open
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: zuismanm [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Net::Domain cause failure of "sysytem" calls, while running as non root user
Hi Dear all! Platform - RH 5.2(i386) Perl version - 5.8.7 and 5.8.4 ( I have tried 2 distributions... One (5.8.7 installed on machine with RH OS installation, and second - 5.8.4 I have installed in user's local directory) Module - Net::Domain In few words - "use" of Net::Domain module cause "system" function call to fail (with any command) Let us say code: use strict; use Net::Domain; my $rc=system("/bin/ls"); print rc, "\n"; prints - 13 Of cause - if I run from command line /bin/ls - it works... More interesting! If I run same script as root user - it works properly! But, only if I run it as root... If I run it as any other user - it prints "13" If I comment out use Net::Domain; - everything works with any user ... I am totally lost! Do any one have an idea - what can be a reason for such strange mess???
Subject: Re: [rt.cpan.org #53559] Net::Domain cause failure of "sysytem" calls, while running as non root user
Date: Sun, 10 Jan 2010 13:24:54 -0600
To: bug-libnet [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
On Jan 10, 2010, at 3:42 AM, simonovsky via RT wrote: Show quoted text
> > use strict; > use Net::Domain; > my $rc=system("/bin/ls"); > print rc, "\n"; > > prints - 13 Of cause - if I run from command line /bin/ls - it works... > More interesting! If I run same script as root user - it works properly! > But, only if I run it as root... If I run it as any other user - it > prints "13" If I comment out use Net::Domain; - everything works with > any user ... I am totally lost! Do any one have an idea - what can be a > reason for such strange mess???
I am lost too. there is nothing in Net::Domain which would change the result of a system call
On Sun Jan 10 04:42:21 2010, zuismanm wrote: Show quoted text
> Hi Dear all! > Platform - RH 5.2(i386) Perl version - 5.8.7 and 5.8.4 ( I have tried 2 > distributions... One (5.8.7 installed on machine with RH OS > installation, and second - 5.8.4 I have installed in user's local > directory) > Module - Net::Domain > In few words - "use" of Net::Domain module cause "system" function call > to fail (with any command) Let us say code: > > use strict; > use Net::Domain; > my $rc=system("/bin/ls"); > print rc, "\n"; > > prints - 13 Of cause - if I run from command line /bin/ls - it works... > More interesting! If I run same script as root user - it works properly! > But, only if I run it as root... If I run it as any other user - it > prints "13" If I comment out use Net::Domain; - everything works with > any user ... I am totally lost! Do any one have an idea - what can be a > reason for such strange mess???
This only happens when all 3 following conditions occur: 1) Running as non-root user 2) On RedHat 5.2 (either x86 or x86_64, disregarding of perl version) 3) "ldap" appears for "shadow" in /etc/nsswitch.conf (even when user account is fully local) I also see, that it tries to find open connection to LDAP server, then performs a series of dup system calls and then tries to write to non-connected socket. I attach strace -f output. strace -f perl ./test_net_domain.pl > strace-f_perl_test_net_domain.pl.txt 2>&1
Subject: strace-f_perl_test_net_domain.pl.txt

Message body is not shown because it is too large.

Subject: test_net_domain.pl
use Net::Domain; print "kuku\n"; my $rc=system("date"); print "rc=$rc", "\n";