mcinglis / rpms / nfs-utils

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