NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/45266: krb5-config causes namespace pollution (NetBSD 5, NetBSD 4, and probably HEAD)



>Number:         45266
>Category:       lib
>Synopsis:       krb5-config causes namespace pollution (NetBSD 5, NetBSD 4, 
>and probably HEAD)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 18 10:15:00 +0000 2011
>Originator:     Robert Elz
>Release:        NetBSD 5.1  (all current supported releases)
>Organization:
        Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 5.1 NetBSD 5.1 (JADE-1.12-20101117) #5: Wed 
Nov 17 05:30:55 ICT 2010 
kre%jade.coe.psu.ac.th@localhost:/usr/obj/5.1/kernels/i386/JADE i386
Architecture: i386
Machine: i386
>Description:
        First, while I say this affects netBSD current, I don't have a
        build less than a few months old, so it is possible this has
        already been changed there, though I doubt it.

        /usr/bin/krb-config --cflags (on NetBSD 4* and NetBSD 5* and
                NetBSD current at least of last April) generates

                -I/usr/include/krb5

        That causes programs that use it (or more often, have it foist
        upon them) and which do

                #include <file>
        or      #include "file"

        to potentially find /usr/include/krb5/file instead of whatever
        they were intending to find.

        The only rational reason for ever doing -I of a sub-directory
        of /usr/include is when some subsystem wants to override the
        standard include files (for example, while I have no idea if
        it ever needs to, or does, I could imagine threads possibly doing
        that, with a different version of (perhaps) <resolv.h> for use
        by threaded programs),

        Aside from that, any program that wants to include something that
        is installed in a subdir of /usr/include should simply
                #include <subdir/file>

        That's the way it has always been for sys/* net/* netinet/* arpa/*
        and all the rest, and I cannot imagine why the krb5 directory needs
        to be different.  Certainly it doesn't include files that are
        overriding standard files in /usr/include - rather they're just
        polluting the namespace of programs that aren't expecting that
        stuff to exist.

        For an example of how this screwed things, see PR pkg/40198 (skip
        past the early bug report, and go down to the more recent part
        where this issue was the problem).

>How-To-Repeat:
        Run krb5-config --cflags and observe the output.

>Fix:
        Change krb5-config so it omits nothing with the --cflags option
        (the -I is currently the only output, and it is bogus).

        Then fix anything (should there be anything) that has stupidly
        depended upon this behaviour, to include <krb5/file> instead of
        just <file>.



Home | Main Index | Thread Index | Old Index