[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core][kirkstone 10/19] rootfspostcommands.py: Cleanup subid backup files generated by shadow-uti
From: "Steve Sakoman" <steve () sakoman ! com>
Date: 2022-08-31 14:39:30
Message-ID: 84b2e9a6c17278cbcc08020aa78759004a7b60bf.1661956484.git.steve () sakoman ! com
[Download RAW message or body]
Content-Transfer-Encoding: 8bit
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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170121): https://lists.openembedded.org/g/openembedded-core/message/170121
Mute This Topic: https://lists.openembedded.org/mt/93372453/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic