From: Steve Sakoman <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][kirkstone 10/19] rootfspostcommands.py: Cleanup subid backup files generated by shadow-utils
Date: Wed, 31 Aug 2022 04:39:30 -1000 [thread overview]
Message-ID: <84b2e9a6c17278cbcc08020aa78759004a7b60bf.1661956484.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1661956484.git.steve@sakoman.com>
From: Andrei Gherzan <andrei.gherzan@huawei.com>
When creating users, shadow-utils might create backup files for
subordinate ID files (subid, subgid). Make sure we clean them up
similarly to the other backup files shadow-utils creates.
This is a backport from master that brings in only the cleanup of the
subid backup files without the code restructure.
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
meta/lib/rootfspostcommands.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/lib/rootfspostcommands.py b/meta/lib/rootfspostcommands.py
index fdb9f5b850..12f66d2ce2 100644
--- a/meta/lib/rootfspostcommands.py
+++ b/meta/lib/rootfspostcommands.py
@@ -58,3 +58,10 @@ def sort_passwd(sysconfdir):
remove_backup(filename)
if os.path.exists(filename):
sort_file(filename, mapping)
+ # Drop other known backup shadow-utils.
+ for filename in (
+ 'subgid',
+ 'subuid',
+ ):
+ filepath = os.path.join(sysconfdir, filename)
+ remove_backup(filepath)
--
2.25.1
next prev parent reply other threads:[~2022-08-31 14:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 14:39 [OE-core][kirkstone 00/19] Patch review Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 01/19] sqlite: fix CVE-2022-35737 Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 02/19] bind: upgrade 9.18.4 -> 9.18.5 Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 03/19] linux-yocto/5.15: update to v5.15.60 Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 04/19] linux-yocto/5.15: update to v5.15.62 Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 05/19] linux-yocto: Fix COMPATIBLE_MACHINE regex match Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 06/19] linux-yocto/5.10: update to v5.10.136 Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 07/19] linux-yocto/5.10: update to v5.10.137 Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 08/19] lttng-modules: fix build for kernel 5.10.137 Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 09/19] shadow: Enable subid support Steve Sakoman
2022-08-31 14:39 ` Steve Sakoman [this message]
2022-08-31 14:39 ` [OE-core][kirkstone 11/19] shadow: Avoid nss warning/error with musl Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 12/19] util-linux: Remove --enable-raw from EXTRA_OECONF Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 13/19] libxml2: wrap xmllint to use the correct XML catalogues Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 14/19] parselogs: Ignore xf86OpenConsole error Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 15/19] xinetd: Pass missing -D_GNU_SOURCE Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 16/19] watchdog: Include needed system header for function decls Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 17/19] pinentry: enable _XOPEN_SOURCE on musl for wchar usage in curses Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 18/19] apr: Use correct strerror_r implementation based on libc type Steve Sakoman
2022-08-31 14:39 ` [OE-core][kirkstone 19/19] gcr: Define _GNU_SOURCE Steve Sakoman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84b2e9a6c17278cbcc08020aa78759004a7b60bf.1661956484.git.steve@sakoman.com \
--to=steve@sakoman.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox