rootfspostcommands.py: Cleanup subid backup files generated by shadow-utils

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.

(From OE-Core rev: 4e4ea5adea8a00b4a78ffbe7cc60931deb74c161)

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Andrei Gherzan 2022-08-24 01:56:21 +02:00 committed by Richard Purdie
parent 29bb84b82b
commit fe796c2a17

View File

@ -73,6 +73,8 @@ def remove_shadowutils_backup_files(sysconfdir):
'gshadow',
'passwd',
'shadow',
'subgid',
'subuid',
):
filepath = os.path.join(sysconfdir, filename)
remove_shadowutils_backup_file(filepath)