Bug 111827 - --enable-static-nss does not support nsswitch "compat"
Summary: --enable-static-nss does not support nsswitch "compat"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-10 17:27 UTC by Jan Kratochvil
Modified: 2016-11-24 15:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-12-27 15:53:56 UTC
Embargoed:


Attachments (Terms of Use)
Patch translating "compat" to "files" for libc.a in --enable-static-nss case (where no "compat" is supported anyway). (766 bytes, patch)
2003-12-10 17:28 UTC, Jan Kratochvil
no flags Details | Diff

Description Jan Kratochvil 2003-12-10 17:27:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701

Description of problem:
glibc/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.


Version-Release number of selected component (if applicable):
glibc-2.3.2-27.9.7

How reproducible:
Always

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"


Additional info:

Comment 1 Jan Kratochvil 2003-12-10 17:28:37 UTC
Created attachment 96447 [details]
Patch translating "compat" to "files" for libc.a in --enable-static-nss case (where no "compat" is supported anyway).

Comment 2 Jakub Jelinek 2003-12-27 15:53:56 UTC
Why have you filed this bug against RHL9 though?
We don't ship glibc built with --enable-static-nss, nor recommend it in any way
(that option is solely for glibc bootstrapping purposes).
And for bootstrapping purposes you can easily edit your nsswitch.conf.

Comment 3 Jan Kratochvil 2003-12-27 16:02:16 UTC
I use --enable-static-nss rebuilt glibc to build Linux distribution
independent fully-static binaries of a product on RHL9 build host.
You can consider this patch as RFE instead.
I do not mind the patch import, my separate patch is OK for my purposes.



Note You need to log in before you can comment on or make changes to this bug.