[lxc-devel] [PATCH 0/3] Make python scripts deal better when non-root
Stéphane Graber
stgraber at ubuntu.com
Tue Dec 4 21:17:06 UTC 2012
The LXC API currently doesn't work terribly well when the user isn't root for
a variety of reasons.
The python binding therfore immediately returns an exception if a non-root
user tries to access a container object (as the C calls would fail anyway).
These commits update the various python scripts to check whether the user is
root before invoking the python module so that we can return a nicer error
message to the user, suggesting the use of sudo to run the script as root.
Stéphane Graber (3):
lxc-start-ephemeral: Use argparse errors
lxc-ls: Show a simple error message when non-root
lxc-device: Show an error message when non-root
src/lxc/lxc-device | 6 ++++++
src/lxc/lxc-ls | 7 +++++++
src/lxc/lxc-start-ephemeral.in | 11 ++++-------
3 files changed, 17 insertions(+), 7 deletions(-)
--
1.8.0
More information about the lxc-devel
mailing list