TOMOYO: Merge path_group and number_group.
Use common code for "path_group" and "number_group".
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
diff --git a/security/tomoyo/util.c b/security/tomoyo/util.c
index 945eeef..20abba2 100644
--- a/security/tomoyo/util.c
+++ b/security/tomoyo/util.c
@@ -92,7 +92,7 @@
if (!tomoyo_correct_word(filename))
return false;
if (filename[0] == '@') {
- ptr->group = tomoyo_get_path_group(filename + 1);
+ ptr->group = tomoyo_get_group(filename + 1, TOMOYO_PATH_GROUP);
ptr->is_group = true;
return ptr->group != NULL;
}
@@ -117,7 +117,7 @@
if (data[0] == '@') {
if (!tomoyo_correct_word(data))
return false;
- num->group = tomoyo_get_number_group(data + 1);
+ num->group = tomoyo_get_group(data + 1, TOMOYO_NUMBER_GROUP);
num->is_group = true;
return num->group != NULL;
}