KEYS: Reinstate EPERM for a key type name beginning with a '.'
[pandora-kernel.git] / security / keys / keyctl.c
index 930988a..3947cff 100644 (file)
@@ -35,6 +35,8 @@ static int key_get_type_from_user(char *type,
                return ret;
        if (ret == 0 || ret >= len)
                return -EINVAL;
+       if (type[0] == '.')
+               return -EPERM;
        type[len - 1] = '\0';
        return 0;
 }