Commit aafeda82 by Stéphane Graber

Merge pull request #719 from liqiu/li-dev2

Return immediately in save_phys_nics if not run as root
parents dbadf422 40f2f8a2
......@@ -856,7 +856,11 @@ out_warn_father:
static int save_phys_nics(struct lxc_conf *conf)
{
struct lxc_list *iterator;
int am_root = (getuid() == 0);
if (!am_root)
return 0;
lxc_list_for_each(iterator, &conf->network) {
struct lxc_netdev *netdev = iterator->elem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment