Commit d54d9610 by Christian Brauner Committed by GitHub

Merge pull request #1400 from bneumeier/master

Allow build without sys/capability.h
parents 9eed569a df11e022
...@@ -898,7 +898,11 @@ static int do_start(void *data) ...@@ -898,7 +898,11 @@ static int do_start(void *data)
* further above. Only drop groups if we can, so ensure that we * further above. Only drop groups if we can, so ensure that we
* have necessary privilege. * have necessary privilege.
*/ */
#if HAVE_SYS_CAPABILITY_H
have_cap_setgid = lxc_cap_is_set(CAP_SETGID, CAP_EFFECTIVE); have_cap_setgid = lxc_cap_is_set(CAP_SETGID, CAP_EFFECTIVE);
#else
have_cap_setgid = false;
#endif
if (lxc_list_empty(&handler->conf->id_map) && have_cap_setgid) { if (lxc_list_empty(&handler->conf->id_map) && have_cap_setgid) {
if (lxc_setgroups(0, NULL) < 0) if (lxc_setgroups(0, NULL) < 0)
goto out_warn_father; goto out_warn_father;
......
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