platform_system_core/libprocessgroup
Suren Baghdasaryan e3ad888011 libprocessgroup: Fix cgroup directory ownership setup
When cgroup directory is created its user and ownership gets set, however
because previous code was storing getpwnam() return value the second
invocation would effectively override the previous ones result. Fix this
by copying necessary results. Also change getpwnam() to getgrnam() when
group name is converted into gid. getpwnam() works because of the way
Android uses these ids, however more generally this is incorrect and
getgrnam() should be used instead.

Bug: 111307099
Test: verified user/group membership of the cgroup directories
Change-Id: I78668bc1a36a74f53d8e9825e2d06e3e09501e7a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-06 14:28:23 -08:00
..
include/processgroup libprocessgroup: Add support for task profiles 2019-02-03 16:48:35 +00:00
Android.bp libprocessgroup: Add support for task profiles 2019-02-03 16:48:35 +00:00
cgroup_map.cpp libprocessgroup: Fix cgroup directory ownership setup 2019-02-06 14:28:23 -08:00
cgroup_map.h libprocessgroup: Add support for task profiles 2019-02-03 16:48:35 +00:00
OWNERS Add OWNERS for libprocessgroup 2018-09-14 11:13:22 -07:00
processgroup.cpp libprocessgroup: Add support for task profiles 2019-02-03 16:48:35 +00:00
sched_policy.cpp Fix non-Android build targets 2019-02-03 16:49:28 +00:00
task_profiles.cpp libprocessgroup: Disable file descriptor caching temporarily 2019-02-06 02:15:37 +00:00
task_profiles.h libprocessgroup: Disable file descriptor caching temporarily 2019-02-06 02:15:37 +00:00