From a4b0d69a8e185ecf17eeff83de9fd8c448db2552 Mon Sep 17 00:00:00 2001 From: James Morris Date: Sat, 22 Oct 2011 22:23:58 +0200 Subject: [PATCH] --- yaml --- r: 264572 b: refs/heads/master c: c45ed235abf1b0b6666417e3c394f18717976acd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/security/tomoyo/common.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 10ef67374791..02123c6271c1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0e94ae17c857b3835a2b8ea46ce44b5da4e2cc5d +refs/heads/master: c45ed235abf1b0b6666417e3c394f18717976acd diff --git a/trunk/security/tomoyo/common.c b/trunk/security/tomoyo/common.c index 365f3bddee79..d41900de8a69 100644 --- a/trunk/security/tomoyo/common.c +++ b/trunk/security/tomoyo/common.c @@ -502,8 +502,10 @@ static struct tomoyo_profile *tomoyo_assign_profile TOMOYO_CONFIG_WANT_REJECT_LOG; memset(ptr->config, TOMOYO_CONFIG_USE_DEFAULT, sizeof(ptr->config)); - ptr->pref[TOMOYO_PREF_MAX_AUDIT_LOG] = 1024; - ptr->pref[TOMOYO_PREF_MAX_LEARNING_ENTRY] = 2048; + ptr->pref[TOMOYO_PREF_MAX_AUDIT_LOG] = + CONFIG_SECURITY_TOMOYO_MAX_AUDIT_LOG; + ptr->pref[TOMOYO_PREF_MAX_LEARNING_ENTRY] = + CONFIG_SECURITY_TOMOYO_MAX_ACCEPT_ENTRY; mb(); /* Avoid out-of-order execution. */ ns->profile_ptr[profile] = ptr; entry = NULL; @@ -2589,6 +2591,7 @@ ssize_t tomoyo_write_control(struct tomoyo_io_buffer *head, return -EFAULT; if (mutex_lock_interruptible(&head->io_sem)) return -EINTR; + head->read_user_buf_avail = 0; idx = tomoyo_read_lock(); /* Read a line and dispatch it to the policy handler. */ while (avail_len > 0) {