php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27969 bug while reading libnss-ldap.conf
Submitted: 2004-04-12 23:00 UTC Modified: 2004-04-13 12:48 UTC
From: brunobenchimol at terra dot com dot br Assigned:
Status: Closed Package: LDAP related
PHP Version: 4.3.5 OS: Linux - Debian 3.0r2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: brunobenchimol at terra dot com dot br
New email:
PHP Version: OS:

 

 [2004-04-12 23:00 UTC] brunobenchimol at terra dot com dot br
Description:
------------
# strace -f ./httpd -X 

<snip> 
.... 
brk(0x810a000) = 0x810a000 
open("/etc/libnss-ldap.conf", O_RDONLY) = 3 
fstat64(3, {st_mode=S_IFREG|0644, st_size=63, ...}) = 0 
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000 
read(3, "host 192.168.1.2\nbase dc=tcm,dc="..., 4096) = 63 
read(3, "", 4096) = 0 
close(3) = 0 
munmap(0x40015000, 4096) = 0 
brk(0x810c000) = 0x810c000 
brk(0x810d000) = 0x810d000 
old_mmap(NULL, 143360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x409dc000 
brk(0x810f000) = 0x810f000 
--- SIGSEGV (Segmentation fault) --- 
+++ killed by SIGSEGV +++ 
web:/usr/local/apache/bin# 


When i try to run php4 (as a module from apache) i also compiled php4 with oracle 8 support (oracle and oci8), it crashes every time it reads my libnss-ldap.conf which has my host, my base and my ldap version (in this case its v3) only those 3 lines, which is needed for others programs to access my ldap base.
When i remove the file libnss-ldap.conf , php4 load normally without segmentat faulting, anyway when i dont load the php4 module , apache works fine, so it isnt a bug in apache, but in the php4, i also tried php 4.3.4 and 4.1.2 but still gave me the same.

for now i have disabled php4 and im running with apache (1.3.29) and coldfusion mx 6.1 without any problems.

a small fix imho would make php not read this file, but well i dont know WHY it reads it and which impacts would if he doesnt read. 

i hope i can get some help about this stuff, either if i can get a patch (or tell me which part in code) it does this call open().

any help is appreciated.

thanks in advance.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-12 23:26 UTC] sniper@php.net
It's not a PHP bug but something you did wrong..oracle has kindly added their own ldap functions which conflict with anything else. Please search the bug db for the solution or ask on the mailing lists.

 [2004-04-13 12:48 UTC] brunobenchimol at terra dot com dot br
i compiled it without the oracle entries, and it works fine now.

i used this configure line (without --with-oracle --with-oci8)

# ./configure --prefix=/usr/local/php4 --with-apxs=/usr/local/apache/bin/apxs --enable-fastcgi --enable-safe-mode --enable-magic-quotes


# here follows the strace
web:/usr/local/apache/bin# strace -f ./httpd -X -f /usr/local/apache/conf/httpd.conf.php4

<<snip>>
setgroups32(0x1, 0x80d1b88)             = 0
geteuid32()                             = 0
setuid32(0x21)                          = 0
brk(0x8107000)                          = 0x8107000
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigaction(SIGURG, {0x805ead4, [], SA_INTERRUPT|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGALRM, {0x805ed64, [], SA_INTERRUPT|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR1, {0x8060134, [], SA_INTERRUPT|0x4000000}, {0x80601b4, [HUP USR1], 0x4000000}, 8) = 0
alarm(0)                                = 0
accept(16,

Good now it working.

Thanks i will close the bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 15 09:01:26 2024 UTC