2
0
mirror of git://github.com/lxc/lxc synced 2025-08-30 18:49:35 +00:00

Merge pull request #719 from liqiu/li-dev2

Return immediately in save_phys_nics if not run as root
This commit is contained in:
Stéphane Graber
2015-12-15 10:56:12 -05:00

View 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;