walters / rpms / nfs-utils

Forked from rpms/nfs-utils 6 years ago
Clone
328506d
diff -up nfs-utils-1.1.0/utils/mountd/cache.c.orig nfs-utils-1.1.0/utils/mountd/cache.c
328506d
--- nfs-utils-1.1.0/utils/mountd/cache.c.orig	2007-05-10 23:40:57.000000000 -0400
328506d
+++ nfs-utils-1.1.0/utils/mountd/cache.c	2008-01-07 13:56:02.000000000 -0500
328506d
@@ -78,6 +78,8 @@ void auth_unix_ip(FILE *f)
328506d
 	if (readline(fileno(f), &lbuf, &lbuflen) != 1)
328506d
 		return;
328506d
 
328506d
+	xlog(D_CALL, "auth_unix_ip: inbuf '%s'", lbuf);
328506d
+
328506d
 	cp = lbuf;
328506d
 
328506d
 	if (qword_get(&cp, class, 20) <= 0 ||
328506d
@@ -102,6 +104,7 @@ void auth_unix_ip(FILE *f)
328506d
 	if (client)
328506d
 		qword_print(f, *client?client:"DEFAULT");
328506d
 	qword_eol(f);
328506d
+	xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, *client?client: "DEFAULT");
328506d
 
328506d
 	if (client) free(client);
328506d
 	
328506d
@@ -273,8 +276,10 @@ void nfsd_fh(FILE *f)
328506d
 	if (readline(fileno(f), &lbuf, &lbuflen) != 1)
328506d
 		return;
328506d
 
328506d
-	cp = lbuf;
328506d
+	xlog(D_CALL, "nfsd_fh: inbuf '%s'", lbuf);
328506d
 
328506d
+	cp = lbuf;
328506d
+	
328506d
 	dom = malloc(strlen(cp));
328506d
 	if (dom == NULL)
328506d
 		return;
328506d
@@ -492,6 +497,7 @@ void nfsd_fh(FILE *f)
328506d
 	qword_eol(f);
328506d
  out:
328506d
 	free(dom);
328506d
+	xlog(D_CALL, "nfsd_fh: found %p path %s", found, found ? found->e_path : NULL);
328506d
 	return;		
328506d
 }
328506d
 
328506d
@@ -563,6 +569,8 @@ void nfsd_export(FILE *f)
328506d
 	if (readline(fileno(f), &lbuf, &lbuflen) != 1)
328506d
 		return;
328506d
 
328506d
+	xlog(D_CALL, "nfsd_export: inbuf '%s'", lbuf);
328506d
+
328506d
 	cp = lbuf;
328506d
 	dom = malloc(strlen(cp));
328506d
 	path = malloc(strlen(cp));
328506d
@@ -634,6 +642,7 @@ void nfsd_export(FILE *f)
328506d
 		dump_to_cache(f, dom, path, NULL);
328506d
 	}
328506d
  out:
328506d
+	xlog(D_CALL, "nfsd_export: found %p path %s", found, path ? path : NULL);
328506d
 	if (dom) free(dom);
328506d
 	if (path) free(path);
328506d
 }
328506d
diff -up nfs-utils-1.1.0/support/nfs/exports.c.orig nfs-utils-1.1.0/support/nfs/exports.c
328506d
--- nfs-utils-1.1.0/support/nfs/exports.c.orig	2008-01-07 13:54:36.000000000 -0500
328506d
+++ nfs-utils-1.1.0/support/nfs/exports.c	2008-01-07 13:56:02.000000000 -0500
328506d
@@ -508,6 +508,12 @@ bad_option:
328506d
 		while (isblank(*cp))
328506d
 			cp++;
328506d
 	}
328506d
+	/*
328506d
+	 * Turn on nohide which will allow this export to cross over
328506d
+	 * the 'mount --bind' mount point.
328506d
+	 */
328506d
+	if (ep->e_fslocdata)
328506d
+		ep->e_flags |= NFSEXP_NOHIDE;
328506d
 
328506d
 	ep->e_squids = squids;
328506d
 	ep->e_sqgids = sqgids;