From b7475a4c3f68734f2fa826c9105c8f72621a1801 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 1 Sep 2022 00:01:04 +0000 Subject: [PATCH] Add the "sys" group for tests. It's useful to have a group that shares a numeric id with Linux and macOS. "root" doesn't count because group 0 is actually called "wheel" on the BSDs, and macOS has "daemon" and "kmem" as its groups 1 and 2. This lets us have toybox tar tests that have the same results on all supported OSes without special handling. Test: treehugger Change-Id: I4704d6f9ada84f3065831a099b34d1c20c4c6b03 --- libcutils/include/private/android_filesystem_config.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libcutils/include/private/android_filesystem_config.h b/libcutils/include/private/android_filesystem_config.h index bdb807538..da5005cd5 100644 --- a/libcutils/include/private/android_filesystem_config.h +++ b/libcutils/include/private/android_filesystem_config.h @@ -41,9 +41,11 @@ */ #define AID_ROOT 0 /* traditional unix root user */ -/* The following are for LTP and should only be used for testing */ -#define AID_DAEMON 1 /* traditional unix daemon owner */ -#define AID_BIN 2 /* traditional unix binaries owner */ + +/* The following are for tests like LTP and should only be used for testing. */ +#define AID_DAEMON 1 /* Traditional unix daemon owner. */ +#define AID_BIN 2 /* Traditional unix binaries owner. */ +#define AID_SYS 3 /* A group with the same gid on Linux/macOS/Android. */ #define AID_SYSTEM 1000 /* system server */