linux/security/keys
Jeff Layton 9f6ed2ca25 keys: add a "logon" key type
For CIFS, we want to be able to store NTLM credentials (aka username
and password) in the keyring. We do not, however want to allow users
to fetch those keys back out of the keyring since that would be a
security risk.

Unfortunately, due to the nuances of key permission bits, it's not
possible to do this. We need to grant search permissions so the kernel
can find these keys, but that also implies permissions to read the
payload.

Resolve this by adding a new key_type. This key type is essentially
the same as key_type_user, but does not define a .read op. This
prevents the payload from ever being visible from userspace. This
key type also vets the description to ensure that it's "qualified"
by checking to ensure that it has a ':' in it that is preceded by
other characters.

Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
2012-01-17 22:39:40 -06:00
..
encrypted-keys encrypted-keys: module build fixes 2011-11-16 14:23:14 -05:00
compat.c Cross Memory Attach 2011-10-31 17:30:44 -07:00
gc.c KEYS: Correctly destroy key payloads when their keytype is removed 2011-08-23 09:57:37 +10:00
internal.h keys: add a "logon" key type 2012-01-17 22:39:40 -06:00
key.c keys: add a "logon" key type 2012-01-17 22:39:40 -06:00
keyctl.c Cross Memory Attach 2011-10-31 17:30:44 -07:00
keyring.c KEYS: __key_link() should use the RCU deref wrapper for keyring payloads 2011-08-23 09:57:34 +10:00
Makefile encrypted-keys: create encrypted-keys directory 2011-09-14 15:22:26 -04:00
permission.c KEYS: Fix up comments in key management code 2011-01-21 14:59:30 -08:00
proc.c KEYS: Improve /proc/keys 2011-03-17 11:59:32 +11:00
process_keys.c KEYS: keyctl_get_keyring_ID() should create a session keyring if create flag set 2011-08-23 09:57:34 +10:00
request_key_auth.c KEYS: Don't return EAGAIN to keyctl_assume_authority() 2011-06-14 15:03:29 +10:00
request_key.c KEYS: Fix error handling in construct_key_and_link() 2011-06-21 18:31:45 -07:00
sysctl.c sysctl: Drop & in front of every proc_handler. 2009-11-18 08:37:40 -08:00
trusted.c security: follow rename pack_hex_byte() to hex_byte_pack() 2011-10-31 17:30:56 -07:00
trusted.h trusted-keys: rename trusted_defined files to trusted 2011-01-24 10:14:22 +11:00
user_defined.c keys: add a "logon" key type 2012-01-17 22:39:40 -06:00