OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1101d58
)
eCryptfs: Fix redundant error check on ecryptfs_find_daemon_by_euid()
author
Tyler Hicks
<tyhicks@canonical.com>
Wed, 27 Feb 2013 19:37:48 +0000
(11:37 -0800)
committer
Tyler Hicks
<tyhicks@canonical.com>
Wed, 27 Feb 2013 19:41:18 +0000
(11:41 -0800)
It is sufficient to check the return code of
ecryptfs_find_daemon_by_euid(). If it returns 0, it always sets the
daemon pointer to point to a valid ecryptfs_daemon.
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Kees Cook <keescook@chromium.org>
fs/ecryptfs/messaging.c
patch
|
blob
|
history
diff --git
a/fs/ecryptfs/messaging.c
b/fs/ecryptfs/messaging.c
index
d5c7297
..
474051b
100644
(file)
--- a/
fs/ecryptfs/messaging.c
+++ b/
fs/ecryptfs/messaging.c
@@
-283,7
+283,7
@@
ecryptfs_send_message_locked(char *data, int data_len, u8 msg_type,
int rc;
rc = ecryptfs_find_daemon_by_euid(&daemon);
- if (rc
|| !daemon
) {
+ if (rc) {
rc = -ENOTCONN;
goto out;
}