X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=certs%2Fblacklist.c;h=bffe4c6f4a9e204d215119278d419bb491d2d7c8;hb=d94d14008efed91a6de5de03627e0cdadb32c588;hp=2719fb2fbc1c9044d40730dbd0e5c7adfae187a4;hpb=0b2d443bf52756a9c364a41492dae537bc62683f;p=linux-2.6-microblaze.git diff --git a/certs/blacklist.c b/certs/blacklist.c index 2719fb2fbc1c..bffe4c6f4a9e 100644 --- a/certs/blacklist.c +++ b/certs/blacklist.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "blacklist.h" @@ -37,7 +38,7 @@ static int blacklist_vet_description(const char *desc) found_colon: desc++; for (; *desc; desc++) { - if (!isxdigit(*desc)) + if (!isxdigit(*desc) || isupper(*desc)) return -EINVAL; n++; } @@ -156,13 +157,12 @@ static int __init blacklist_init(void) blacklist_keyring = keyring_alloc(".blacklist", - 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 | - KEY_FLAG_KEEP, + KEY_ALLOC_SET_KEEP, NULL, NULL); if (IS_ERR(blacklist_keyring)) panic("Can't allocate system blacklist keyring\n");