]> git.proxmox.com Git - mirror_lxc.git/commit
handle unprivileged user calls more gracefully (v3)
authorS.Çağlar Onur <caglar@10ur.org>
Sun, 19 Jan 2014 20:28:05 +0000 (15:28 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 20 Jan 2014 20:14:44 +0000 (15:14 -0500)
commitc868b261b2e08f29c5e6c5ede2e6a2c3e335ee4d
tree3703faf4494d8d8c7567050275b24fbd52fc68f9
parent9daf6f5d01d49e656190f9b94467605d5fee6f98
handle unprivileged user calls more gracefully (v3)

Return an error if the function is not supposed to be called by an unprivileged user.
Otherwise those calls fail in the middle of their execution with different reasons.

changes since v2:
- am_unpriv is now a simple geteuid check,
- API functions are now providing error messages,
- lxc-info, lxc-attach are now checking geteuidi,
- lxc-ls is now calling get_ips only if the container is running

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc-ls
src/lxc/lxc_attach.c
src/lxc/lxc_info.c
src/lxc/lxccontainer.c