]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Return immediately in save_phys_nics if not run as root 719/head
authorLi Qiu <li.qiu@nomovok.com>
Fri, 11 Dec 2015 05:54:10 +0000 (07:54 +0200)
committerLi Qiu <li.qiu@nomovok.com>
Fri, 11 Dec 2015 06:24:12 +0000 (08:24 +0200)
Physical nic is not instantiated in lxc_create_network

Signed-off-by: Li Qiu <li.qiu@nomovok.com>
src/lxc/start.c

index 2606dd1d67e4dd8a3a2660dffd6aa4642f88145e..52315cbb59d22ae087ce8fca6b166322183831e5 100644 (file)
@@ -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;