diff mbox series

[dunfell,11/12] libtirpc: Check if file exists before operating on it

Message ID a764e19736f24b8bf67ea87d58dd74652d6d81c9.1675547139.git.steve@sakoman.com
State Accepted, archived
Commit a764e19736f24b8bf67ea87d58dd74652d6d81c9
Headers show
Series [dunfell,01/12] go: fix CVE-2022-1962 go/parser stack exhaustion in all Parse* functions | expand

Commit Message

Steve Sakoman Feb. 4, 2023, 9:48 p.m. UTC
From: Khem Raj <raj.khem@gmail.com>

In some cases (e.g. mingw) this file may not be installed

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 547f3a13ee9268bbdd439c96108ba1fe9ab78873)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb b/meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb
index fe4e30e61f..80151ff83a 100644
--- a/meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb
+++ b/meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb
@@ -22,7 +22,7 @@  inherit autotools pkgconfig
 EXTRA_OECONF = "--disable-gssapi"
 
 do_install_append() {
-	chown root:root ${D}${sysconfdir}/netconfig
+	test -e ${D}${sysconfdir}/netconfig && chown root:root ${D}${sysconfdir}/netconfig
 }
 
 BBCLASSEXTEND = "native nativesdk"