From: Steve Dickson <SteveD@redhat.com>
To: NeilBrown <neilb@suse.de>
Cc: Chuck Lever <chuck.lever@oracle.com>,
Simo Sorce <simo@redhat.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH: nfs-utils] mountd: use SONAME fir libnfsjunct when loading with dlopen.
Date: Tue, 11 Mar 2014 14:19:31 -0400 [thread overview]
Message-ID: <531F53B3.4070409@RedHat.com> (raw)
In-Reply-To: <20140305150741.19cead16@notabene.brown>
On 03/04/2014 11:07 PM, NeilBrown wrote:
>
>
> The standard for loading shared libraries is to identify them by their
> "soname" (Which "objdump -x $BINARY | grep SONAME" will report).
> However mountd currently loads using the "linker name" which should only
> be used when building new code.
>
> Future releases of fedfs-utils will define the soname in the include
> file, so if that is defined, use it. If not, use the soname of the
> first version: "libnfsjunct.so.0".
>
> This is a slight behavioural change. However all distros known to
> package fedfs-utils will install "libnfsjunct.so.0" whenever they
> install the old name of "libnfsjunct.so", and "make install" will
> install both. So it should not be a noticeable change.
>
> Also only test the JP_API_VERSION if it is defined. As the version is
> embedded in the soname, a secondary test is not needed.
>
> Cc: Chuck Lever <chuck.lever@oracle.com>
> Signed-off-by: NeilBrown <neilb@suse.de>
Committed...
steved.
>
> diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
> index ca35de28847a..9a1bb2767ac2 100644
> --- a/utils/mountd/cache.c
> +++ b/utils/mountd/cache.c
> @@ -1087,12 +1087,13 @@ static struct exportent *invoke_junction_ops(void *handle, char *dom,
> __func__, error);
> return NULL;
> }
> +#ifdef JP_API_VERSION
> if (ops->jp_api_version != JP_API_VERSION) {
> xlog(D_GENERAL, "%s: unrecognized junction API version: %u",
> __func__, ops->jp_api_version);
> return NULL;
> }
> -
> +#endif
> status = ops->jp_init(false);
> if (status != JP_OK) {
> xlog(D_GENERAL, "%s: failed to resolve %s: %s",
> @@ -1139,7 +1140,11 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
> struct link_map *map;
> void *handle;
>
> - handle = dlopen("libnfsjunct.so", RTLD_NOW);
> +#ifdef JP_NFSPLUGIN_SONAME
> + handle = dlopen(JP_NFSPLUGIN_SONAME, RTLD_NOW);
> +#else
> + handle = dlopen("libnfsjunct.so.0", RTLD_NOW);
> +#endif
> if (handle == NULL) {
> xlog(D_GENERAL, "%s: dlopen: %s", __func__, dlerror());
> return NULL;
>
prev parent reply other threads:[~2014-03-11 18:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 5:16 What does rpc.mountd dlopen() libnfsjunct.so rather than libnfsjunct.so.0 NeilBrown
2014-02-26 6:06 ` Chuck Lever
2014-02-26 7:01 ` NeilBrown
2014-02-26 14:40 ` Simo Sorce
2014-02-26 14:51 ` Chuck Lever
2014-02-26 14:39 ` Simo Sorce
2014-02-26 16:02 ` Chuck Lever
2014-02-26 16:25 ` Simo Sorce
2014-02-26 16:54 ` Chuck Lever
2014-02-26 17:10 ` Simo Sorce
2014-03-03 17:30 ` Steve Dickson
2014-03-03 17:23 ` Steve Dickson
2014-02-26 22:58 ` NeilBrown
2014-02-27 16:57 ` Chuck Lever
2014-03-03 3:21 ` NeilBrown
2014-03-03 17:45 ` Chuck Lever
2014-03-03 22:42 ` NeilBrown
2014-03-04 18:35 ` Chuck Lever
2014-03-05 3:45 ` NeilBrown
2014-03-05 4:07 ` [PATCH: nfs-utils] mountd: use SONAME fir libnfsjunct when loading with dlopen NeilBrown
2014-03-11 18:19 ` Steve Dickson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=531F53B3.4070409@RedHat.com \
--to=steved@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=simo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).