Re: php5 reads /etc/group on start

From: Date: Wed, 08 Mar 2006 21:05:52 +0000
Subject: Re: php5 reads /etc/group on start
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
kjc wrote:
What is it that php5.1.2 reads /etc/group on startup to setgroup? My Solaris 10 boxes use LDAP as a NIS replacement so that we don't have to manage individual group files on all the servers. When I start Apache without php I see this the dtrace dtruss script: log.dtruss-httpdcmd-nophp: 26471/1: read(0xE, "0\202\001\b\002\001\002d\202\001\001\004\034cn=cau,ou=group,ou=dev ... <snip> log.dtruss-httpdcmd-nophp:26483/1: setgroups(0xA, 0x1001F20A0,
0x400)           = 0 0
times ten, for the ten (A) groups that the webuser is a member of, thus the setgroups(0xA,. BUT... When I LoadModule libphp5 I get this instead: log.dtruss-httpdcmd: 25142/1: open("/etc/group\0", 0x2000,
0x1B6)                = 15 0
log.dtruss-httpdcmd: 25142/1: setgroups(0x2, 0x1002CCFB0,
0x400)                 = 0 0
Which is a grand total of 3 (2), one from /etc/group and the other is what is actually associated with the LDAP user webuser but listed twice. So-- why does PHP manually go and read /etc/group-- and why? And how can I disable or fix that?
Obviously PHP doesn't read that file directly. Figure out which libc call leads to that call and we might be able to help. -Rasmus

Thread (4 messages)

« previous php.internals (#22254) next »