Description of problem: The innetgr(3) function seems not to function properly. Version-Release number of selected component (if applicable): glibc-2.4-11 How reproducible: Compile ------------------- #include <netdb.h> int main(void) { innetgr("deve", "foo", "testuser", NULL); } ------------------- and run it. Steps to Reproduce: 1. cc -o main main.c (where main.c is the program file above) 2. ./main Actual results: [root@dhcp246 ~]# ./main Segmentation fault Expected results: No segfault, but a silent program exit Additional info: (gdb) run Starting program: /root/main Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0xda8000 Program received signal SIGSEGV, Segmentation fault. 0x0025a893 in strdup () from /lib/libc.so.6 (gdb) bt #0 0x0025a893 in strdup () from /lib/libc.so.6 #1 0x00701b5f in nis_list () from /lib/libnsl.so.1 #2 0x00b9362e in _nss_nisplus_setnetgrent () from /lib/libnss_nisplus.so.2 #3 0x002d5d05 in innetgr () from /lib/libc.so.6 #4 0x080483b9 in main () at main.c:4 (gdb)
Created attachment 141512 [details] example program
*** This bug has been marked as a duplicate of 210862 ***