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

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