From 2d49efa5a1f02f90c3d7c429b521979b6a3c6239 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 27 Mar 2024 17:48:21 +0100 Subject: [PATCH] config/acct-group: provide userdb group record this is required when loading the sysext image to dynamically load / unload the groups provided by the image. Signed-off-by: Mathieu Tortuyaux --- .../coreos-overlay/coreos/config/env/acct-group/incus | 8 ++++++++ .../coreos/config/env/acct-group/incus-admin | 8 ++++++++ .../coreos-overlay/coreos/config/env/acct-group/lxc | 8 ++++++++ 3 files changed, 24 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus-admin create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/lxc diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus new file mode 100644 index 00000000000..68f924cf375 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus @@ -0,0 +1,8 @@ +cros_post_src_install_add_userdb_record(){ + insinto /usr/lib/userdb + newins - ${ACCT_GROUP_NAME}.group < <( + printf '{"groupName":"%q","gid":%q}\n' \ + "${ACCT_GROUP_NAME}" \ + "${_ACCT_GROUP_ID/#-*/-}" + ) +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus-admin b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus-admin new file mode 100644 index 00000000000..68f924cf375 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus-admin @@ -0,0 +1,8 @@ +cros_post_src_install_add_userdb_record(){ + insinto /usr/lib/userdb + newins - ${ACCT_GROUP_NAME}.group < <( + printf '{"groupName":"%q","gid":%q}\n' \ + "${ACCT_GROUP_NAME}" \ + "${_ACCT_GROUP_ID/#-*/-}" + ) +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/lxc b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/lxc new file mode 100644 index 00000000000..68f924cf375 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/lxc @@ -0,0 +1,8 @@ +cros_post_src_install_add_userdb_record(){ + insinto /usr/lib/userdb + newins - ${ACCT_GROUP_NAME}.group < <( + printf '{"groupName":"%q","gid":%q}\n' \ + "${ACCT_GROUP_NAME}" \ + "${_ACCT_GROUP_ID/#-*/-}" + ) +}