mirror of
git://github.com/lxc/lxc
synced 2025-09-03 16:10:31 +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:
@@ -856,6 +856,10 @@ out_warn_father:
|
|||||||
static int save_phys_nics(struct lxc_conf *conf)
|
static int save_phys_nics(struct lxc_conf *conf)
|
||||||
{
|
{
|
||||||
struct lxc_list *iterator;
|
struct lxc_list *iterator;
|
||||||
|
int am_root = (getuid() == 0);
|
||||||
|
|
||||||
|
if (!am_root)
|
||||||
|
return 0;
|
||||||
|
|
||||||
lxc_list_for_each(iterator, &conf->network) {
|
lxc_list_for_each(iterator, &conf->network) {
|
||||||
struct lxc_netdev *netdev = iterator->elem;
|
struct lxc_netdev *netdev = iterator->elem;
|
||||||
|
Reference in New Issue
Block a user