diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-08-24 20:43:59 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-08-24 20:43:59 +0200 |
commit | f9b9503e757b5fc69ab93bc1e4f7e80de85f0831 (patch) | |
tree | 7db8dbcc1d8f75d953d67a7918fc2bc083951791 /ncr-key.c | |
parent | 51a92d357aebc84b45cf8c90061319d22b170bb5 (diff) | |
download | cryptodev-linux-f9b9503e757b5fc69ab93bc1e4f7e80de85f0831.tar.gz cryptodev-linux-f9b9503e757b5fc69ab93bc1e4f7e80de85f0831.tar.xz cryptodev-linux-f9b9503e757b5fc69ab93bc1e4f7e80de85f0831.zip |
Base access decisions only on capable(), not euid
Diffstat (limited to 'ncr-key.c')
-rw-r--r-- | ncr-key.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -311,7 +311,7 @@ fail: int ncr_key_assign_flags(struct key_item_st* item, unsigned int flags) { - if (current_euid() != 0 && (flags & NCR_KEY_FLAG_WRAPPING) != 0) + if (!capable(CAP_SYS_ADMIN) && (flags & NCR_KEY_FLAG_WRAPPING) != 0) return -EPERM; item->flags = flags; return 0; |