develooper Front page | perl.perl5.porters | Postings from October 2017

[perl #132351] perl function getgrent not worked with libnss

Thread Previous
From:
James E Keenan via RT
Date:
October 23, 2017 20:26
Subject:
[perl #132351] perl function getgrent not worked with libnss
Message ID:
rt-4.0.24-1882-1508790400-1893.132351-15-0@perl.org
On Mon, 23 Oct 2017 10:55:44 GMT, asper@tagan.ru wrote:
> This is a bug report for perl from asper@tagan.ru,
> generated with the help of perlbug 1.40 running under perl 5.24.3.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> perl function getgrent not worked in perl higer 5.20.x
> if enabled sys-auth/libnss-pgsql library
> if the groups are taken from the file, then everything is fine, and if
> the groups are taken from the database, then the getgent function
> hangs
> 
> I prepared a simple test script to check this
> perl -e 'while ($a =getgrent) {print $a . "\n";}'
> this script hangs if it is enabled to take groups and users from the
> database, this error is absent in the version 5.20 perl and below
> 

Do you get any output at all if it is enable to take groups and users from the database?

> 
> my nsswitch config file
>  cat /etc/nsswitch.conf
> # /etc/nsswitch.conf:
> # $Header:
> /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/nsswitch.conf,v 1.1
> 2006/09/29 23:52:23 vapier Exp $
> 
> group: pgsql files
> passwd: pgsql files
> shadow: pgsql files
> 
> #passwd:      compat
> #shadow:      compat
> #group:       compat
> 
> # passwd:    db files nis
> # shadow:    db files nis
> # group:     db files nis
> 
> hosts:       files dns
> networks:    files dns
> 
> services:    db files
> protocols:   db files
> rpc:         db files
> ethers:      db files
> netmasks:    files
> netgroup:    files
> bootparams:  files
> 
> automount:   files
> aliases:     files
> 
> system utils
> getent group - work fine
> 
> 


-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=132351

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About