From 78ced79e15ce740e3c2713ffb43737b5c98a3fb6 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 27 Mar 2013 16:32:46 +0400 Subject: [PATCH] caps: Print error message on size mismatch So when we fail print error thus a user would know where exactly it failed. Signed-off-by: Cyrill Gorcunov CC: Andrey Vagin Signed-off-by: Pavel Emelyanov --- cr-restore.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cr-restore.c b/cr-restore.c index 7f55d599a..3d05a227d 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -1481,8 +1481,12 @@ static int prepare_creds(int pid, struct task_restore_core_args *args) if (ret < 0) return ret; - if (!verify_cap_size(ce)) + if (!verify_cap_size(ce)) { + pr_err("Caps size mismatch %d %d %d %d\n", + (int)ce->n_cap_inh, (int)ce->n_cap_eff, + (int)ce->n_cap_prm, (int)ce->n_cap_bnd); return -1; + } args->creds = *ce; args->creds.cap_inh = args->cap_inh;