struct lxc_list *iterator, *network;
int data_sock = handler->data_sock[0];
- if (!handler->root)
+ if (!handler->am_root)
return 0;
network = &handler->conf->network;
char netns_path[6 + LXC_NUMSTRLEN64 + 4 + LXC_NUMSTRLEN64 + 1];
bool deleted_all = true;
- if (handler->root)
+ if (handler->am_root)
return true;
*netns_path = '\0';
struct lxc_list *iterator;
struct lxc_list *network = &handler->conf->network;
- if (!handler->root)
+ if (!handler->am_root)
return 0;
lxc_list_for_each(iterator, network) {
struct lxc_list *network = &handler->conf->network;
bool deleted_all = true;
- if (!handler->root)
+ if (!handler->am_root)
return true;
lxc_list_for_each(iterator, network) {
* the parent network namespace. We won't have this capability if we are
* unprivileged.
*/
- if (!handler->root)
+ if (!handler->am_root)
return 0;
TRACE("Moving physical network devices back to parent network namespace");
struct lxc_list *network = &handler->conf->network;
int data_sock = handler->data_sock[0];
- if (handler->root)
+ if (handler->am_root)
return 0;
lxc_list_for_each(iterator, network) {
struct lxc_list *network = &handler->conf->network;
int data_sock = handler->data_sock[1];
- if (handler->root)
+ if (handler->am_root)
return 0;
lxc_list_for_each(iterator, network) {
* care if we are real root only if we are running as root so this
* should be fine.
*/
- handler->root = !am_unpriv();
+ handler->am_root = !am_unpriv();
handler->data_sock[0] = handler->data_sock[1] = -1;
handler->conf = conf;
handler->lxcpath = lxcpath;
struct lxc_list *iterator, *network;
int data_sock = handler->data_sock[1];
- if (!handler->root)
+ if (!handler->am_root)
return 0;
network = &handler->conf->network;
}
}
- if (!handler->root)
+ if (!handler->am_root)
ret = userns_exec_1(handler->conf, lxc_rmdir_onedev_wrapper,
destroy, "lxc_rmdir_onedev_wrapper");
else
}
static bool do_destroy_container(struct lxc_handler *handler) {
- if (!handler->root) {
+ if (!handler->am_root) {
if (userns_exec_1(handler->conf, storage_destroy_wrapper,
handler->conf, "storage_destroy_wrapper") < 0)
return false;
#include "namespace.h"
struct lxc_handler {
- bool root;
+ bool am_root;
pid_t pid;
char *name;
lxc_state_t state;