This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/1970] getgrnam_r() and groups with more than 1024 bytes


------- Additional Comments From burnus at gmx dot de  2005-12-09 11:53 -------
> _SC_GETGR_R_SIZE_MAX = 2048
> mygetgrnam("testg", 1024) returned: ERANGE

Hmm, _SC_GETGR_R_SIZE_MAX = 2048 is interesting. What do you have in
/etc/nsswitch.conf? I get the crash only with compat, with file I also get ERANGE.

(gdb) run test
Starting program: /tmp/getent_test test
_SC_GETGR_R_SIZE_MAX = 1024
[... working getgrnam_r ...]
Call getgrnam_r(name = "test", grp, buffer, bufsize=1024,result)

Program received signal SIGSEGV, Segmentation fault.
0x401a7c10 in memchr () from /lib/tls/libc.so.6
(gdb) bt
#0  0x401a7c10 in memchr () from /lib/tls/libc.so.6
#1  0x00000000 in ?? ()
#2  0x000003ff in ?? ()
#3  0x401931dd in _IO_getline_info_internal () from /lib/tls/libc.so.6
#4  0x4019314f in _IO_getline_internal () from /lib/tls/libc.so.6
#5  0x4019b11a in fgets_unlocked () from /lib/tls/libc.so.6
#6  0x40019f2f in _nss_compat_getgrnam_r () from /lib/libnss_compat.so.2
#7  0x401c7354 in getgrnam_r@@GLIBC_2.1.2 () from /lib/tls/libc.so.6
#8  0x08048888 in mygetgrnam_r (name=0xbfa590aa "test", bufsize=1024) at
getent_test.cpp:36
#9  0x08048a8c in main (argc=2, argv=0xbfa58e04) at getent_test.cpp:86

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=1970

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]