Blame SOURCES/nfs-utils-2.3.3-mountd-pseudofs.patch

aa7fbf
diff --git a/utils/mountd/v4root.c b/utils/mountd/v4root.c
aa7fbf
index d735dbfe..8ec33fb0 100644
aa7fbf
--- a/utils/mountd/v4root.c
aa7fbf
+++ b/utils/mountd/v4root.c
aa7fbf
@@ -36,9 +36,9 @@ static nfs_export pseudo_root = {
aa7fbf
 	.m_export = {
aa7fbf
 		.e_hostname = "*",
aa7fbf
 		.e_path = "/",
aa7fbf
-		.e_flags = NFSEXP_READONLY | NFSEXP_ROOTSQUASH
aa7fbf
+		.e_flags = NFSEXP_READONLY
aa7fbf
 				| NFSEXP_NOSUBTREECHECK | NFSEXP_FSID
aa7fbf
-				| NFSEXP_V4ROOT,
aa7fbf
+				| NFSEXP_V4ROOT | NFSEXP_INSECURE_PORT,
aa7fbf
 		.e_anonuid = 65534,
aa7fbf
 		.e_anongid = 65534,
aa7fbf
 		.e_squids = NULL,
aa7fbf
@@ -57,15 +57,11 @@ static nfs_export pseudo_root = {
aa7fbf
 };
aa7fbf
 
aa7fbf
 static void
aa7fbf
-set_pseudofs_security(struct exportent *pseudo, int flags)
aa7fbf
+set_pseudofs_security(struct exportent *pseudo)
aa7fbf
 {
aa7fbf
 	struct flav_info *flav;
aa7fbf
 	int i;
aa7fbf
 
aa7fbf
-	if (flags & NFSEXP_INSECURE_PORT)
aa7fbf
-		pseudo->e_flags |= NFSEXP_INSECURE_PORT;
aa7fbf
-	if ((flags & NFSEXP_ROOTSQUASH) == 0)
aa7fbf
-		pseudo->e_flags &= ~NFSEXP_ROOTSQUASH;
aa7fbf
 	for (flav = flav_map; flav < flav_map + flav_map_size; flav++) {
aa7fbf
 		struct sec_entry *new;
aa7fbf
 
aa7fbf
@@ -75,8 +71,7 @@ set_pseudofs_security(struct exportent *pseudo, int flags)
aa7fbf
 		i = secinfo_addflavor(flav, pseudo);
aa7fbf
 		new = &pseudo->e_secinfo[i];
aa7fbf
 
aa7fbf
-		if (flags & NFSEXP_INSECURE_PORT)
aa7fbf
-			new->flags |= NFSEXP_INSECURE_PORT;
aa7fbf
+		new->flags |= NFSEXP_INSECURE_PORT;
aa7fbf
 	}
aa7fbf
 }
aa7fbf
 
aa7fbf
@@ -95,7 +90,7 @@ v4root_create(char *path, nfs_export *export)
aa7fbf
 	strncpy(eep.e_path, path, sizeof(eep.e_path)-1);
aa7fbf
 	if (strcmp(path, "/") != 0)
aa7fbf
 		eep.e_flags &= ~NFSEXP_FSID;
aa7fbf
-	set_pseudofs_security(&eep, curexp->e_flags);
aa7fbf
+	set_pseudofs_security(&eep;;
aa7fbf
 	exp = export_create(&eep, 0);
aa7fbf
 	if (exp == NULL)
aa7fbf
 		return NULL;
aa7fbf
@@ -143,7 +138,7 @@ pseudofs_update(char *hostname, char *path, nfs_export *source)
aa7fbf
 		return 0;
aa7fbf
 	}
aa7fbf
 	/* Update an existing V4ROOT export: */
aa7fbf
-	set_pseudofs_security(&exp->m_export, source->m_export.e_flags);
aa7fbf
+	set_pseudofs_security(&exp->m_export);
aa7fbf
 	return 0;
aa7fbf
 }
aa7fbf