Merge "profiles/internal/naming/namespace|services/mounttable: Pass IsLeaf all the way"
diff --git a/profiles/internal/naming/namespace/all_test.go b/profiles/internal/naming/namespace/all_test.go
index 3c21423..af205c2 100644
--- a/profiles/internal/naming/namespace/all_test.go
+++ b/profiles/internal/naming/namespace/all_test.go
@@ -766,4 +766,21 @@
 	if expected := true; mountEntry.IsLeaf != expected {
 		boom(t, "unexpected mountEntry.IsLeaf value. Got %v, expected %v", mountEntry.IsLeaf, expected)
 	}
+
+	c, err := ns.Glob(ctx, "leaf")
+	if err != nil {
+		boom(t, "ns.Glob failed: %v", err)
+	}
+	count := 0
+	for result := range c {
+		if me, ok := result.(*naming.MountEntry); ok {
+			count++
+			if expected := true; me.IsLeaf != expected {
+				boom(t, "unexpected me.IsLeaf value. Got %v, expected %v", me.IsLeaf, expected)
+			}
+		}
+	}
+	if count == 0 {
+		boom(t, "Glob did not return any results. Expected 1")
+	}
 }
diff --git a/profiles/internal/naming/namespace/glob.go b/profiles/internal/naming/namespace/glob.go
index e0c26e0..f3c30b8 100644
--- a/profiles/internal/naming/namespace/glob.go
+++ b/profiles/internal/naming/namespace/glob.go
@@ -111,6 +111,7 @@
 					Name:             naming.Join(t.me.Name, v.Value.Name),
 					Servers:          v.Value.Servers,
 					ServesMountTable: v.Value.ServesMountTable,
+					IsLeaf:           v.Value.IsLeaf,
 				},
 				depth: t.depth + 1,
 			}
diff --git a/services/mounttable/lib/mounttable.go b/services/mounttable/lib/mounttable.go
index e40e986..e9af895 100644
--- a/services/mounttable/lib/mounttable.go
+++ b/services/mounttable/lib/mounttable.go
@@ -602,6 +602,7 @@
 		if err := n.satisfies(mt, call, resolveTags); err == nil {
 			me.Servers = m.servers.copyToSlice()
 			me.ServesMountTable = n.mount.mt
+			me.IsLeaf = n.mount.leaf
 		} else {
 			me.Servers = []naming.MountedServer{}
 		}