]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/start.c
fix lxc-attach returned error
authorDaniel Lezcano <daniel.lezcano@free.fr>
Mon, 22 Mar 2010 10:08:34 +0000 (11:08 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Mon, 22 Mar 2010 10:08:34 +0000 (11:08 +0100)
commit0a3ec350143c95031e5d96fe4a033cfb0772d27f
treeafba97cd45ea3c11b7d82d6b9e9944c57707d614
parent81c75799cc753a51afb6e17979b2923212986ad3
fix lxc-attach returned error

When we try to attach to a container belonging to another user than us,
the command fails as expected but the return code is wrong, so we have
an "unknown error" instead of "permission denied".

The culprit is:

-                     strerror(command.answer.ret));
+                     strerror(-command.answer.ret));

The rest of the code is indentation without code impact.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Michel Normand <normand@fr.ibm.com>
src/lxc/commands.c
src/lxc/lxc_attach.c
src/lxc/start.c