mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 14:55:37 +03:00
core/cgroup: allow setting oomd xattrs from user manager
The extended attributes 'user.oomd_avoid' and 'user.oomd_omit' are used to store the setting of the ManagedOOMPrefernce property. Since these are user extended attributes, the access permissions are defined by the file permissions, and there is no need to guard this from user managers.
This commit is contained in:
parent
31a07872fa
commit
b1cd8ed420
@ -783,6 +783,9 @@ static void cgroup_xattr_apply(Unit *u) {
|
|||||||
|
|
||||||
assert(u);
|
assert(u);
|
||||||
|
|
||||||
|
/* The 'user.*' xattrs can be set from a user manager. */
|
||||||
|
cgroup_oomd_xattr_apply(u, u->cgroup_path);
|
||||||
|
|
||||||
if (!MANAGER_IS_SYSTEM(u->manager))
|
if (!MANAGER_IS_SYSTEM(u->manager))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -809,8 +812,6 @@ static void cgroup_xattr_apply(Unit *u) {
|
|||||||
else
|
else
|
||||||
unit_remove_xattr_graceful(u, NULL, xn);
|
unit_remove_xattr_graceful(u, NULL, xn);
|
||||||
}
|
}
|
||||||
|
|
||||||
cgroup_oomd_xattr_apply(u, u->cgroup_path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lookup_block_device(const char *p, dev_t *ret) {
|
static int lookup_block_device(const char *p, dev_t *ret) {
|
||||||
|
Loading…
Reference in New Issue
Block a user