]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - security/tomoyo/util.c
TOMOYO: Use common code for domain transition control.
[net-next-2.6.git] / security / tomoyo / util.c
index 945eeefbbdfe938a9e901418cc2cbaf1682314ce..12a768e6ee3f2f156a92dd7f31214de98be0c244 100644 (file)
@@ -92,7 +92,7 @@ bool tomoyo_parse_name_union(const char *filename,
        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 @@ bool tomoyo_parse_number_union(char *data, struct tomoyo_number_union *num)
        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;
        }
@@ -844,7 +844,7 @@ int tomoyo_init_request_info(struct tomoyo_request_info *r,
  *
  * Returns the last word of a line.
  */
-static const char *tomoyo_last_word(const char *name)
+const char *tomoyo_last_word(const char *name)
 {
        const char *cp = strrchr(name, ' ');
        if (cp)