Bug 102665
Summary: | perl loops in shellwords.pl with input read from stdin | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Daniel Jarboe <backwardthinker> | ||||
Component: | perl | Assignee: | Jason Vas Dias <jvdias> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 3.0 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | perl-5.8.0-90.2 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-11-11 23:47:40 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 101028 | ||||||
Attachments: |
|
Description
Daniel Jarboe
2003-08-19 17:32:19 UTC
Created attachment 93754 [details]
strace for wbinfo_group.pl ... killed after a few seconds of looping
I get the same issue, is there any update on this one. Thanks Hallo all, with the new winbind Version 3.0.2a there ar another problem: winbind returns togehter with the groupSID the Domain Group number. So i changed two things in the script to become it working. Because i am not verry family with perl the systaxes are not pretty good but the script works for my solution. Hope that helps you to. Btw: In my opinion there is a problem with perl to read special characters from STDIN !? Regards Holger Schmieder #!/usr/bin/perl -w # external_acl helper to Squid to verify NT Domain group # membership using wbinfo # This program is put in the public domain by Jerry Murdock # <jmurdock>. It is distributed in the hope that it will # be useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Author: # Jerry Murdock <jmurdock> # # changed by Holger Schmieder <schmieder> 04/2004 # # Version history: # 2002-07-05 Jerry Murdock <jmurdock> # Initial release # # external_acl uses shell style lines in it's protocol require 'shellwords.pl'; # Disable output buffering $|=1; sub debug { # Uncomment this to enable debugging #print STDERR "@_\n"; } # # Check if a user belongs to a group # sub check { local($user, $group) = @_; $groupSID = `wbinfo -n "$group"` . " "; #because the new wbinfo -n returns also the group number #we do the following $groupSID = substr($groupSID,0,index($groupSID," ",0)); $groupGID = `wbinfo -Y $groupSID`; chop $groupGID; &debug( "User: -$user-\nGroup: -$group-\nSID: -$groupSID- \nGID: -$groupGID-"); return 'OK' if(`wbinfo -r \Q$user\E` =~ /^$groupGID$/m); return 'ERR'; } # # Main loop # while (<STDIN>) { chop; &debug ("Got $_ from squid"); #H1 was added by holger @H1=split(/\s+/, $_); #printf ("User:%s\n",$H1[0]); #printf ("Group:%s\n",$H1[1]); $user = $H1[0]; $group = $H1[1]; # ($user, $group) = &shellwords; $ans = &check($user, $group); &debug ("Sending $ans to squid"); print "$ans\n"; } I have a similar problem with shellwords.pl on a Redhat ES3 server. The while() loop in shellwords.pl loops infinitely when a single line is passed in. This is with the Nagiostat package for Nagios. This same package worked great on an AIX box... but upon migrating to this Redhat ES3 server, because entirely unusable. Very sorry for the long delay in processing this bug report. This is not a problem with the current release of perl in RHEL-3. |