summaryrefslogtreecommitdiffstats
path: root/certs/system_keyring.c
diff options
context:
space:
mode:
authorMickaël Salaün <mic@linux.microsoft.com>2020-11-20 19:04:25 +0100
committerDavid Howells <dhowells@redhat.com>2021-01-21 16:16:10 +0000
commita6cb0ab7daf78ce87d70212dfdb01a622d833500 (patch)
tree41e2022ab814ab0565775bbef9fbdd2cf9c2d025 /certs/system_keyring.c
parent4993e1f9479a4161fd7d93e2b8b30b438f00cb0f (diff)
certs: Replace K{U,G}IDT_INIT() with GLOBAL_ROOT_{U,G}ID
Align with the new macros and add appropriate include files. Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com> Signed-off-by: David Howells <dhowells@redhat.com> Cc: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'certs/system_keyring.c')
-rw-r--r--certs/system_keyring.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/certs/system_keyring.c b/certs/system_keyring.c
index 798291177186..4b693da488f1 100644
--- a/certs/system_keyring.c
+++ b/certs/system_keyring.c
@@ -11,6 +11,7 @@
#include <linux/cred.h>
#include <linux/err.h>
#include <linux/slab.h>
+#include <linux/uidgid.h>
#include <linux/verification.h>
#include <keys/asymmetric-type.h>
#include <keys/system_keyring.h>
@@ -98,7 +99,7 @@ static __init int system_trusted_keyring_init(void)
builtin_trusted_keys =
keyring_alloc(".builtin_trusted_keys",
- KUIDT_INIT(0), KGIDT_INIT(0), current_cred(),
+ GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, current_cred(),
((KEY_POS_ALL & ~KEY_POS_SETATTR) |
KEY_USR_VIEW | KEY_USR_READ | KEY_USR_SEARCH),
KEY_ALLOC_NOT_IN_QUOTA,
@@ -109,7 +110,7 @@ static __init int system_trusted_keyring_init(void)
#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
secondary_trusted_keys =
keyring_alloc(".secondary_trusted_keys",
- KUIDT_INIT(0), KGIDT_INIT(0), current_cred(),
+ GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, current_cred(),
((KEY_POS_ALL & ~KEY_POS_SETATTR) |
KEY_USR_VIEW | KEY_USR_READ | KEY_USR_SEARCH |
KEY_USR_WRITE),