libc/configure --enable-static-nss and program compiled using "-static" (->.a) currently supports /etc/nsswitch.conf fields "files" and "dns". It does not support "compat". Some distributions such as VectorLinux define "compat" for "passwd" and "group" nsswitch items. getpwuid(2) etc. fails there for --enable-static-nss built binaries. I am not aware of any incompatibilities brought by this patch. Sure the "nis" part of "compat" feature is still missing if --enable-static-nss. Steps to Reproduce: 1. /etc/nsswitch.conf: passwd: compat 2. glibc/configure --enable-static-nss 3. echo 'getpwuid(0);' >>program.c 4. gcc -static -o program program.c Actual Results: ./program getpwuid(0) returns NULL Expected Results: ./program getpwuid(0) returns "root" Patch is intended for vendor-indepent fully static binaries (such as the ones provided by MySQL). Originally improperly posted (with broken patch) as: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=111827
Created attachment 535 [details] Fixed substitution "compat"->"files" if: --enable-static-nss
No way. static nss is only meant for the initial porting and will never provide the same functionality as the real nss.