Fix enabling sysfs feature by default
The problem caused by this bug is if some other features are
explicitly set, SYSFS is not enabled by default.
From Solar Designer:
"""
This commit looks buggy to me:
http://git.openvz.org/?p=vzctl;a=commit;h=vzctl-3.0.23-262-g2660464
- if (!(res->env.features_known & VE_FEATURE_SYSFS) &&
- sysfs_required(res)) {
+ /* sysfs enabled by default, unless explicitly disabled */
+ if (! res->env.features_known & VE_FEATURE_SYSFS) {
create_param.feature_mask |= VE_FEATURE_SYSFS;
create_param.known_features |= VE_FEATURE_SYSFS;
}
Notice how the braces were dropped. This results in VE_FEATURE_SYSFS (a
feature bit in a bitmask?) being checked against a boolean value (not
against a bitmask anymore).
"""
Reported-by: Solar Designer <solar@openwall.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed