]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Do proper escaping of cgroup resource partitions
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 26 Apr 2013 09:50:24 +0000 (10:50 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 26 Apr 2013 12:52:02 +0000 (13:52 +0100)
commitf3662737b1bd6451597b9fc11d8f52be87b15871
treeb965ec96c8b8b910d23e2b4fe3b0dfd3023115fa
parent9ddfe7eea6485f4e6cec230de15e547993768296
Do proper escaping of cgroup resource partitions

If a user cgroup name begins with "cgroup.", "_" or with any of
the controllers from /proc/cgroups followed by a dot, then they
need to be prefixed with a single underscore. eg if there is
an object "cpu.service", then this would end up as "_cpu.service"
in the cgroup filesystem tree, however, "waldo.service" would
stay "waldo.service", at least as long as nobody comes up with
a cgroup controller called "waldo".

Since we require a '.XXXX' suffix on all partitions, there is
no scope for clashing with the kernel 'tasks' and 'release_agent'
files.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/vircgroup.c
tests/vircgroupmock.c
tests/vircgrouptest.c