commit | aa6158b410ca65566bcd23d30bf32bc522d9d6dc | [log] [tgz] |
---|---|---|
author | T.J. Mercier <tjmercier@google.com> | Wed Jul 26 22:12:44 2023 +0000 |
committer | T.J. Mercier <tjmercier@google.com> | Wed Jul 26 22:12:44 2023 +0000 |
tree | d9fbb5444fd28fc84d61447df739c2ef953d7678 | |
parent | 428622bb7fe60cd4a342b843ddb103ef062d4722 [diff] |
libprocessgroup: UIDs in linux are unsigned We missed two incorrect specifiers in the previous commit with this same title. We use the %d format specificier for uid_t, which maps to __kernel_uid32_t, which is unsigned. [1] This is undefined behavior which can lead to paths with negative UIDs when erroneously large values are passed for uid: E libprocessgroup: No such cgroup attribute: /sys/fs/cgroup/uid_-89846/cgroup.freeze Fix it with %u. [1] https://cs.android.com/search?q=typedef.*__kernel_uid32_t&ss=android%2Fplatform%2Fsuperproject%2Fmain Change-Id: Ica04b03526bd2e156f026a2797fe9912b259cd9f