Skip to content

Commit 432e9f7

Browse files
committed
lsm: use the user provided lsm label
Currently CRIU has the possibility to specify a LSM label during restore. Unfortunately the information is completely ignored in the case of SELinux. This change selects the lsm label from the user if it is provided and else the label from the checkpoint image is used. Signed-off-by: Adrian Reber <areber@redhat.com>
1 parent d4585a0 commit 432e9f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

criu/lsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ int render_lsm_profile(char *profile, char **val)
370370
case LSMTYPE__APPARMOR:
371371
return render_aa_profile(val, profile);
372372
case LSMTYPE__SELINUX:
373-
if (asprintf(val, "%s", profile) < 0) {
373+
if (asprintf(val, "%s", opts.lsm_supplied ? opts.lsm_profile : profile) < 0) {
374374
*val = NULL;
375375
return -1;
376376
}

0 commit comments

Comments
 (0)