Skip to content

Commit 8acf7ad

Browse files
rlee287jrjohansen
authored andcommitted
apparmor: replace misleading 'scrubbing environment' phrase in debug print
The wording of 'scrubbing environment' implied that all environment variables would be removed, when instead secure-execution mode only removes a small number of environment variables. This patch updates the wording to describe what actually occurs instead: setting AT_SECURE for ld.so's secure-execution mode. Link: https://gitlab.com/apparmor/apparmor/-/merge_requests/1315 is a merge request that does similar updating for apparmor userspace. Signed-off-by: Ryan Lee <[email protected]> Signed-off-by: John Johansen <[email protected]>
1 parent 9133493 commit 8acf7ad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

security/apparmor/domain.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,8 @@ static struct aa_label *profile_transition(const struct cred *subj_cred,
714714

715715
if (!(perms.xindex & AA_X_UNSAFE)) {
716716
if (DEBUG_ON) {
717-
dbg_printk("apparmor: scrubbing environment variables"
718-
" for %s profile=", name);
717+
dbg_printk("apparmor: setting AT_SECURE for %s profile=",
718+
name);
719719
aa_label_printk(new, GFP_KERNEL);
720720
dbg_printk("\n");
721721
}
@@ -794,8 +794,8 @@ static int profile_onexec(const struct cred *subj_cred,
794794

795795
if (!(perms.xindex & AA_X_UNSAFE)) {
796796
if (DEBUG_ON) {
797-
dbg_printk("apparmor: scrubbing environment "
798-
"variables for %s label=", xname);
797+
dbg_printk("apparmor: setting AT_SECURE for %s label=",
798+
xname);
799799
aa_label_printk(onexec, GFP_KERNEL);
800800
dbg_printk("\n");
801801
}
@@ -951,8 +951,8 @@ int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm)
951951

952952
if (unsafe) {
953953
if (DEBUG_ON) {
954-
dbg_printk("scrubbing environment variables for %s "
955-
"label=", bprm->filename);
954+
dbg_printk("setting AT_SECURE for %s label=",
955+
bprm->filename);
956956
aa_label_printk(new, GFP_KERNEL);
957957
dbg_printk("\n");
958958
}
@@ -962,8 +962,8 @@ int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm)
962962
if (label->proxy != new->proxy) {
963963
/* when transitioning clear unsafe personality bits */
964964
if (DEBUG_ON) {
965-
dbg_printk("apparmor: clearing unsafe personality "
966-
"bits. %s label=", bprm->filename);
965+
dbg_printk("apparmor: clearing unsafe personality bits. %s label=",
966+
bprm->filename);
967967
aa_label_printk(new, GFP_KERNEL);
968968
dbg_printk("\n");
969969
}

0 commit comments

Comments
 (0)