walters / rpms / nfs-utils

Forked from rpms/nfs-utils 6 years ago
Clone
Blob Blame History Raw
commit 3c473bf19432cd7c17c7be7595d46e7c2d6a7efe
Author: Steve Dickson <steved@redhat.com>
Date:   Fri Nov 20 08:51:34 2009 -0500

    Fixed a bug introduced by commit 5d27b4 that was stopping
    exports that existed on the pseudo root (i.e. '/') from
    being exported. The result of this bug was client mounts
    were failing with ESTALE.
    
    Signed-off-by: Steve Dickson <steved@redhat.com>

diff --git a/utils/mountd/v4root.c b/utils/mountd/v4root.c
index a1e0eb2..a5a1a75 100644
--- a/utils/mountd/v4root.c
+++ b/utils/mountd/v4root.c
@@ -275,8 +275,10 @@ v4root_create(char *path, nfs_export *exp)
 
 	/* Check to see if the export already exists */
 	get_uuid(path, NULL, uuid_len, uuid);
-	if ((p_export = v4root_export(uuid, uuid_len)) != NULL)
-		return p_export;
+	if ((p_export = v4root_export(uuid, uuid_len)) != NULL) {
+		if (strcmp(path, p_export->e_path) == 0)
+			return p_export;
+	}
 
 	pexp = (exports_t *)malloc(sizeof(exports_t));
 	if (pexp == NULL) {