From patchwork Tue Aug 23 23:56:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 11797 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4966C32793 for ; Tue, 23 Aug 2022 23:56:38 +0000 (UTC) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mx.groups.io with SMTP id smtpd.web10.5309.1661298998438661897 for ; Tue, 23 Aug 2022 16:56:38 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gherzan.com header.s=fm2 header.b=tzcwraJi; spf=pass (domain: gherzan.com, ip: 64.147.123.25, mailfrom: andrei@gherzan.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8A3A932001FC; Tue, 23 Aug 2022 19:56:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 23 Aug 2022 19:56:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gherzan.com; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1661298997; x=1661385397; bh=Qw8HBwI4T28hpMPRdWIH5ptSe buKo+bE8Ur0f2jKB98=; b=tzcwraJicIsHW8fc3DRniPewu0+kJkGg8+Nw0JtDq pJPS/BO6wpAsozxRyB8wvLFIW4JEqGDvCBJplcNfWUf0gLUvuWn5vyeXpMdJWF42 820P/RTP+fgWxV3/0Xbqnxfazpg2jPQDYnSjp+iAXXN4en88F2u8nOcKCpXGgYSE WtF1BFhTuim2a1EKkBxDwddCaoy4mkBhD3m9Upm0m5ZU10Ef0XdT1tyxvCGLpXPn T78vuZKvyZinkryR3QCSswJZuSC35+XBIEPk0kofrMoENaQAnirLi0dO+loyPfFZ PlFeJcTEGde5BbUF3/hJrfG6j/AT1ICAwkoYMFKwGdQcg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1661298997; x=1661385397; bh=Qw8HBwI4T28hpMPRdWIH5ptSebuKo+bE8Ur 0f2jKB98=; b=QgI22WOWT22lR5/E2hAF59X5dN0xgMWvcaLK8PkX/ApUqvg8Moj i7nfpPoONHtkiQ2F78Z82fkmdEV4i1s/1czVETuTG0uMrZnzG9HyXSEK3VkvUS8c h6/bTRM34jppz5jw/lyw114b31kQGJXfAdGJjF5cOjfp6iXyV2G4wV/mE/0YUGDx gFU+/3XLQ+bSey1eu5jBPVqPhZUpuz4XxtV7tw2sJNvWj7tFjNQeIIji5Xswrb54 zX7Vc2XAvbT4lm/XAXVjkOYaxCn8qQlpsQU2Y++d6+ZFXwuD70rWke+elHofW4w+ cY7Hp0LiJVKyMfTFDaBrHgmE0V7o5+lwy9w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejtddgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvihcuifhhvghriigrnhcuoegrnhgurhgvihesghhh vghriigrnhdrtghomheqnecuggftrfgrthhtvghrnhepieejlefhveevleffveegfeetle ejtedvgeejtddthefhhfdtiefhveegffeggeeknecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghisehghhgvrhiirghnrdgtohhm X-ME-Proxy: Feedback-ID: i68994715:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Aug 2022 19:56:36 -0400 (EDT) From: Andrei Gherzan To: openembedded-core@lists.openembedded.org Cc: andrei@gherzan.com, Andrei Gherzan Subject: [PATCH 3/6] rootfspostcommands.py: Cleanup subid backup files generated by shadow-utils Date: Wed, 24 Aug 2022 01:56:21 +0200 Message-Id: <20220823235624.2488133-3-andrei@gherzan.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 23 Aug 2022 23:56:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/169764 From: Andrei Gherzan 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. Signed-off-by: Andrei Gherzan --- meta/lib/rootfspostcommands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/lib/rootfspostcommands.py b/meta/lib/rootfspostcommands.py index e344ae2efc..5386eea409 100644 --- a/meta/lib/rootfspostcommands.py +++ b/meta/lib/rootfspostcommands.py @@ -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)