dns-proxy: Add new users
The new users are necessary for routing done by patchpanel.
UID and GID are chosen by the smallest number that is currently not
occupied by any users or groups.
DD: http://go/cros-dns-proxy-rootns
BUG=b:363147822
TEST=tast run <DUT> network.DNSProxy*
TEST=tast run <DUT> network.ResolvConf*
Cq-Depend: chromium:5968844
Change-Id: I500ffb3415d831b4862ca91c61b7f11e74d7c7d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/eclass-overlay/+/5970133
Reviewed-by: Jason Ling <jasonling@chromium.org>
Tested-by: Jason Iman <jasongustaman@chromium.org>
Reviewed-by: Jie Jiang <jiejiang@chromium.org>
Reviewed-by: Allen Webb <allenwebb@google.com>
Commit-Queue: Jason Iman <jasongustaman@chromium.org>
diff --git a/acct-group/dns-proxy-system/dns-proxy-system-1-r1.ebuild b/acct-group/dns-proxy-system/dns-proxy-system-1-r1.ebuild
new file mode 100644
index 0000000..1cbfdaf
--- /dev/null
+++ b/acct-group/dns-proxy-system/dns-proxy-system-1-r1.ebuild
@@ -0,0 +1,12 @@
+# Copyright 2024 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+EAPI=7
+
+inherit acct-group
+
+# NB: These settings are ignored in CrOS for now.
+# See the files in profiles/base/accounts/ instead.
+
+ACCT_GROUP_ID=20221
diff --git a/acct-group/dns-proxy-user/dns-proxy-user-1-r1.ebuild b/acct-group/dns-proxy-user/dns-proxy-user-1-r1.ebuild
new file mode 100644
index 0000000..630d325
--- /dev/null
+++ b/acct-group/dns-proxy-user/dns-proxy-user-1-r1.ebuild
@@ -0,0 +1,12 @@
+# Copyright 2024 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+EAPI=7
+
+inherit acct-group
+
+# NB: These settings are ignored in CrOS for now.
+# See the files in profiles/base/accounts/ instead.
+
+ACCT_GROUP_ID=20222
diff --git a/acct-user/dns-proxy-system/dns-proxy-system-1-r1.ebuild b/acct-user/dns-proxy-system/dns-proxy-system-1-r1.ebuild
new file mode 100644
index 0000000..20f2af2
--- /dev/null
+++ b/acct-user/dns-proxy-system/dns-proxy-system-1-r1.ebuild
@@ -0,0 +1,15 @@
+# Copyright 2024 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+EAPI=7
+
+inherit acct-user
+
+DESCRIPTION="CrOS DNS proxy daemon for system traffic"
+
+# NB: These settings are ignored in CrOS for now.
+# See the files in profiles/base/accounts/ instead.
+
+ACCT_USER_ID=20221
+ACCT_USER_GROUPS=( dns-proxy dns-proxy-system )
diff --git a/acct-user/dns-proxy-user/dns-proxy-user-1-r1.ebuild b/acct-user/dns-proxy-user/dns-proxy-user-1-r1.ebuild
new file mode 100644
index 0000000..bde7935
--- /dev/null
+++ b/acct-user/dns-proxy-user/dns-proxy-user-1-r1.ebuild
@@ -0,0 +1,15 @@
+# Copyright 2024 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+EAPI=7
+
+inherit acct-user
+
+DESCRIPTION="CrOS DNS proxy daemon for user traffic"
+
+# NB: These settings are ignored in CrOS for now.
+# See the files in profiles/base/accounts/ instead.
+
+ACCT_USER_ID=20222
+ACCT_USER_GROUPS=( dns-proxy dns-proxy-user )
diff --git a/profiles/base/accounts/group/dns-proxy b/profiles/base/accounts/group/dns-proxy
index 3572c67..a68d43e 100644
--- a/profiles/base/accounts/group/dns-proxy
+++ b/profiles/base/accounts/group/dns-proxy
@@ -1,3 +1,3 @@
group:dns-proxy
gid:20167
-users:dns-proxy
+users:dns-proxy,dns-proxy-system,dns-proxy-user
diff --git a/profiles/base/accounts/group/dns-proxy-system b/profiles/base/accounts/group/dns-proxy-system
new file mode 100644
index 0000000..3b5ead2
--- /dev/null
+++ b/profiles/base/accounts/group/dns-proxy-system
@@ -0,0 +1,3 @@
+group:dns-proxy-system
+gid:20221
+users:dns-proxy-system
diff --git a/profiles/base/accounts/group/dns-proxy-user b/profiles/base/accounts/group/dns-proxy-user
new file mode 100644
index 0000000..e009084
--- /dev/null
+++ b/profiles/base/accounts/group/dns-proxy-user
@@ -0,0 +1,3 @@
+group:dns-proxy-user
+gid:20222
+users:dns-proxy-user
diff --git a/profiles/base/accounts/user/dns-proxy-system b/profiles/base/accounts/user/dns-proxy-system
new file mode 100644
index 0000000..2cacc3c
--- /dev/null
+++ b/profiles/base/accounts/user/dns-proxy-system
@@ -0,0 +1,6 @@
+user:dns-proxy-system
+uid:20221
+gid:20221
+gecos:CrOS DNS proxy daemon
+home:/dev/null
+shell:/bin/false
diff --git a/profiles/base/accounts/user/dns-proxy-user b/profiles/base/accounts/user/dns-proxy-user
new file mode 100644
index 0000000..8866baf
--- /dev/null
+++ b/profiles/base/accounts/user/dns-proxy-user
@@ -0,0 +1,6 @@
+user:dns-proxy-user
+uid:20222
+gid:20222
+gecos:CrOS DNS proxy daemon
+home:/dev/null
+shell:/bin/false