Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

apparmor: move the "conflicting profile attachments" infostr to a const declaration

Instead of having a literal, making this a constant will allow for (hacky)
detection of conflicting profile attachments from inspection of the info
pointer. This is used in the next patch to augment the information provided
through domain.c:x_to_label for ix/ux fallback.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>

authored by

Ryan Lee and committed by
John Johansen
e76d733b 89a3561e

+3 -1
+3 -1
security/apparmor/domain.c
··· 28 28 #include "include/policy.h" 29 29 #include "include/policy_ns.h" 30 30 31 + static const char * const CONFLICTING_ATTACH_STR = "conflicting profile attachments"; 32 + 31 33 /** 32 34 * may_change_ptraced_domain - check if can change profile on ptraced task 33 35 * @to_cred: cred of task changing domain ··· 487 485 488 486 if (!candidate || conflict) { 489 487 if (conflict) 490 - *info = "conflicting profile attachments"; 488 + *info = CONFLICTING_ATTACH_STR; 491 489 rcu_read_unlock(); 492 490 return NULL; 493 491 }