This is the mail archive of the libc-alpha@sourceware.org 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]

Re: [Libtirpc-devel] glibc/libtirpc and future of client RPC code


Sigh. Try again with a text version.


> On Jun 25, 2015, at 11:33 AM, Thorsten Kukuk <kukuk@suse.de> wrote:
> 
> On Thu, Jun 25, Chuck Lever wrote:
> 
>> I like the second solution: move YP/NIS/NIS+ to one or more
>> separate upstream projects, and package them independently of
>> glibc and libtirpc.
> 
> Yes, that's currently my prefered solution, too.
> libnss_nis and libnss_nisplus needs to be a drop in replacement,
> libnsl could have a higher version number and be installed
> in parallel.
> This would mean we would need a switch to disable building
> the nis directory in glibc, or at least to disable building
> and installing libnss_nis and libnss_nisplus and installing
> the libnsl header files.
> 
>> What code in libtirpc calls on YP and NIS+ ? Should that be
>> moved as well?
> 
> grep for "YP".
> Currently I see src/netnamer.c, src/getrpcent.c, src/getpublickey.c.
> 
> netnamer.c: Lookup of /etc/netid via NIS. Don't know if we need that.

I think libtirpc is obligated to provide netname2host() and netname2user()
because these are declared in rpc/auth.h. If YP on Linux doesn't support
/etc/netid, I don't see why Linux libtirpc's version of these functions
would need to.

Perhaps it is safe to simply remove getnetid() and its call sites from
netnamer.c?

> src/getrpcent.c: We use the glibc function already if available, don't
> know on which OS we compile our own version.

According to commit 489912cad88f musl libc does not provide them.

AFAICT nothing in libtirpc calls these functions. They are provided only
for external library consumers. If these functions dip their hands into
the YP maps, then maybe they should be removed from glibc and libtirpc
and be provided by libnsl instead.


> src/getpublickey.c: Similar to netnamer.c: lookup of publickeys
> in NIS maps, not only local.
> 
> That code is needed for auth_des, so we cannot move it in another library.

Note: libtirpc looks incomplete here: there's no getsecretkey() function
defined in libtirpc.

Is there a problem with linking libtirpc with libnsl, which would provide the
NIS lookup functions? I suppose at that point this is equivalent to adding
all of YP/NIS to libtirpc.

It appears that glibc solved these issues by simply piling YP/NIS and
SunRPC into the same library. Solaris might take the same approach,
as user space TI-RPC appears to be in libnsl with YP/NIS.

Or, consider having libtirpc dynamically load libnsl if one of the
auth-des-related functions is invoked by a libtirpc consumer.


--
Chuck Lever
chucklever@gmail.com




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]