@@ -67,52 +67,53 @@ bool is_tree_granted(node::permission::FSPermission::RadixTree* granted_tree,
67
67
return granted_tree->Lookup (param, true );
68
68
}
69
69
70
- } // namespace
71
-
72
- namespace node {
73
-
74
- namespace permission {
75
-
76
- void PrintTree (const FSPermission::RadixTree::Node* node, size_t spaces = 0 ) {
70
+ void PrintTree (const node::permission::FSPermission::RadixTree::Node* node,
71
+ size_t spaces = 0 ) {
77
72
std::string whitespace (spaces, ' ' );
78
73
79
74
if (node == nullptr ) {
80
75
return ;
81
76
}
82
77
if (node->wildcard_child != nullptr ) {
83
- per_process::Debug (DebugCategory::PERMISSION_MODEL,
84
- " %s Wildcard: %s\n " ,
85
- whitespace,
86
- node->prefix );
78
+ node:: per_process::Debug (node:: DebugCategory::PERMISSION_MODEL,
79
+ " %s Wildcard: %s\n " ,
80
+ whitespace,
81
+ node->prefix );
87
82
} else {
88
- per_process::Debug (DebugCategory::PERMISSION_MODEL,
89
- " %s Prefix: %s\n " ,
90
- whitespace,
91
- node->prefix );
83
+ node:: per_process::Debug (node:: DebugCategory::PERMISSION_MODEL,
84
+ " %s Prefix: %s\n " ,
85
+ whitespace,
86
+ node->prefix );
92
87
if (node->children .size ()) {
93
88
size_t child = 0 ;
94
89
for (const auto & pair : node->children ) {
95
90
++child;
96
- per_process::Debug (DebugCategory::PERMISSION_MODEL,
97
- " %s Child(%s): %s\n " ,
98
- whitespace,
99
- child,
100
- std::string (1 , pair.first ));
91
+ node:: per_process::Debug (node:: DebugCategory::PERMISSION_MODEL,
92
+ " %s Child(%s): %s\n " ,
93
+ whitespace,
94
+ child,
95
+ std::string (1 , pair.first ));
101
96
PrintTree (pair.second , spaces + 2 );
102
97
}
103
- per_process::Debug (DebugCategory::PERMISSION_MODEL,
104
- " %s End of tree - child(%s)\n " ,
105
- whitespace,
106
- child);
98
+ node:: per_process::Debug (node:: DebugCategory::PERMISSION_MODEL,
99
+ " %s End of tree - child(%s)\n " ,
100
+ whitespace,
101
+ child);
107
102
} else {
108
- per_process::Debug (DebugCategory::PERMISSION_MODEL,
109
- " %s End of tree: %s\n " ,
110
- whitespace,
111
- node->prefix );
103
+ node:: per_process::Debug (node:: DebugCategory::PERMISSION_MODEL,
104
+ " %s End of tree: %s\n " ,
105
+ whitespace,
106
+ node->prefix );
112
107
}
113
108
}
114
109
}
115
110
111
+ } // namespace
112
+
113
+ namespace node {
114
+
115
+ namespace permission {
116
+
116
117
// allow = '*'
117
118
// allow = '/tmp/,/home/example.js'
118
119
void FSPermission::Apply (const std::string& allow, PermissionScope scope) {
0 commit comments