walters / rpms / nfs-utils

Forked from rpms/nfs-utils 6 years ago
Clone
aa7cac0
diff -up nfs-utils-1.1.1/utils/mountd/cache.c.orig nfs-utils-1.1.1/utils/mountd/cache.c
aa7cac0
--- nfs-utils-1.1.1/utils/mountd/cache.c.orig	2007-10-18 23:07:28.000000000 -0400
aa7cac0
+++ nfs-utils-1.1.1/utils/mountd/cache.c	2008-01-07 14:05:16.000000000 -0500
aa7cac0
@@ -81,6 +81,8 @@ void auth_unix_ip(FILE *f)
aa7cac0
 	if (readline(fileno(f), &lbuf, &lbuflen) != 1)
aa7cac0
 		return;
aa7cac0
 
aa7cac0
+	xlog(D_CALL, "auth_unix_ip: inbuf '%s'", lbuf);
aa7cac0
+
aa7cac0
 	cp = lbuf;
aa7cac0
 
aa7cac0
 	if (qword_get(&cp, class, 20) <= 0 ||
aa7cac0
@@ -109,6 +111,7 @@ void auth_unix_ip(FILE *f)
aa7cac0
 	else if (client)
aa7cac0
 		qword_print(f, *client?client:"DEFAULT");
aa7cac0
 	qword_eol(f);
aa7cac0
+	xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, *client?client: "DEFAULT");
aa7cac0
 
aa7cac0
 	if (client) free(client);
aa7cac0
 	free(he);
aa7cac0
@@ -282,8 +285,10 @@ void nfsd_fh(FILE *f)
aa7cac0
 	if (readline(fileno(f), &lbuf, &lbuflen) != 1)
aa7cac0
 		return;
aa7cac0
 
aa7cac0
-	cp = lbuf;
aa7cac0
+	xlog(D_CALL, "nfsd_fh: inbuf '%s'", lbuf);
aa7cac0
 
aa7cac0
+	cp = lbuf;
aa7cac0
+	
aa7cac0
 	dom = malloc(strlen(cp));
aa7cac0
 	if (dom == NULL)
aa7cac0
 		return;
aa7cac0
@@ -514,6 +519,7 @@ void nfsd_fh(FILE *f)
aa7cac0
 	free(found_path);
aa7cac0
 	free(he);
aa7cac0
 	free(dom);
aa7cac0
+	xlog(D_CALL, "nfsd_fh: found %p path %s", found, found ? found->e_path : NULL);
aa7cac0
 	return;		
aa7cac0
 }
aa7cac0
 
aa7cac0
@@ -607,6 +613,8 @@ void nfsd_export(FILE *f)
aa7cac0
 	if (readline(fileno(f), &lbuf, &lbuflen) != 1)
aa7cac0
 		return;
aa7cac0
 
aa7cac0
+	xlog(D_CALL, "nfsd_export: inbuf '%s'", lbuf);
aa7cac0
+
aa7cac0
 	cp = lbuf;
aa7cac0
 	dom = malloc(strlen(cp));
aa7cac0
 	path = malloc(strlen(cp));
aa7cac0
@@ -686,6 +694,7 @@ void nfsd_export(FILE *f)
aa7cac0
 		dump_to_cache(f, dom, path, NULL);
aa7cac0
 	}
aa7cac0
  out:
aa7cac0
+	xlog(D_CALL, "nfsd_export: found %p path %s", found, path ? path : NULL);
aa7cac0
 	if (dom) free(dom);
aa7cac0
 	if (path) free(path);
aa7cac0
 	if (he) free(he);
aa7cac0
diff -up nfs-utils-1.1.1/support/nfs/exports.c.orig nfs-utils-1.1.1/support/nfs/exports.c
aa7cac0
--- nfs-utils-1.1.1/support/nfs/exports.c.orig	2008-01-07 14:03:36.000000000 -0500
aa7cac0
+++ nfs-utils-1.1.1/support/nfs/exports.c	2008-01-07 14:05:16.000000000 -0500
aa7cac0
@@ -641,6 +641,12 @@ bad_option:
aa7cac0
 		while (isblank(*cp))
aa7cac0
 			cp++;
aa7cac0
 	}
aa7cac0
+	/*
aa7cac0
+	 * Turn on nohide which will allow this export to cross over
aa7cac0
+	 * the 'mount --bind' mount point.
aa7cac0
+	 */
aa7cac0
+	if (ep->e_fslocdata)
aa7cac0
+		ep->e_flags |= NFSEXP_NOHIDE;
aa7cac0
 
aa7cac0
 	for (p = ep->e_secinfo; p->flav; p++)
aa7cac0
 		p->flags |= ep->e_flags & ~NFSEXP_SECINFO_FLAGS;