aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/common.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-06-16 03:26:38 -0400
committerJames Morris <jmorris@namei.org>2010-08-02 01:34:34 -0400
commit71c282362d0672235c5205a7db1f3ac3fcf32981 (patch)
treeb359947179fad844767fc5b54a0761b7353babc1 /security/tomoyo/common.c
parentd795ef9e751b72c94600c91e31bdaef55987a9f6 (diff)
TOMOYO: Remove wrapper function for reading keyword.
Keyword strings are read-only. We can directly access them to reduce code size. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/common.c')
-rw-r--r--security/tomoyo/common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index 1a22fff89e70..ba8360382895 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -812,7 +812,7 @@ static bool tomoyo_print_path_acl(struct tomoyo_io_buffer *head,
812 continue; 812 continue;
813 pos = head->read_avail; 813 pos = head->read_avail;
814 if (!tomoyo_io_printf(head, "allow_%s ", 814 if (!tomoyo_io_printf(head, "allow_%s ",
815 tomoyo_path2keyword(bit)) || 815 tomoyo_path_keyword[bit]) ||
816 !tomoyo_print_name_union(head, &ptr->name) || 816 !tomoyo_print_name_union(head, &ptr->name) ||
817 !tomoyo_io_printf(head, "\n")) 817 !tomoyo_io_printf(head, "\n"))
818 goto out; 818 goto out;
@@ -845,7 +845,7 @@ static bool tomoyo_print_path2_acl(struct tomoyo_io_buffer *head,
845 continue; 845 continue;
846 pos = head->read_avail; 846 pos = head->read_avail;
847 if (!tomoyo_io_printf(head, "allow_%s ", 847 if (!tomoyo_io_printf(head, "allow_%s ",
848 tomoyo_path22keyword(bit)) || 848 tomoyo_path2_keyword[bit]) ||
849 !tomoyo_print_name_union(head, &ptr->name1) || 849 !tomoyo_print_name_union(head, &ptr->name1) ||
850 !tomoyo_print_name_union(head, &ptr->name2) || 850 !tomoyo_print_name_union(head, &ptr->name2) ||
851 !tomoyo_io_printf(head, "\n")) 851 !tomoyo_io_printf(head, "\n"))
@@ -879,7 +879,7 @@ static bool tomoyo_print_path_number_acl(struct tomoyo_io_buffer *head,
879 continue; 879 continue;
880 pos = head->read_avail; 880 pos = head->read_avail;
881 if (!tomoyo_io_printf(head, "allow_%s", 881 if (!tomoyo_io_printf(head, "allow_%s",
882 tomoyo_path_number2keyword(bit)) || 882 tomoyo_path_number_keyword[bit]) ||
883 !tomoyo_print_name_union(head, &ptr->name) || 883 !tomoyo_print_name_union(head, &ptr->name) ||
884 !tomoyo_print_number_union(head, &ptr->number) || 884 !tomoyo_print_number_union(head, &ptr->number) ||
885 !tomoyo_io_printf(head, "\n")) 885 !tomoyo_io_printf(head, "\n"))
@@ -913,7 +913,7 @@ static bool tomoyo_print_mkdev_acl(struct tomoyo_io_buffer *head,
913 continue; 913 continue;
914 pos = head->read_avail; 914 pos = head->read_avail;
915 if (!tomoyo_io_printf(head, "allow_%s", 915 if (!tomoyo_io_printf(head, "allow_%s",
916 tomoyo_mkdev2keyword(bit)) || 916 tomoyo_mkdev_keyword[bit]) ||
917 !tomoyo_print_name_union(head, &ptr->name) || 917 !tomoyo_print_name_union(head, &ptr->name) ||
918 !tomoyo_print_number_union(head, &ptr->mode) || 918 !tomoyo_print_number_union(head, &ptr->mode) ||
919 !tomoyo_print_number_union(head, &ptr->major) || 919 !tomoyo_print_number_union(head, &ptr->major) ||