This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] sunrpc: Do not unregister services if not registered [BZ #5010]
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: libc-alpha at sourceware dot org
- Date: Mon, 20 Feb 2017 14:14:22 +0100
- Subject: Re: [PATCH] sunrpc: Do not unregister services if not registered [BZ #5010]
- Authentication-results: sourceware.org; auth=none
- References: <20170208151707.8A51C40133CDB@oldenburg.str.redhat.com>
* Florian Weimer:
> The change in commit 718946816cf60374f9d8f674d3ed649fdb33205a
> has no effect because of two bugs which cancel each other out:
> The svc_is_mapped condition is inverted, and svc_is_mapped
> always returns false because the check is performed after
> the service has already been unregistered. As a result,
> pmap_unset is called unconditionally, as before.
>
> 2017-02-08 Florian Weimer <fweimer@redhat.com>
>
> [BZ #5010]
> * sunrpc/svc.c (svc_is_mapped): Remove.
> (svc_unregister): Obtain mapped status while the service is still
> registered.
> * sunrpc/Makefile [have-thread-library] (tests): Add
> tst-svc_register.
> (tst-svc_register): Link against libc.so explicitly and the thread
> library.
> * sunrpc/tst-svc_register.c: New file.
A completely different approach would remove this functionality
altogether (and realign the code with libtirpc).
Any preferences? Thanks.