diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /security/keys/proc.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'security/keys/proc.c')
-rw-r--r-- | security/keys/proc.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/security/keys/proc.c b/security/keys/proc.c index 70373966816e..49bbc97943ad 100644 --- a/security/keys/proc.c +++ b/security/keys/proc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* proc.c: proc files for key database enumeration | 1 | /* procfs files for key database enumeration |
2 | * | 2 | * |
3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Howells (dhowells@redhat.com) | 4 | * Written by David Howells (dhowells@redhat.com) |
@@ -60,9 +60,8 @@ static const struct file_operations proc_key_users_fops = { | |||
60 | .release = seq_release, | 60 | .release = seq_release, |
61 | }; | 61 | }; |
62 | 62 | ||
63 | /*****************************************************************************/ | ||
64 | /* | 63 | /* |
65 | * declare the /proc files | 64 | * Declare the /proc files. |
66 | */ | 65 | */ |
67 | static int __init key_proc_init(void) | 66 | static int __init key_proc_init(void) |
68 | { | 67 | { |
@@ -79,14 +78,13 @@ static int __init key_proc_init(void) | |||
79 | panic("Cannot create /proc/key-users\n"); | 78 | panic("Cannot create /proc/key-users\n"); |
80 | 79 | ||
81 | return 0; | 80 | return 0; |
82 | 81 | } | |
83 | } /* end key_proc_init() */ | ||
84 | 82 | ||
85 | __initcall(key_proc_init); | 83 | __initcall(key_proc_init); |
86 | 84 | ||
87 | /*****************************************************************************/ | ||
88 | /* | 85 | /* |
89 | * implement "/proc/keys" to provides a list of the keys on the system | 86 | * Implement "/proc/keys" to provide a list of the keys on the system that |
87 | * grant View permission to the caller. | ||
90 | */ | 88 | */ |
91 | #ifdef CONFIG_KEYS_DEBUG_PROC_KEYS | 89 | #ifdef CONFIG_KEYS_DEBUG_PROC_KEYS |
92 | 90 | ||
@@ -201,7 +199,7 @@ static int proc_keys_show(struct seq_file *m, void *v) | |||
201 | if (key->perm & KEY_POS_VIEW) { | 199 | if (key->perm & KEY_POS_VIEW) { |
202 | skey_ref = search_my_process_keyrings(key->type, key, | 200 | skey_ref = search_my_process_keyrings(key->type, key, |
203 | lookup_user_key_possessed, | 201 | lookup_user_key_possessed, |
204 | cred); | 202 | true, cred); |
205 | if (!IS_ERR(skey_ref)) { | 203 | if (!IS_ERR(skey_ref)) { |
206 | key_ref_put(skey_ref); | 204 | key_ref_put(skey_ref); |
207 | key_ref = make_key_ref(key, 1); | 205 | key_ref = make_key_ref(key, 1); |
@@ -293,9 +291,9 @@ static struct rb_node *key_user_first(struct rb_root *r) | |||
293 | return __key_user_next(n); | 291 | return __key_user_next(n); |
294 | } | 292 | } |
295 | 293 | ||
296 | /*****************************************************************************/ | ||
297 | /* | 294 | /* |
298 | * implement "/proc/key-users" to provides a list of the key users | 295 | * Implement "/proc/key-users" to provides a list of the key users and their |
296 | * quotas. | ||
299 | */ | 297 | */ |
300 | static int proc_key_users_open(struct inode *inode, struct file *file) | 298 | static int proc_key_users_open(struct inode *inode, struct file *file) |
301 | { | 299 | { |
@@ -351,5 +349,4 @@ static int proc_key_users_show(struct seq_file *m, void *v) | |||
351 | maxbytes); | 349 | maxbytes); |
352 | 350 | ||
353 | return 0; | 351 | return 0; |
354 | |||
355 | } | 352 | } |