summaryrefslogtreecommitdiffstats
path: root/security/tomoyo/common.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-06-25 05:22:09 +0200
committerJames Morris <jmorris@namei.org>2010-08-02 07:34:55 +0200
commit0849e3ba53c3ef603dffa9758a73e07ed186a937 (patch)
tree5aaaa02db9be90287bfcc6e00e48d0b50c18d6cd /security/tomoyo/common.c
parentTOMOYO: Rename symbols. (diff)
downloadlinux-0849e3ba53c3ef603dffa9758a73e07ed186a937.tar.xz
linux-0849e3ba53c3ef603dffa9758a73e07ed186a937.zip
TOMOYO: Add missing poll() hook.
Commit 1dae08c "TOMOYO: Add interactive enforcing mode." forgot to register poll() hook. As a result, /usr/sbin/tomoyo-queryd was doing busy loop. 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.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index 65c18af3ffe5..bff63929e53d 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -1898,6 +1898,23 @@ int tomoyo_open_control(const u8 type, struct file *file)
}
/**
+ * tomoyo_poll_control - poll() for /sys/kernel/security/tomoyo/ interface.
+ *
+ * @file: Pointer to "struct file".
+ * @wait: Pointer to "poll_table".
+ *
+ * Waits for read readiness.
+ * /sys/kernel/security/tomoyo/query is handled by /usr/sbin/tomoyo-queryd .
+ */
+int tomoyo_poll_control(struct file *file, poll_table *wait)
+{
+ struct tomoyo_io_buffer *head = file->private_data;
+ if (!head->poll)
+ return -ENOSYS;
+ return head->poll(file, wait);
+}
+
+/**
* tomoyo_read_control - read() for /sys/kernel/security/tomoyo/ interface.
*
* @file: Pointer to "struct file".