Commit 87302700 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of...

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  TOMOYO: Fix incomplete read of /sys/kernel/security/tomoyo/profile
parents 5c723ba5 4d818971
...@@ -710,8 +710,10 @@ static void tomoyo_read_profile(struct tomoyo_io_buffer *head) ...@@ -710,8 +710,10 @@ static void tomoyo_read_profile(struct tomoyo_io_buffer *head)
head->r.index++) head->r.index++)
if (ns->profile_ptr[head->r.index]) if (ns->profile_ptr[head->r.index])
break; break;
if (head->r.index == TOMOYO_MAX_PROFILES) if (head->r.index == TOMOYO_MAX_PROFILES) {
head->r.eof = true;
return; return;
}
head->r.step++; head->r.step++;
break; break;
case 2: case 2:
...@@ -723,6 +725,7 @@ static void tomoyo_read_profile(struct tomoyo_io_buffer *head) ...@@ -723,6 +725,7 @@ static void tomoyo_read_profile(struct tomoyo_io_buffer *head)
tomoyo_io_printf(head, "%u-COMMENT=", index); tomoyo_io_printf(head, "%u-COMMENT=", index);
tomoyo_set_string(head, comment ? comment->name : ""); tomoyo_set_string(head, comment ? comment->name : "");
tomoyo_set_lf(head); tomoyo_set_lf(head);
tomoyo_print_namespace(head);
tomoyo_io_printf(head, "%u-PREFERENCE={ ", index); tomoyo_io_printf(head, "%u-PREFERENCE={ ", index);
for (i = 0; i < TOMOYO_MAX_PREF; i++) for (i = 0; i < TOMOYO_MAX_PREF; i++)
tomoyo_io_printf(head, "%s=%u ", tomoyo_io_printf(head, "%s=%u ",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment