[CRIU] [PATCH 1/2] lsm: report more errors when rendering profile fails

Tycho Andersen tycho.andersen at canonical.com
Mon Feb 29 11:19:10 PST 2016


From: Tycho Andersen <tycho at tycho.ws>

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 criu/lsm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/criu/lsm.c b/criu/lsm.c
index aee733c..5443860 100644
--- a/criu/lsm.c
+++ b/criu/lsm.c
@@ -192,6 +192,7 @@ int render_lsm_profile(char *profile, char **val)
 	switch (lsmtype) {
 	case LSMTYPE__APPARMOR:
 		if (strcmp(profile, "unconfined") != 0 && asprintf(val, "changeprofile %s", profile) < 0) {
+			pr_err("allocating lsm profile failed");
 			*val = NULL;
 			return -1;
 		}
@@ -203,6 +204,7 @@ int render_lsm_profile(char *profile, char **val)
 		}
 		break;
 	default:
+		pr_err("can't render profile %s for lsmtype %d\n", profile, LSMTYPE__NO_LSM);
 		return -1;
 	}
 
-- 
2.7.0



More information about the CRIU mailing list