summaryrefslogtreecommitdiffstats
path: root/ncr-key.c
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-24 20:43:59 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-24 20:43:59 +0200
commitf9b9503e757b5fc69ab93bc1e4f7e80de85f0831 (patch)
tree7db8dbcc1d8f75d953d67a7918fc2bc083951791 /ncr-key.c
parent51a92d357aebc84b45cf8c90061319d22b170bb5 (diff)
downloadcryptodev-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ncr-key.c b/ncr-key.c
index 3860f7f..a7019f5 100644
--- a/ncr-key.c
+++ b/ncr-key.c
@@ -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;