diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-12 10:13:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-12 10:13:55 -0400 |
commit | 5e40d331bd72447197f26525f21711c4a265b6a6 (patch) | |
tree | cfbf5efba46b0c5c5b3c8149395f721eab839945 /net | |
parent | d0ca47575ab3b41bb7f0fe5feec13c6cddb2913a (diff) | |
parent | 594081ee7145cc30a3977cb4e218f81213b63dc5 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris.
Mostly ima, selinux, smack and key handling updates.
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (65 commits)
integrity: do zero padding of the key id
KEYS: output last portion of fingerprint in /proc/keys
KEYS: strip 'id:' from ca_keyid
KEYS: use swapped SKID for performing partial matching
KEYS: Restore partial ID matching functionality for asymmetric keys
X.509: If available, use the raw subjKeyId to form the key description
KEYS: handle error code encoded in pointer
selinux: normalize audit log formatting
selinux: cleanup error reporting in selinux_nlmsg_perm()
KEYS: Check hex2bin()'s return when generating an asymmetric key ID
ima: detect violations for mmaped files
ima: fix race condition on ima_rdwr_violation_check and process_measurement
ima: added ima_policy_flag variable
ima: return an error code from ima_add_boot_aggregate()
ima: provide 'ima_appraise=log' kernel option
ima: move keyring initialization to ima_init()
PKCS#7: Handle PKCS#7 messages that contain no X.509 certs
PKCS#7: Better handling of unsupported crypto
KEYS: Overhaul key identification when searching for asymmetric keys
KEYS: Implement binary asymmetric key ID handling
...
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/crypto.c | 1 | ||||
-rw-r--r-- | net/dns_resolver/dns_key.c | 18 | ||||
-rw-r--r-- | net/rxrpc/ar-key.c | 2 |
3 files changed, 14 insertions, 7 deletions
diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c index ffeba8f9dda9..62fc5e7a9acf 100644 --- a/net/ceph/crypto.c +++ b/net/ceph/crypto.c | |||
@@ -476,7 +476,6 @@ struct key_type key_type_ceph = { | |||
476 | .preparse = ceph_key_preparse, | 476 | .preparse = ceph_key_preparse, |
477 | .free_preparse = ceph_key_free_preparse, | 477 | .free_preparse = ceph_key_free_preparse, |
478 | .instantiate = generic_key_instantiate, | 478 | .instantiate = generic_key_instantiate, |
479 | .match = user_match, | ||
480 | .destroy = ceph_key_destroy, | 479 | .destroy = ceph_key_destroy, |
481 | }; | 480 | }; |
482 | 481 | ||
diff --git a/net/dns_resolver/dns_key.c b/net/dns_resolver/dns_key.c index f380b2c58178..31cd4fd75486 100644 --- a/net/dns_resolver/dns_key.c +++ b/net/dns_resolver/dns_key.c | |||
@@ -176,11 +176,11 @@ static void dns_resolver_free_preparse(struct key_preparsed_payload *prep) | |||
176 | * The domain name may be a simple name or an absolute domain name (which | 176 | * The domain name may be a simple name or an absolute domain name (which |
177 | * should end with a period). The domain name is case-independent. | 177 | * should end with a period). The domain name is case-independent. |
178 | */ | 178 | */ |
179 | static int | 179 | static bool dns_resolver_cmp(const struct key *key, |
180 | dns_resolver_match(const struct key *key, const void *description) | 180 | const struct key_match_data *match_data) |
181 | { | 181 | { |
182 | int slen, dlen, ret = 0; | 182 | int slen, dlen, ret = 0; |
183 | const char *src = key->description, *dsp = description; | 183 | const char *src = key->description, *dsp = match_data->raw_data; |
184 | 184 | ||
185 | kenter("%s,%s", src, dsp); | 185 | kenter("%s,%s", src, dsp); |
186 | 186 | ||
@@ -209,6 +209,16 @@ no_match: | |||
209 | } | 209 | } |
210 | 210 | ||
211 | /* | 211 | /* |
212 | * Preparse the match criterion. | ||
213 | */ | ||
214 | static int dns_resolver_match_preparse(struct key_match_data *match_data) | ||
215 | { | ||
216 | match_data->lookup_type = KEYRING_SEARCH_LOOKUP_ITERATE; | ||
217 | match_data->cmp = dns_resolver_cmp; | ||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | /* | ||
212 | * Describe a DNS key | 222 | * Describe a DNS key |
213 | */ | 223 | */ |
214 | static void dns_resolver_describe(const struct key *key, struct seq_file *m) | 224 | static void dns_resolver_describe(const struct key *key, struct seq_file *m) |
@@ -242,7 +252,7 @@ struct key_type key_type_dns_resolver = { | |||
242 | .preparse = dns_resolver_preparse, | 252 | .preparse = dns_resolver_preparse, |
243 | .free_preparse = dns_resolver_free_preparse, | 253 | .free_preparse = dns_resolver_free_preparse, |
244 | .instantiate = generic_key_instantiate, | 254 | .instantiate = generic_key_instantiate, |
245 | .match = dns_resolver_match, | 255 | .match_preparse = dns_resolver_match_preparse, |
246 | .revoke = user_revoke, | 256 | .revoke = user_revoke, |
247 | .destroy = user_destroy, | 257 | .destroy = user_destroy, |
248 | .describe = dns_resolver_describe, | 258 | .describe = dns_resolver_describe, |
diff --git a/net/rxrpc/ar-key.c b/net/rxrpc/ar-key.c index 1b24191167f1..db0f39f5ef96 100644 --- a/net/rxrpc/ar-key.c +++ b/net/rxrpc/ar-key.c | |||
@@ -44,7 +44,6 @@ struct key_type key_type_rxrpc = { | |||
44 | .preparse = rxrpc_preparse, | 44 | .preparse = rxrpc_preparse, |
45 | .free_preparse = rxrpc_free_preparse, | 45 | .free_preparse = rxrpc_free_preparse, |
46 | .instantiate = generic_key_instantiate, | 46 | .instantiate = generic_key_instantiate, |
47 | .match = user_match, | ||
48 | .destroy = rxrpc_destroy, | 47 | .destroy = rxrpc_destroy, |
49 | .describe = rxrpc_describe, | 48 | .describe = rxrpc_describe, |
50 | .read = rxrpc_read, | 49 | .read = rxrpc_read, |
@@ -61,7 +60,6 @@ struct key_type key_type_rxrpc_s = { | |||
61 | .preparse = rxrpc_preparse_s, | 60 | .preparse = rxrpc_preparse_s, |
62 | .free_preparse = rxrpc_free_preparse_s, | 61 | .free_preparse = rxrpc_free_preparse_s, |
63 | .instantiate = generic_key_instantiate, | 62 | .instantiate = generic_key_instantiate, |
64 | .match = user_match, | ||
65 | .destroy = rxrpc_destroy_s, | 63 | .destroy = rxrpc_destroy_s, |
66 | .describe = rxrpc_describe, | 64 | .describe = rxrpc_describe, |
67 | }; | 65 | }; |