if (lxc_config_value_empty(value))
return clr_config_cgroup_dir(key, lxc_conf, NULL);
+ if (abspath(value))
+ return syserrno_set(-EINVAL, "%s paths may not be absolute", key);
+
if (dotdot(value))
return syserrno_set(-EINVAL, "%s paths may not walk upwards via \"../\"", key);
if (lxc_config_value_empty(value))
return clr_config_cgroup_monitor_dir(key, lxc_conf, NULL);
+ if (abspath(value))
+ return syserrno_set(-EINVAL, "%s paths may not be absolute", key);
+
if (dotdot(value))
return syserrno_set(-EINVAL, "%s paths may not walk upwards via \"../\"", key);
if (lxc_config_value_empty(value))
return clr_config_cgroup_monitor_pivot_dir(key, lxc_conf, NULL);
+ if (abspath(value))
+ return syserrno_set(-EINVAL, "%s paths may not be absolute", key);
+
if (dotdot(value))
return syserrno_set(-EINVAL, "%s paths may not walk upwards via \"../\"", key);
if (lxc_config_value_empty(value))
return clr_config_cgroup_container_dir(key, lxc_conf, NULL);
+ if (abspath(value))
+ return syserrno_set(-EINVAL, "%s paths may not be absolute", key);
+
if (dotdot(value))
return syserrno_set(-EINVAL, "%s paths may not walk upwards via \"../\"", key);
if (lxc_config_value_empty(value))
return clr_config_cgroup_container_inner_dir(key, lxc_conf, NULL);
+ if (abspath(value))
+ return syserrno_set(-EINVAL, "%s paths may not be absolute", key);
+
if (strchr(value, '/') || strequal(value, ".") || strequal(value, ".."))
return log_error_errno(-EINVAL, EINVAL, "lxc.cgroup.dir.container.inner must be a single directory name");