linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8
@ 2012-12-03 17:17 Chuck Lever
  2012-12-03 17:17 ` [PATCH 1/5] mountd: auth.c no longer needs #include xmalloc.h Chuck Lever
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Chuck Lever @ 2012-12-03 17:17 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

Hi-

Here are four clean-up patches I've had for a while, and one patch
that augments junction resolution debugging messages.

---

Chuck Lever (5):
      mountd: Report the absolute path used to load the junction plug-in
      libexport.a: xtab.c no longer needs #include xmalloc.h
      libexport.a: rmtab.c no longer needs #include xmalloc.h
      mountd: cache.c no longer needs #include xmalloc.h
      mountd: auth.c no longer needs #include xmalloc.h


 support/export/rmtab.c |    6 +++---
 support/export/xtab.c  |    2 +-
 utils/mountd/auth.c    |    3 ++-
 utils/mountd/cache.c   |    8 +++++++-
 4 files changed, 13 insertions(+), 6 deletions(-)

-- 
Chuck Lever

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] mountd: auth.c no longer needs #include xmalloc.h
  2012-12-03 17:17 [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Chuck Lever
@ 2012-12-03 17:17 ` Chuck Lever
  2012-12-03 17:17 ` [PATCH 2/5] mountd: cache.c " Chuck Lever
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2012-12-03 17:17 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 utils/mountd/auth.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c
index 508040a..330cab5 100644
--- a/utils/mountd/auth.c
+++ b/utils/mountd/auth.c
@@ -10,10 +10,12 @@
 #include <config.h>
 #endif
 
+#include <sys/types.h>
 #include <sys/stat.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <unistd.h>
 
 #include "sockaddr.h"
@@ -21,7 +23,6 @@
 #include "nfslib.h"
 #include "exportfs.h"
 #include "mountd.h"
-#include "xmalloc.h"
 #include "v4root.h"
 
 enum auth_error


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] mountd: cache.c no longer needs #include xmalloc.h
  2012-12-03 17:17 [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Chuck Lever
  2012-12-03 17:17 ` [PATCH 1/5] mountd: auth.c no longer needs #include xmalloc.h Chuck Lever
@ 2012-12-03 17:17 ` Chuck Lever
  2012-12-03 17:17 ` [PATCH 3/5] libexport.a: rmtab.c " Chuck Lever
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2012-12-03 17:17 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 utils/mountd/cache.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index c13f305..c264e14 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -29,7 +29,6 @@
 #include "nfslib.h"
 #include "exportfs.h"
 #include "mountd.h"
-#include "xmalloc.h"
 #include "fsloc.h"
 #include "pseudoflavors.h"
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] libexport.a: rmtab.c no longer needs #include xmalloc.h
  2012-12-03 17:17 [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Chuck Lever
  2012-12-03 17:17 ` [PATCH 1/5] mountd: auth.c no longer needs #include xmalloc.h Chuck Lever
  2012-12-03 17:17 ` [PATCH 2/5] mountd: cache.c " Chuck Lever
@ 2012-12-03 17:17 ` Chuck Lever
  2012-12-03 17:17 ` [PATCH 4/5] libexport.a: xtab.c " Chuck Lever
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2012-12-03 17:17 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 support/export/rmtab.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/support/export/rmtab.c b/support/export/rmtab.c
index 31c0f50..d16b3b3 100644
--- a/support/export/rmtab.c
+++ b/support/export/rmtab.c
@@ -1,7 +1,7 @@
 /*
- * support/export/rmntab.c
+ * support/export/rmtab.c
  *
- * Interface to the rmnt file.
+ * Interface to the rmtab file.
  *
  */
 
@@ -12,7 +12,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include "xmalloc.h"
+
 #include "misc.h"
 #include "nfslib.h"
 #include "exportfs.h"


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] libexport.a: xtab.c no longer needs #include xmalloc.h
  2012-12-03 17:17 [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Chuck Lever
                   ` (2 preceding siblings ...)
  2012-12-03 17:17 ` [PATCH 3/5] libexport.a: rmtab.c " Chuck Lever
@ 2012-12-03 17:17 ` Chuck Lever
  2012-12-03 17:18 ` [PATCH 5/5] mountd: Report the absolute path used to load the junction plug-in Chuck Lever
  2012-12-12 15:40 ` [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Steve Dickson
  5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2012-12-03 17:17 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 support/export/xtab.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/support/export/xtab.c b/support/export/xtab.c
index 2a43193..e953071 100644
--- a/support/export/xtab.c
+++ b/support/export/xtab.c
@@ -14,7 +14,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
-#include "xmalloc.h"
+
 #include "nfslib.h"
 #include "exportfs.h"
 #include "xio.h"


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] mountd: Report the absolute path used to load the junction plug-in
  2012-12-03 17:17 [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Chuck Lever
                   ` (3 preceding siblings ...)
  2012-12-03 17:17 ` [PATCH 4/5] libexport.a: xtab.c " Chuck Lever
@ 2012-12-03 17:18 ` Chuck Lever
  2012-12-12 15:40 ` [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Steve Dickson
  5 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2012-12-03 17:18 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

As a debugging feature, report the absolute pathname of the plug-in
library that mountd loads to resolve junctions.

Since mountd passes a relative path to dlopen(3), dlopen(3) must
search for the right library.  Displaying the absolute pathname of
the object that it found verifies that mountd loaded the correct
plug-in.

Note: dlinfo(3) is provided by libdl, but there doesn't seem to be a
man page on Fedora 16 for dlinfo(3).  Instead, see:

  http://www.unix.com/man-page/all/3/dlinfo/

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 utils/mountd/cache.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index c264e14..3853bb6 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -826,6 +826,7 @@ lookup_export(char *dom, char *path, struct addrinfo *ai)
 
 #ifdef HAVE_NFS_PLUGIN_H
 #include <dlfcn.h>
+#include <link.h>
 #include <nfs-plugin.h>
 
 /*
@@ -1090,6 +1091,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 		struct addrinfo *ai)
 {
 	struct exportent *exp;
+	struct link_map *map;
 	void *handle;
 
 	handle = dlopen("libnfsjunct.so", RTLD_NOW);
@@ -1097,6 +1099,11 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
 		xlog(D_GENERAL, "%s: dlopen: %s", __func__, dlerror());
 		return NULL;
 	}
+
+	if (dlinfo(handle, RTLD_DI_LINKMAP, &map) == 0)
+		xlog(D_GENERAL, "%s: loaded plug-in %s",
+			__func__, map->l_name);
+
 	(void)dlerror();	/* Clear any error */
 
 	exp = invoke_junction_ops(handle, dom, pathname, ai);


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8
  2012-12-03 17:17 [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Chuck Lever
                   ` (4 preceding siblings ...)
  2012-12-03 17:18 ` [PATCH 5/5] mountd: Report the absolute path used to load the junction plug-in Chuck Lever
@ 2012-12-12 15:40 ` Steve Dickson
  5 siblings, 0 replies; 7+ messages in thread
From: Steve Dickson @ 2012-12-12 15:40 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-nfs



On 03/12/12 12:17, Chuck Lever wrote:
> Hi-
> 
> Here are four clean-up patches I've had for a while, and one patch
> that augments junction resolution debugging messages.
> 
> ---
> 
> Chuck Lever (5):
>       mountd: Report the absolute path used to load the junction plug-in
>       libexport.a: xtab.c no longer needs #include xmalloc.h
>       libexport.a: rmtab.c no longer needs #include xmalloc.h
>       mountd: cache.c no longer needs #include xmalloc.h
>       mountd: auth.c no longer needs #include xmalloc.h
> 
> 
>  support/export/rmtab.c |    6 +++---
>  support/export/xtab.c  |    2 +-
>  utils/mountd/auth.c    |    3 ++-
>  utils/mountd/cache.c   |    8 +++++++-
>  4 files changed, 13 insertions(+), 6 deletions(-)
> 
All 5 Committed.... 

steved.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-12-12 16:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 17:17 [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Chuck Lever
2012-12-03 17:17 ` [PATCH 1/5] mountd: auth.c no longer needs #include xmalloc.h Chuck Lever
2012-12-03 17:17 ` [PATCH 2/5] mountd: cache.c " Chuck Lever
2012-12-03 17:17 ` [PATCH 3/5] libexport.a: rmtab.c " Chuck Lever
2012-12-03 17:17 ` [PATCH 4/5] libexport.a: xtab.c " Chuck Lever
2012-12-03 17:18 ` [PATCH 5/5] mountd: Report the absolute path used to load the junction plug-in Chuck Lever
2012-12-12 15:40 ` [PATCH 0/5] mountd clean-ups for nfs-utils 1.2.8 Steve Dickson

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).