I've succesfully compiled/tested libnss_mysql on a redhat linux 8 without any problems (It took me less than 5 mins to run it)
Problems start with solaris/sparc (ver 8 & 9). Imanaged to compile it for 32/64 bit by using gcc 3.2.
I wonder why do I get core dumps everytime I'm trying to use the library (eg. #id cineri)?
Below I'm attaching a debug file! (sorry for the BIG message... - I will not attach trace.out for now....)
Thanks a lot.
angel.
-----------------------------------------------------------------------
bash-2.05# more /tmp/libnss_mysql-debug.log
[14328]: _nss_mysql_passwd_constr: ENTER
[14328]: _nss_mysql_malloc: ENTER
[14328]: _nss_mysql_malloc: malloc (8)
[14328]: _nss_mysql_malloc: EXIT (25a48)
[14328]: _nss_mysql_passwd_constr: EXIT (25a48)
[14328]: _nss_mysql_getpwnam_r: ENTER
[14328]: _nss_mysql_lookup: ENTER
[14328]: _nss_mysql_init: ENTER
[14328]: _nss_mysql_load_config: ENTER
[14328]: _nss_mysql_load_config_file: ENTER
[14328]: _nss_mysql_load_config_file: Loading: /etc/nss_mysql.cfg
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (0)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: retry -> 5
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (3)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getpwnam -> SELECT username,'x',uid,gid,gecos,homedir,shell FROM users WHERE username='%s
' LIMIT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 87)
[14328]: _nss_mysql_realloc: EXIT (27b28)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getpwuid -> SELECT username,'x',uid,gid,gecos,homedir,shell FROM users WHERE uid='%u' LIM
IT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 82)
[14328]: _nss_mysql_realloc: EXIT (27b88)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getspnam -> SELECT username,password,lstchg,min,max,warn,inact,expire,flag FROM users WHE
RE username='%s' LIMIT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 102)
[14328]: _nss_mysql_realloc: EXIT (27be8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getpwent -> SELECT username,'x',uid,gid,gecos,homedir,shell FROM users
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 59)
[14328]: _nss_mysql_realloc: EXIT (27c58)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getspent -> SELECT username,password,lstchg,min,max,warn,inact,expire,flag FROM users
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 74)
[14328]: _nss_mysql_realloc: EXIT (27ca0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getgrnam -> SELECT name,password,gid FROM groups WHERE name='%s' LIMIT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 61)
[14328]: _nss_mysql_realloc: EXIT (27cf8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getgrgid -> SELECT name,password,gid FROM groups WHERE gid='%u' LIMIT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 60)
[14328]: _nss_mysql_realloc: EXIT (27d40)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getgrent -> SELECT name,password,gid FROM groups
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 37)
[14328]: _nss_mysql_realloc: EXIT (27d88)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: memsbygid -> SELECT username FROM grouplist WHERE gid='%u'
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 46)
[14328]: _nss_mysql_realloc: EXIT (27db8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: gidsbymem -> SELECT gid FROM grouplist where username='%s'
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 46)
[14328]: _nss_mysql_realloc: EXIT (27df0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (1)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: database -> auth
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 5)
[14328]: _nss_mysql_realloc: EXIT (25a58)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: username -> nss-user
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 9)
[14328]: _nss_mysql_realloc: EXIT (22b78)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: password -> userpass
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 9)
[14328]: _nss_mysql_realloc: EXIT (22b90)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: socket -> /tmp/mysql.sock
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 16)
[14328]: _nss_mysql_realloc: EXIT (22ba8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (2)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: host -> 99.99.99.99
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 12)
[14328]: _nss_mysql_realloc: EXIT (22bc0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: database -> auth
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 5)
[14328]: _nss_mysql_realloc: EXIT (25a68)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: username -> nss-user
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 9)
[14328]: _nss_mysql_realloc: EXIT (22bd8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: password -> userpass
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 9)
[14328]: _nss_mysql_realloc: EXIT (22bf0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: port -> 3306
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_get_section: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_config_file: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_config_file: ENTER
[14328]: _nss_mysql_load_config_file: Loading: /etc/nss_mysql_root.cfg
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (1)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: username -> nss-root
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (22b78, 9)
[14328]: _nss_mysql_realloc: EXIT (22b78)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: password -> rootpass
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (22b90, 9)
[14328]: _nss_mysql_realloc: EXIT (22b90)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (2)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: username -> nss-root
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (22bd8, 9)
[14328]: _nss_mysql_realloc: EXIT (22bd8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: password -> rootpass
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (22bf0, 9)
[14328]: _nss_mysql_realloc: EXIT (22bf0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_get_section: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_config_file: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_validate_servers: ENTER
[14328]: _nss_mysql_validate_servers: EXIT (TRUE)
[14328]: _nss_mysql_load_config: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_init: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_config: ENTER
[14328]: _nss_mysql_load_config: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_build_query: ENTER
[14328]: _nss_mysql_malloc: ENTER
[14328]: _nss_mysql_malloc: malloc (151)
[14328]: _nss_mysql_malloc: EXIT (25b18)
[14328]: _nss_mysql_malloc: ENTER
[14328]: _nss_mysql_malloc: malloc (15)
[14328]: _nss_mysql_malloc: EXIT (22c08)
[14328]: _nss_mysql_escape_string: ENTER
[14328]: _nss_mysql_connect_sql: ENTER
[14328]: _nss_mysql_check_existing_connection: ENTER
[14328]: _nss_mysql_check_existing_connection: EXIT (FALSE)
[14328]: _nss_mysql_pick_server: ENTER
[14328]: _nss_mysql_pick_server: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_try_server: ENTER
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you post the last 10-20 lines of the trace so I can see what leads to the segfault? Also, can you tell me what version of MySQL (and how it was obtained - binary, self compiled, SFW ..) as well as where you got GCC from. It'll make it easier for me to try and reproduce. Is there anything you changed about the default installation (other than username/password of course)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
... unless you want to give me shell access to the box .. that would make debugging the problem a lot easier and faster. I'd need root/sudo privs tho.. Up to you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well I've got gcc from solaris.freeware site as a package. Solaris version is 9. The system is a netra t1 1G ram 1x18G HD. Sorry but no root access is possible...
To compile libnss_mysql-0.7a I used :
./configure ; make;make install (both 32/64 bit)
I'm using a self compiled version of mysql-3.23.49
mysql configuration follows:
********************************************************
CC=gcc CFLAGS="-O3 -fomit-frame-pointer -DHAVE_CURSES_H" \
CXX=g++ \
CXXFLAGS="-O3 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtt
i -DHAVE_CURSES_H" \
./configure --with-mysql-user=mysql \
--enable-assembler --prefix=/usr/local/mysql --with-server-suffi
x=-max \
--with-innodb --enable-shared --enable-static
********************************************************
trace.out follows:
********************************************************
_ n s s _ m y s q l _ p i c k _ s e r v e r : E X I T ( N S
S _ S U C C E S S )
write(2, "\n", 1) = 1
<- libc:fprintf() = 52
-> libc:vsnprintf(0xffbfef30, 0x3e8, 0xff06ead0, 0xffbff370)
-> libc_psr:memcpy(0xffbfef30, 0xff06eb98, 0x15, 0x3e7)
<- libc_psr:memcpy() = 0xffbfef30
-> libc_psr:memcpy(0xffbfef45, 0xff06ead2, 0x7, 0x3d2)
<- libc_psr:memcpy() = 0xffbfef45
<- libc:vsnprintf() = 28
-> libc:getenv(0xff06e638, 0xa0, 0xff06ead0, 0xffbff370)
<- libc:getenv() = 0xffbfff0d
-> libc:atoi(0xffbfff0d, 0xffbfff0d, 0xff06ead0, 0xffbff370)
<- libc:atoi() = 1
-> libc:getpid(0x2f4, 0x21f00, 0xff06ead0, 0xffbff370)
getpid() = 14348 [14347]
<- libc:getpid() = 14348
-> libc:fprintf(0x21f20, 0xff06e658, 0x380c, 0xffbfef30)
write(2, " [", 1) = 1
write(2, " 1 4 3 4 8", 5) = 5
write(2, " ] : ", 3) = 3
write(2, 0xFFBFEF30, 28) = 28
_ n s s _ m y s q l _ t r y _ s e r v e r : E N T E R
write(2, "\n", 1) = 1
<- libc:fprintf() = 38
-> libc:vsnprintf(0xffbfef30, 0x3e8, 0xff06ebb0, 0xffbff370)
-> libc_psr:memcpy(0xffbfef30, 0xff06eb98, 0x15, 0x3e7)
<- libc_psr:memcpy() = 0xffbfef30
-> libc_psr:memcpy(0xffbfef45, 0xff06ebb2, 0x10, 0x3d2)
<- libc_psr:memcpy() = 0xffbfef45
-> libc_psr:memcpy(0xffbfef55, 0x22bd8, 0x8, 0x3c2)
<- libc_psr:memcpy() = 0xffbfef55
-> libc_psr:memcpy(0xffbfef5d, 0xff06ebc4, 0x1, 0x3ba)
<- libc_psr:memcpy() = 0xffbfef5d
-> libc_psr:memcpy(0xffbfef5e, 0x22bf0, 0x8, 0x3b9)
<- libc_psr:memcpy() = 0xffbfef5e
-> libc_psr:memcpy(0xffbfef66, 0xff06ebc7, 0x1, 0x3b1)
<- libc_psr:memcpy() = 0xffbfef66
-> libc_psr:memcpy(0xffbfef67, 0x22bc0, 0xb, 0x3b0)
<- libc_psr:memcpy() = 0xffbfef67
-> libc_psr:memcpy(0xffbfef72, 0xff06ebca, 0x2, 0x3a5)
<- libc_psr:memcpy() = 0xffbfef72
-> libc_psr:memcpy(0xffbfef74, 0xffbfe9c7, 0x4, 0x3a3)
<- libc_psr:memcpy() = 0xffbfef74
-> libc_psr:memcpy(0xffbfef78, 0xff06ebce, 0x1, 0x39f)
<- libc_psr:memcpy() = 0xffbfef78
Incurred fault #6, FLTBOUNDS %pc = 0xFF2B2E90
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
********************************************************
Thanks alot a gain for the support.
angel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That particular segault looks like it's happening inside the debug routine. Does this occur with libnss-mysql compiled without debug support? If that doesn't do it, can you comment out the "D" call just after the "DENTER" call in _nss_mysql_try_server () recompile/reinstall and try that out? Meanwhile I'll load up solaris 9 and see if I can reproduce this.
BTW, Solaris 9 support is limited - Sun's PAM modules have become overly restrictive to the point that any PAM application will fail. non-PAM stuff should work fine. The only solution is for someone (I eventually will) to write a replacement for Sun's libraries.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've tried this on my solaris 9 sparc box with the same mysql version (and compile options) you have and can't reproduce it. However, I have GCC 3.1 .. as the GCC 3.2 and 3.2.1 show as corrupt for me. Perhaps that's the problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
... or not. The mirror I use has corrupted files. I d/led gcc 3.2 from the main site (a whopping 3.2K/s!) and it's not corrupt. I'm trying again with gcc 3.2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That "D" call is inappropriately expecting a non-null value for the "socket" configuration parameter. If you put a "socket" line for each server ([primary] and [secondary]) in your config file, and put the D call back in, that will probably work. I'm working on fixing the code now.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually it expects a non-null value for any parameter. Fill out all the options, even if they're unused, so that they're not null. Or just leave that D commented out for now I suppose :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On solaris 8 i'm still facing some problems. It looks like group functions work fine. (ls -l , chgrp etc)
"finger cinergi" works but id dosn't.
I can "chown cinergi" and "ls -ln" gives
"-rw-r--r-- 1 5000 5000 23 Jan 20 12:49 stamp-h1"
witch is ok, but when i do an "ls -l" it gives me a nice "Segmentation Fault (core dumped)" on nss_mysql_malloc function.
So, until now I've managed to make it work on solaris9 and partly on solaris8. I'm not sure whether it is an solaris_nss incompatibility or a bug somewhere.
I'm willing to do any tests for you to solve this matter.
angel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you try to actually use this on Solaris 9, you'll find that you can't authenticate even /etc/passwd users. It will complain about acceptable configurations in /etc/nsswitch.conf. If you leave it configured, you'll lock yourself out of the machine.
I'll have to try out solaris 8 now. I'm really surprised you're having these problems :-\ All my testing has included logging in through ssh, chown'ing files, etc - all without a hitch.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FWIW I just tested this on my solaris 8 gcc 3.2 and same mysql you have and it's working. Maybe there's some configuration setting that's freaking the library out?
Have you changed anything about the default install? The 'cinergi' user, or the config files, etc?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
getent works fine for both group & passwd database on solaris8
It seems there is a problem when nss_mysql replaces certain functions from the OS.
I'll write a test perl script to test the following functions :
getpwuid
getpwnam
getspnam
getpwent
getspent
getgrnam
getgrgid
getgrent
gidsbymem
memsbygid
then I'll come back with some answers. I think there's something wrong with "shadow" routines on my system, and I'll find it!!
As for Solaris9 of cource you're right...
SunOS 5.9
login: cinergi
Supported configurations for passwd management are as follows:
passwd: files
passwd: files ldap
passwd: files nis
passwd: files nisplus
passwd: compat
passwd: compat AND
passwd_compat: ldap OR
passwd_compat: nisplus
Please check your /etc/nsswitch.conf file
Password:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
getent works but id/finger doesn't? That's quite odd. Test the shadow by using getent (as root) like:
getent shadow cinegi
and see what pops up.
nss_mysql doesn't replace any functions. It's called as a backend. All of the "get*" functions pass the calls on to a backend based upon /etc/nsswitch.conf. There's an nss_files library for /etc/passwd, for instance. The O/S dynamically loads nss_mysql because of the configuration in /etc/nsswitch.conf, and then calls the routines defined in the library .. for what that's worth. :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"replace" was a shortcut for your explanation of nss ;)
On solaris you cannot use the "shadow" database with getent.
Until now I'm sure for the following by testing system functions from within perl:
getpwent,getgrent,getgrnam,getgrgid,getpwnam work fine.
I'm having core dumps with getpwuid function for some reason.
That explains why some programs (finger) work while others doesn't (id).
I'm writing some c code to use shadow system functions and see what exactly works and what doesn't.
For some readon I'm sure I'm having problems ONLY with getpwid function witch is rather strange. I'll compile your lib on another solaris 8 system and maybe on a x86 system to see what's goin'on.... and I'll post the results.
I'll send you my test (silly??) code if you like....
angel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
only getpwuid. Yes, yes that's strange. :-) Do you have the tail-end of a debug log for a failing getpwuid call?
The only thing I can think of is a hosed config line for getpwuid .. IE a %s instead of a %u or something.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well hi again.
I've wrote some test routines and the results were as i expected.
Function getpwuid gives me core dump. As a matter of fact it gives me more or less the same trace.out as "id" command.
Below I'm attaching the tail ot trace.out from my code.
---------------------------------------------------------------------
[ 4 0 9 4 ] : _ n s s _ m y s q l _ m a l l o c : m a l l o
c ( 1 4 6 )\n
close(3) = 0
<- libc:fclose() = 0
-> libc:malloc(0x92, 0x0, 0x92, 0x0)
<- libc:malloc() = 0x24950
-> libc:vsnprintf(0xffbef0a0, 0x3e8, 0xff14ebb8, 0xffbef4e0)
-> libc_psr:memcpy(0xffbef0a0, 0xff14eb70, 0x11, 0x3e7)
<- libc_psr:memcpy() = 0xffbef0a0
-> libc_psr:memcpy(0xffbef0b1, 0xff14ebba, 0x8, 0x3d6)
<- libc_psr:memcpy() = 0xffbef0b1
-> libc_psr:memcpy(0xffbef0b9, 0xffbeeb26, 0x5, 0x3ce)
<- libc_psr:memcpy() = 0xffbef0b9
-> libc_psr:memcpy(0xffbef0be, 0xff14ebc4, 0x1, 0x3c9)
<- libc_psr:memcpy() = 0xffbef0be
<- libc:vsnprintf() = 31
-> libc:getenv(0xff14e7d8, 0xa0, 0xff14ebb8, 0xffbef4e0)
<- libc:getenv() = 0
-> libc:fopen(0xff14e808, 0xff14e828, 0xa8, 0xffbefd78)
-> libc_psr:memset(0xff33c0d0, 0x0, 0x18, 0xff338018)
<- libc_psr:memset() = 0xff33c0d0
open("/tmp/libnss_mysql-debug.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
llseek(3, 0, SEEK_END) = 0x014891D5
<- libc:fopen() = 0xff33c304
-> libc:getpid(0xff33c304, 0xff14e828, 0xff14e808, 0xffbefd78)
getpid() = 4094 [4093]
<- libc:getpid() = 4094
-> libc:fprintf(0xff33c304, 0xff14e7f8, 0xffe, 0xffbef0a0)
fstat64(3, 0xFFBEE320) = 0
d=0x00000002 i=2888796 m=0100644 l=1 u=0 g=0 sz=21533141
at = Jan 21 10:40:37 EET 2003 [ 1043138437 ]
mt = Jan 21 23:02:19 EET 2003 [ 1043182939 ]
ct = Jan 21 23:02:19 EET 2003 [ 1043182939 ]
bsz=8192 blks=42064 fs=tmpfs
ioctl(3, TCGETA, 0xFFBEE2AC) Err#25 ENOTTY
-> libc_psr:memcpy(0x26c6c, 0xffbef0a0, 0x1f, 0xffbeefc0)
<- libc_psr:memcpy() = 0x26c6c
<- libc:fprintf() = 40
-> libc:fclose(0xff33c304, 0x28, 0xff33fa9c, 0x0)
write(3, 0x00026C64, 40) = 40
[ 4 0 9 4 ] : _ n s s _ m y s q l _ m a l l o c : E X I T
( 2 4 9 5 0 )\n
close(3) = 0
<- libc:fclose() = 0
-> libc:snprintf(0x24950, 0x92, 0x269c0, 0x1388)
-> libc_psr:memcpy(0x24950, 0x269c0, 0x46, 0x91)
<- libc_psr:memcpy() = 0x24950
Incurred fault #6, FLTBOUNDS %pc = 0xFF2B3084
siginfo: SIGSEGV SEGV_MAPERR addr=0x00001388
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_MAPERR addr=0x00001388
*** process killed ***
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've succesfully compiled/tested libnss_mysql on a redhat linux 8 without any problems (It took me less than 5 mins to run it)
Problems start with solaris/sparc (ver 8 & 9). Imanaged to compile it for 32/64 bit by using gcc 3.2.
I wonder why do I get core dumps everytime I'm trying to use the library (eg. #id cineri)?
Below I'm attaching a debug file! (sorry for the BIG message... - I will not attach trace.out for now....)
Thanks a lot.
angel.
-----------------------------------------------------------------------
bash-2.05# more /tmp/libnss_mysql-debug.log
[14328]: _nss_mysql_passwd_constr: ENTER
[14328]: _nss_mysql_malloc: ENTER
[14328]: _nss_mysql_malloc: malloc (8)
[14328]: _nss_mysql_malloc: EXIT (25a48)
[14328]: _nss_mysql_passwd_constr: EXIT (25a48)
[14328]: _nss_mysql_getpwnam_r: ENTER
[14328]: _nss_mysql_lookup: ENTER
[14328]: _nss_mysql_init: ENTER
[14328]: _nss_mysql_load_config: ENTER
[14328]: _nss_mysql_load_config_file: ENTER
[14328]: _nss_mysql_load_config_file: Loading: /etc/nss_mysql.cfg
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (0)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: retry -> 5
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (3)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getpwnam -> SELECT username,'x',uid,gid,gecos,homedir,shell FROM users WHERE username='%s
' LIMIT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 87)
[14328]: _nss_mysql_realloc: EXIT (27b28)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getpwuid -> SELECT username,'x',uid,gid,gecos,homedir,shell FROM users WHERE uid='%u' LIM
IT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 82)
[14328]: _nss_mysql_realloc: EXIT (27b88)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getspnam -> SELECT username,password,lstchg,min,max,warn,inact,expire,flag FROM users WHE
RE username='%s' LIMIT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 102)
[14328]: _nss_mysql_realloc: EXIT (27be8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getpwent -> SELECT username,'x',uid,gid,gecos,homedir,shell FROM users
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 59)
[14328]: _nss_mysql_realloc: EXIT (27c58)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getspent -> SELECT username,password,lstchg,min,max,warn,inact,expire,flag FROM users
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 74)
[14328]: _nss_mysql_realloc: EXIT (27ca0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getgrnam -> SELECT name,password,gid FROM groups WHERE name='%s' LIMIT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 61)
[14328]: _nss_mysql_realloc: EXIT (27cf8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getgrgid -> SELECT name,password,gid FROM groups WHERE gid='%u' LIMIT 1
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 60)
[14328]: _nss_mysql_realloc: EXIT (27d40)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: getgrent -> SELECT name,password,gid FROM groups
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 37)
[14328]: _nss_mysql_realloc: EXIT (27d88)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: memsbygid -> SELECT username FROM grouplist WHERE gid='%u'
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 46)
[14328]: _nss_mysql_realloc: EXIT (27db8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: gidsbymem -> SELECT gid FROM grouplist where username='%s'
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 46)
[14328]: _nss_mysql_realloc: EXIT (27df0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (1)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: database -> auth
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 5)
[14328]: _nss_mysql_realloc: EXIT (25a58)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: username -> nss-user
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 9)
[14328]: _nss_mysql_realloc: EXIT (22b78)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: password -> userpass
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 9)
[14328]: _nss_mysql_realloc: EXIT (22b90)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: socket -> /tmp/mysql.sock
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 16)
[14328]: _nss_mysql_realloc: EXIT (22ba8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (2)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: host -> 99.99.99.99
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 12)
[14328]: _nss_mysql_realloc: EXIT (22bc0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: database -> auth
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 5)
[14328]: _nss_mysql_realloc: EXIT (25a68)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: username -> nss-user
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 9)
[14328]: _nss_mysql_realloc: EXIT (22bd8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: password -> userpass
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (0, 9)
[14328]: _nss_mysql_realloc: EXIT (22bf0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: port -> 3306
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_get_section: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_config_file: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_config_file: ENTER
[14328]: _nss_mysql_load_config_file: Loading: /etc/nss_mysql_root.cfg
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (1)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: username -> nss-root
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (22b78, 9)
[14328]: _nss_mysql_realloc: EXIT (22b78)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: password -> rootpass
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (22b90, 9)
[14328]: _nss_mysql_realloc: EXIT (22b90)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (TRUE)
[14328]: _nss_mysql_name_to_id: ENTER
[14328]: _nss_mysql_name_to_id: EXIT (2)
[14328]: _nss_mysql_get_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_section: ENTER
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: username -> nss-root
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (22bd8, 9)
[14328]: _nss_mysql_realloc: EXIT (22bd8)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_is_bracketed: ENTER
[14328]: _nss_mysql_is_bracketed: EXIT (FALSE)
[14328]: _nss_mysql_next_key: Found: password -> rootpass
[14328]: _nss_mysql_next_key: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_lis: ENTER
[14328]: _nss_mysql_realloc: ENTER
[14328]: _nss_mysql_realloc: realloc (22bf0, 9)
[14328]: _nss_mysql_realloc: EXIT (22bf0)
[14328]: _nss_mysql_lis: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_next_key: ENTER
[14328]: _nss_mysql_next_key: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_section: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_get_section: ENTER
[14328]: _nss_mysql_get_section: EXIT (NSS_NOTFOUND)
[14328]: _nss_mysql_load_config_file: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_validate_servers: ENTER
[14328]: _nss_mysql_validate_servers: EXIT (TRUE)
[14328]: _nss_mysql_load_config: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_init: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_load_config: ENTER
[14328]: _nss_mysql_load_config: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_build_query: ENTER
[14328]: _nss_mysql_malloc: ENTER
[14328]: _nss_mysql_malloc: malloc (151)
[14328]: _nss_mysql_malloc: EXIT (25b18)
[14328]: _nss_mysql_malloc: ENTER
[14328]: _nss_mysql_malloc: malloc (15)
[14328]: _nss_mysql_malloc: EXIT (22c08)
[14328]: _nss_mysql_escape_string: ENTER
[14328]: _nss_mysql_connect_sql: ENTER
[14328]: _nss_mysql_check_existing_connection: ENTER
[14328]: _nss_mysql_check_existing_connection: EXIT (FALSE)
[14328]: _nss_mysql_pick_server: ENTER
[14328]: _nss_mysql_pick_server: EXIT (NSS_SUCCESS)
[14328]: _nss_mysql_try_server: ENTER
Can you post the last 10-20 lines of the trace so I can see what leads to the segfault? Also, can you tell me what version of MySQL (and how it was obtained - binary, self compiled, SFW ..) as well as where you got GCC from. It'll make it easier for me to try and reproduce. Is there anything you changed about the default installation (other than username/password of course)?
... unless you want to give me shell access to the box .. that would make debugging the problem a lot easier and faster. I'd need root/sudo privs tho.. Up to you.
Well I've got gcc from solaris.freeware site as a package. Solaris version is 9. The system is a netra t1 1G ram 1x18G HD. Sorry but no root access is possible...
To compile libnss_mysql-0.7a I used :
./configure ; make;make install (both 32/64 bit)
I'm using a self compiled version of mysql-3.23.49
mysql configuration follows:
********************************************************
CC=gcc CFLAGS="-O3 -fomit-frame-pointer -DHAVE_CURSES_H" \ CXX=g++ \ CXXFLAGS="-O3 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtt
i -DHAVE_CURSES_H" \ ./configure --with-mysql-user=mysql \ --enable-assembler --prefix=/usr/local/mysql --with-server-suffi
x=-max \ --with-innodb --enable-shared --enable-static
********************************************************
trace.out follows:
********************************************************
_ n s s _ m y s q l _ p i c k _ s e r v e r : E X I T ( N S
S _ S U C C E S S )
write(2, "\n", 1) = 1
<- libc:fprintf() = 52
-> libc:vsnprintf(0xffbfef30, 0x3e8, 0xff06ead0, 0xffbff370)
-> libc_psr:memcpy(0xffbfef30, 0xff06eb98, 0x15, 0x3e7)
<- libc_psr:memcpy() = 0xffbfef30
-> libc_psr:memcpy(0xffbfef45, 0xff06ead2, 0x7, 0x3d2)
<- libc_psr:memcpy() = 0xffbfef45
<- libc:vsnprintf() = 28
-> libc:getenv(0xff06e638, 0xa0, 0xff06ead0, 0xffbff370)
<- libc:getenv() = 0xffbfff0d
-> libc:atoi(0xffbfff0d, 0xffbfff0d, 0xff06ead0, 0xffbff370)
<- libc:atoi() = 1
-> libc:getpid(0x2f4, 0x21f00, 0xff06ead0, 0xffbff370)
getpid() = 14348 [14347]
<- libc:getpid() = 14348
-> libc:fprintf(0x21f20, 0xff06e658, 0x380c, 0xffbfef30)
write(2, " [", 1) = 1
write(2, " 1 4 3 4 8", 5) = 5
write(2, " ] : ", 3) = 3
write(2, 0xFFBFEF30, 28) = 28
_ n s s _ m y s q l _ t r y _ s e r v e r : E N T E R
write(2, "\n", 1) = 1
<- libc:fprintf() = 38
-> libc:vsnprintf(0xffbfef30, 0x3e8, 0xff06ebb0, 0xffbff370)
-> libc_psr:memcpy(0xffbfef30, 0xff06eb98, 0x15, 0x3e7)
<- libc_psr:memcpy() = 0xffbfef30
-> libc_psr:memcpy(0xffbfef45, 0xff06ebb2, 0x10, 0x3d2)
<- libc_psr:memcpy() = 0xffbfef45
-> libc_psr:memcpy(0xffbfef55, 0x22bd8, 0x8, 0x3c2)
<- libc_psr:memcpy() = 0xffbfef55
-> libc_psr:memcpy(0xffbfef5d, 0xff06ebc4, 0x1, 0x3ba)
<- libc_psr:memcpy() = 0xffbfef5d
-> libc_psr:memcpy(0xffbfef5e, 0x22bf0, 0x8, 0x3b9)
<- libc_psr:memcpy() = 0xffbfef5e
-> libc_psr:memcpy(0xffbfef66, 0xff06ebc7, 0x1, 0x3b1)
<- libc_psr:memcpy() = 0xffbfef66
-> libc_psr:memcpy(0xffbfef67, 0x22bc0, 0xb, 0x3b0)
<- libc_psr:memcpy() = 0xffbfef67
-> libc_psr:memcpy(0xffbfef72, 0xff06ebca, 0x2, 0x3a5)
<- libc_psr:memcpy() = 0xffbfef72
-> libc_psr:memcpy(0xffbfef74, 0xffbfe9c7, 0x4, 0x3a3)
<- libc_psr:memcpy() = 0xffbfef74
-> libc_psr:memcpy(0xffbfef78, 0xff06ebce, 0x1, 0x39f)
<- libc_psr:memcpy() = 0xffbfef78
Incurred fault #6, FLTBOUNDS %pc = 0xFF2B2E90
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
********************************************************
Thanks alot a gain for the support.
angel.
That particular segault looks like it's happening inside the debug routine. Does this occur with libnss-mysql compiled without debug support? If that doesn't do it, can you comment out the "D" call just after the "DENTER" call in _nss_mysql_try_server () recompile/reinstall and try that out? Meanwhile I'll load up solaris 9 and see if I can reproduce this.
BTW, Solaris 9 support is limited - Sun's PAM modules have become overly restrictive to the point that any PAM application will fail. non-PAM stuff should work fine. The only solution is for someone (I eventually will) to write a replacement for Sun's libraries.
I've tried this on my solaris 9 sparc box with the same mysql version (and compile options) you have and can't reproduce it. However, I have GCC 3.1 .. as the GCC 3.2 and 3.2.1 show as corrupt for me. Perhaps that's the problem?
... or not. The mirror I use has corrupted files. I d/led gcc 3.2 from the main site (a whopping 3.2K/s!) and it's not corrupt. I'm trying again with gcc 3.2
I've removed the "D" call on solaris 9 and everything seems OK now. Now I'm testing it on a netra T1 with solaris 8. I'll post results later...
That "D" call is inappropriately expecting a non-null value for the "socket" configuration parameter. If you put a "socket" line for each server ([primary] and [secondary]) in your config file, and put the D call back in, that will probably work. I'm working on fixing the code now.
Actually it expects a non-null value for any parameter. Fill out all the options, even if they're unused, so that they're not null. Or just leave that D commented out for now I suppose :-)
On solaris 8 i'm still facing some problems. It looks like group functions work fine. (ls -l , chgrp etc)
"finger cinergi" works but id dosn't.
I can "chown cinergi" and "ls -ln" gives
"-rw-r--r-- 1 5000 5000 23 Jan 20 12:49 stamp-h1"
witch is ok, but when i do an "ls -l" it gives me a nice "Segmentation Fault (core dumped)" on nss_mysql_malloc function.
So, until now I've managed to make it work on solaris9 and partly on solaris8. I'm not sure whether it is an solaris_nss incompatibility or a bug somewhere.
I'm willing to do any tests for you to solve this matter.
angel.
If you try to actually use this on Solaris 9, you'll find that you can't authenticate even /etc/passwd users. It will complain about acceptable configurations in /etc/nsswitch.conf. If you leave it configured, you'll lock yourself out of the machine.
I'll have to try out solaris 8 now. I'm really surprised you're having these problems :-\ All my testing has included logging in through ssh, chown'ing files, etc - all without a hitch.
What do these commands do?
getent passwd cinergi
getent group foobaz
FWIW I just tested this on my solaris 8 gcc 3.2 and same mysql you have and it's working. Maybe there's some configuration setting that's freaking the library out?
Have you changed anything about the default install? The 'cinergi' user, or the config files, etc?
getent works fine for both group & passwd database on solaris8
It seems there is a problem when nss_mysql replaces certain functions from the OS.
I'll write a test perl script to test the following functions :
getpwuid
getpwnam
getspnam
getpwent
getspent
getgrnam
getgrgid
getgrent
gidsbymem
memsbygid
then I'll come back with some answers. I think there's something wrong with "shadow" routines on my system, and I'll find it!!
As for Solaris9 of cource you're right...
SunOS 5.9
login: cinergi
Supported configurations for passwd management are as follows:
passwd: files
passwd: files ldap
passwd: files nis
passwd: files nisplus
passwd: compat
passwd: compat AND
passwd_compat: ldap OR
passwd_compat: nisplus
Please check your /etc/nsswitch.conf file
Password:
getent works but id/finger doesn't? That's quite odd. Test the shadow by using getent (as root) like:
getent shadow cinegi
and see what pops up.
nss_mysql doesn't replace any functions. It's called as a backend. All of the "get*" functions pass the calls on to a backend based upon /etc/nsswitch.conf. There's an nss_files library for /etc/passwd, for instance. The O/S dynamically loads nss_mysql because of the configuration in /etc/nsswitch.conf, and then calls the routines defined in the library .. for what that's worth. :-)
Hi Ben,
"replace" was a shortcut for your explanation of nss ;)
On solaris you cannot use the "shadow" database with getent.
Until now I'm sure for the following by testing system functions from within perl:
getpwent,getgrent,getgrnam,getgrgid,getpwnam work fine.
I'm having core dumps with getpwuid function for some reason.
That explains why some programs (finger) work while others doesn't (id).
I'm writing some c code to use shadow system functions and see what exactly works and what doesn't.
For some readon I'm sure I'm having problems ONLY with getpwid function witch is rather strange. I'll compile your lib on another solaris 8 system and maybe on a x86 system to see what's goin'on.... and I'll post the results.
I'll send you my test (silly??) code if you like....
angel.
only getpwuid. Yes, yes that's strange. :-) Do you have the tail-end of a debug log for a failing getpwuid call?
The only thing I can think of is a hosed config line for getpwuid .. IE a %s instead of a %u or something.
Well hi again.
I've wrote some test routines and the results were as i expected.
Function getpwuid gives me core dump. As a matter of fact it gives me more or less the same trace.out as "id" command.
Below I'm attaching the tail ot trace.out from my code.
---------------------------------------------------------------------
[ 4 0 9 4 ] : _ n s s _ m y s q l _ m a l l o c : m a l l o
c ( 1 4 6 )\n
close(3) = 0
<- libc:fclose() = 0
-> libc:malloc(0x92, 0x0, 0x92, 0x0)
<- libc:malloc() = 0x24950
-> libc:vsnprintf(0xffbef0a0, 0x3e8, 0xff14ebb8, 0xffbef4e0)
-> libc_psr:memcpy(0xffbef0a0, 0xff14eb70, 0x11, 0x3e7)
<- libc_psr:memcpy() = 0xffbef0a0
-> libc_psr:memcpy(0xffbef0b1, 0xff14ebba, 0x8, 0x3d6)
<- libc_psr:memcpy() = 0xffbef0b1
-> libc_psr:memcpy(0xffbef0b9, 0xffbeeb26, 0x5, 0x3ce)
<- libc_psr:memcpy() = 0xffbef0b9
-> libc_psr:memcpy(0xffbef0be, 0xff14ebc4, 0x1, 0x3c9)
<- libc_psr:memcpy() = 0xffbef0be
<- libc:vsnprintf() = 31
-> libc:getenv(0xff14e7d8, 0xa0, 0xff14ebb8, 0xffbef4e0)
<- libc:getenv() = 0
-> libc:fopen(0xff14e808, 0xff14e828, 0xa8, 0xffbefd78)
-> libc_psr:memset(0xff33c0d0, 0x0, 0x18, 0xff338018)
<- libc_psr:memset() = 0xff33c0d0
open("/tmp/libnss_mysql-debug.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
llseek(3, 0, SEEK_END) = 0x014891D5
<- libc:fopen() = 0xff33c304
-> libc:getpid(0xff33c304, 0xff14e828, 0xff14e808, 0xffbefd78)
getpid() = 4094 [4093]
<- libc:getpid() = 4094
-> libc:fprintf(0xff33c304, 0xff14e7f8, 0xffe, 0xffbef0a0)
fstat64(3, 0xFFBEE320) = 0
d=0x00000002 i=2888796 m=0100644 l=1 u=0 g=0 sz=21533141
at = Jan 21 10:40:37 EET 2003 [ 1043138437 ]
mt = Jan 21 23:02:19 EET 2003 [ 1043182939 ]
ct = Jan 21 23:02:19 EET 2003 [ 1043182939 ]
bsz=8192 blks=42064 fs=tmpfs
ioctl(3, TCGETA, 0xFFBEE2AC) Err#25 ENOTTY
-> libc_psr:memcpy(0x26c6c, 0xffbef0a0, 0x1f, 0xffbeefc0)
<- libc_psr:memcpy() = 0x26c6c
<- libc:fprintf() = 40
-> libc:fclose(0xff33c304, 0x28, 0xff33fa9c, 0x0)
write(3, 0x00026C64, 40) = 40
[ 4 0 9 4 ] : _ n s s _ m y s q l _ m a l l o c : E X I T
( 2 4 9 5 0 )\n
close(3) = 0
<- libc:fclose() = 0
-> libc:snprintf(0x24950, 0x92, 0x269c0, 0x1388)
-> libc_psr:memcpy(0x24950, 0x269c0, 0x46, 0x91)
<- libc_psr:memcpy() = 0x24950
Incurred fault #6, FLTBOUNDS %pc = 0xFF2B3084
siginfo: SIGSEGV SEGV_MAPERR addr=0x00001388
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_MAPERR addr=0x00001388
*** process killed ***
!@$#$^$%&%&*^U^(
That was the problem!!!!!!!
On configuration file the sql command was:
select ....... where uid='%s' limit 1
I've changed %s to %u and voila!! It works fine.
Your help was valuable. Thanks a lot! Mail me at angel at spark.net.gr if you need my "test" code.