This is the mail archive of the glibc-bugs@sources.redhat.com 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/1044] New: --enable-static-nss does not support nsswitch "compat"


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

-- 
           Summary: --enable-static-nss does not support nsswitch "compat"
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: web-sources dot redhat dot com at jankratochvil dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i386-redhat-linux-gnu
  GCC host triplet: i386-redhat-linux-gnu
GCC target triplet: i386-redhat-linux-gnu


http://sources.redhat.com/bugzilla/show_bug.cgi?id=1044

------- 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]