Skip to content
Snippets Groups Projects
Commit a6cb0ab7 authored by Mickaël Salaün's avatar Mickaël Salaün Committed by David Howells
Browse files

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: default avatarMickaël Salaün <mic@linux.microsoft.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>
parent 4993e1f9
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/uidgid.h>
#include <keys/system_keyring.h> #include <keys/system_keyring.h>
#include "blacklist.h" #include "blacklist.h"
...@@ -156,8 +157,7 @@ static int __init blacklist_init(void) ...@@ -156,8 +157,7 @@ static int __init blacklist_init(void)
blacklist_keyring = blacklist_keyring =
keyring_alloc(".blacklist", keyring_alloc(".blacklist",
KUIDT_INIT(0), KGIDT_INIT(0), GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, current_cred(),
current_cred(),
(KEY_POS_ALL & ~KEY_POS_SETATTR) | (KEY_POS_ALL & ~KEY_POS_SETATTR) |
KEY_USR_VIEW | KEY_USR_READ | KEY_USR_VIEW | KEY_USR_READ |
KEY_USR_SEARCH, KEY_USR_SEARCH,
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/cred.h> #include <linux/cred.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/uidgid.h>
#include <linux/verification.h> #include <linux/verification.h>
#include <keys/asymmetric-type.h> #include <keys/asymmetric-type.h>
#include <keys/system_keyring.h> #include <keys/system_keyring.h>
...@@ -98,7 +99,7 @@ static __init int system_trusted_keyring_init(void) ...@@ -98,7 +99,7 @@ static __init int system_trusted_keyring_init(void)
builtin_trusted_keys = builtin_trusted_keys =
keyring_alloc(".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_POS_ALL & ~KEY_POS_SETATTR) |
KEY_USR_VIEW | KEY_USR_READ | KEY_USR_SEARCH), KEY_USR_VIEW | KEY_USR_READ | KEY_USR_SEARCH),
KEY_ALLOC_NOT_IN_QUOTA, KEY_ALLOC_NOT_IN_QUOTA,
...@@ -109,7 +110,7 @@ static __init int system_trusted_keyring_init(void) ...@@ -109,7 +110,7 @@ static __init int system_trusted_keyring_init(void)
#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING #ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
secondary_trusted_keys = secondary_trusted_keys =
keyring_alloc(".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_POS_ALL & ~KEY_POS_SETATTR) |
KEY_USR_VIEW | KEY_USR_READ | KEY_USR_SEARCH | KEY_USR_VIEW | KEY_USR_READ | KEY_USR_SEARCH |
KEY_USR_WRITE), KEY_USR_WRITE),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment