On Wed, Sep 07, 2005 at 01:09:22PM +0100, Scott James Remnant wrote:
> On Tue, 2005-09-06 at 17:46 -0700, Aaron T Porter wrote:
> 
> > Further digging shows an error reading /etc/libnss-ldap.conf,
> > opening up permissions to this file produces the expected output from
> > dpkg-architecture. This file does however contain an ldap bind password
> > that would be best kept private.
> > 
> What is reading this file?  dpkg-architecture doesn't itself.

        Seems to be perl's getwnam on line 56 of
/usr/lib/dpkg/controllib.pl. This makes no sense to me, as that seems to
return valid data. However simply replacing the line with a hand generated
array makes things work:

if (defined ($ENV{'LOGNAME'})) {
#    @fowner = getpwnam ($ENV{'LOGNAME'});
     @fowner = { "atporter","foo","21002","124"};
    if (! @fowner) { die (sprintf ('unable to get login information for 
username "%s"', $ENV{'LOGNAME'})); }
}

The following produces the same output both as a non root user (where I
still see the error on libnss-ldap.conf) and as root:

@fowner = getpwnam ("atporter");
@fowner = @fowner[2,3];

for (@fowner) {
print "$_\n";
}


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to