From: Andrei Gherzan <andrei.gher...@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.gher...@huawei.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 (#169881): https://lists.openembedded.org/g/openembedded-core/message/169881 Mute This Topic: https://lists.openembedded.org/mt/93252113/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-