apparmor: fix fully qualified name parsing
currently apparmor name parsing is only correctly handling :<NS>:<profile> but :<NS>://<profile> is also a valid form and what is exported to userspace. Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Родитель
3eea57c26e
Коммит
2654bfbc2b
|
@ -45,8 +45,10 @@ char *aa_split_fqname(char *fqname, char **ns_name)
|
||||||
*ns_name = skip_spaces(&name[1]);
|
*ns_name = skip_spaces(&name[1]);
|
||||||
if (split) {
|
if (split) {
|
||||||
/* overwrite ':' with \0 */
|
/* overwrite ':' with \0 */
|
||||||
*split = 0;
|
*split++ = 0;
|
||||||
name = skip_spaces(split + 1);
|
if (strncmp(split, "//", 2) == 0)
|
||||||
|
split += 2;
|
||||||
|
name = skip_spaces(split);
|
||||||
} else
|
} else
|
||||||
/* a ns name without a following profile is allowed */
|
/* a ns name without a following profile is allowed */
|
||||||
name = NULL;
|
name = NULL;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче