[CRIU] [PATCH] caps: Print error message on size mismatch
Pavel Emelyanov
xemul at parallels.com
Wed Mar 27 08:32:56 EDT 2013
On 03/27/2013 03:54 PM, Cyrill Gorcunov wrote:
> So when we fail print error thus a user would know
> where exactly it failed.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> CC: Andrey Vagin <avagin at openvz.org>
> ---
> cr-restore.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/cr-restore.c b/cr-restore.c
> index 835cce1..9779031 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -1473,8 +1473,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;
>
applied
More information about the CRIU
mailing list