From patchwork Wed Jun 28 02:08:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 106483 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp467371qge; Tue, 27 Jun 2017 19:09:09 -0700 (PDT) X-Received: by 10.98.8.81 with SMTP id c78mr8157595pfd.213.1498615749631; Tue, 27 Jun 2017 19:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498615749; cv=none; d=google.com; s=arc-20160816; b=aPGyhOWoRH7cQeCAHhl6dg/iKZP6Ildux7/bljewSf+QYQSseFpDH0+V6Lx20sbm2A O2H2/Nqrqh5Mj5u8NXog9JnsT/BrguUL0fPGy/sHZ27Z8GhWqqtMfEkhSf7L5DVGyxLj FtCSAh0se+i5oEQNIDqYSWyoEJ8qnD7S93VV+XI99oO80IicmiAcQb+i//uEwy8TY3sU Juwq8Fp4K0zRQcidBs1KX/bM48JO+xAwTyFC2y6+VtIN9JkX21HIajcQDiqs742f/EWC 1MQwqO8mYrp2MEclFwx4VB8Oy0IsGpdMzOprCXBtPdiahwKVCB97Qq8iDnIH+4LmhROs /wFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=7mPf6xuSbNi1Vqp4BYiWfJYgwskFsIPbnjVuWAgQISw=; b=TrR1kEKoiTjIqPTHR5vjKysvI/geEk/KYKZxBsqbmvh/k3HwHU3NeJb4FMm+rYMJTb K1Z/hx0sWzOcgvMg2EpR/eHnq+HvTGG9FbzECgZO7YHZw0UVb6rf2WTNg/2eUy+6MJPA zXTFt9zMw6t2GllbTF0Y2imCu6nTURwQLD5Mm7nyS3TGsLajbAfOe/WUBL1+LlJvyOL6 JIyC6NT2ft7K3RotqAl9c2lUf26RbnZAaMkh1TE+mDDCOyfeFm34IgW8iHocW1foQSA/ cV464I0Q+a3HueQwxVcZ1LFPvLuc1TvF1DlTcVGNjLS9Mpy8+ggJL7/oxhjS3Cgjb2RE HgmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=CFlCpNXf; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id s15si652525plj.260.2017.06.27.19.09.09; Tue, 27 Jun 2017 19:09:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=CFlCpNXf; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 27802780AA; Wed, 28 Jun 2017 02:09:06 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by mail.openembedded.org (Postfix) with ESMTP id 976ED77FF9 for ; Wed, 28 Jun 2017 02:08:37 +0000 (UTC) Received: by mail-pf0-f173.google.com with SMTP id q86so25368009pfl.3 for ; Tue, 27 Jun 2017 19:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0GlnrqrS+yqZyHE3rSVhEqFhTM0GAkbb3wYnsxGFYIw=; b=CFlCpNXf5x+UdNkoTHmdne8jvGYqEnsUDjly92YFvjuh6RUqgpG1+ugX1QXPOACct1 7RenKysKMNUKqQzM8QA1aMC/+jwdCgjIKG6E54VlVdi/QUdHGWjZfUPxsWgpYuKB11fb BxrpS1pE3Y+qvkool41wXSgNxvy6COegpbd5IsyGwB4CSkrS0mbXmXKoBVErepGGw/XO Edx3gbDGbRZ4kWRGjTHHUDog6QiIcHOfAUdihdhLKBaAvso20dWR6hJjDEt7JGm77Zu9 kxNBgZQwpeIa2RB9mUQHPHO5ksoPpWwbd1sLSsWU8f3/dDQCq7KD4gy0bbdFWXtB51Ye WQQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0GlnrqrS+yqZyHE3rSVhEqFhTM0GAkbb3wYnsxGFYIw=; b=rCCeWFwoYQRpZKr9V0fv9fQbOgJNfv+/FNHycIkjxIGEVAmhKEIooevIARWWFlz3rc GfKjz09MS9NnIKG7v2wyzOS29WbLSyf6+A3C65OUWM1G/50173xAti/g9m1GifT+bi0h 6e7QkJV1VSFqRyXUQMBSxmJz8gszLTmY/sP/AUZtfNDHhQtEPV7hFiR+LnA1w0IXAMsG IxvCE2gDkFr5Xs2ziUB3jsbhvkbV7EJx6Zb4yI3DifVhjLJTNvRdndkNacAEN+L8LMVv HqIBpDci+AaVrGgX3dXEqGHuPMuT9kO34jtSpCICUsiyV3tQUmt+z+HIdOda9K1S/xO7 ZJVQ== X-Gm-Message-State: AKS2vOyR2oIK7Tcd/W+zK8Pg1urqVF33L+yfRauwkRl1RB/03yuOtfCq 2goXZKRSmcTWLCty X-Received: by 10.98.89.129 with SMTP id k1mr8371277pfj.28.1498615718471; Tue, 27 Jun 2017 19:08:38 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::3df3]) by smtp.gmail.com with ESMTPSA id b8sm1003591pfd.65.2017.06.27.19.08.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jun 2017 19:08:37 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 27 Jun 2017 19:08:08 -0700 Message-Id: <20170628020819.17047-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170628020819.17047-1-raj.khem@gmail.com> References: <20170628020819.17047-1-raj.khem@gmail.com> Subject: [oe] [meta-oe][PATCH 02/13] networkmanager: Fix build with hardening X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Drop using xlocale.h Signed-off-by: Khem Raj --- ...stemd-xlocale.h-is-dropped-by-newer-glibc.patch | 29 ++++++++++ ...-string-in-g_dbus_message_new_method_erro.patch | 67 ++++++++++++++++++++++ .../networkmanager/networkmanager_1.4.4.bb | 2 + 3 files changed, 98 insertions(+) create mode 100644 meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch create mode 100644 meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch -- 2.13.2 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch b/meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch new file mode 100644 index 000000000..4234e2be2 --- /dev/null +++ b/meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch @@ -0,0 +1,29 @@ +From a9bfe6f2029d75caf28fcdf3e740843cf6359615 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 27 Jun 2017 07:31:25 -0700 +Subject: [PATCH 1/2] systemd: xlocale.h is dropped by newer glibc + +Signed-off-by: Khem Raj +--- + src/systemd/src/basic/parse-util.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c +index 9c21e5a..dd95d1f 100644 +--- a/src/systemd/src/basic/parse-util.c ++++ b/src/systemd/src/basic/parse-util.c +@@ -25,11 +25,7 @@ + #include + #include + #include +-#ifdef __GLIBC__ +-#include +-#else + #include +-#endif + #include "alloc-util.h" + #include "extract-word.h" + #include "macro.h" +-- +2.13.2 + diff --git a/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch b/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch new file mode 100644 index 000000000..e32b5c00d --- /dev/null +++ b/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch @@ -0,0 +1,67 @@ +From adc0668b854289a11cfc29597b5566ba1869d17e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 27 Jun 2017 07:32:09 -0700 +Subject: [PATCH 2/2] user format string in g_dbus_message_new_method_error () + +This fixes format errors with -Werror=format-security + +Signed-off-by: Khem Raj +--- + src/nm-manager.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/nm-manager.c b/src/nm-manager.c +index c3d65cd..e814912 100644 +--- a/src/nm-manager.c ++++ b/src/nm-manager.c +@@ -4871,6 +4871,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, + if (error || (result != NM_AUTH_CALL_RESULT_YES)) { + reply = g_dbus_message_new_method_error (pfd->message, + NM_PERM_DENIED_ERROR, ++ "%s", + (error_message = "Not authorized to perform this operation")); + if (error) + error_message = error->message; +@@ -4882,6 +4883,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, + if (!object) { + reply = g_dbus_message_new_method_error (pfd->message, + "org.freedesktop.DBus.Error.UnknownObject", ++ "%s", + (error_message = "Object doesn't exist.")); + goto done; + } +@@ -4890,6 +4892,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, + if (!nm_exported_object_get_interface_by_type (object, pfd->interface_type)) { + reply = g_dbus_message_new_method_error (pfd->message, + "org.freedesktop.DBus.Error.InvalidArgs", ++ "%s", + (error_message = "Object is of unexpected type.")); + goto done; + } +@@ -4905,6 +4908,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, + if (global_dns && !nm_global_dns_config_is_internal (global_dns)) { + reply = g_dbus_message_new_method_error (pfd->message, + NM_PERM_DENIED_ERROR, ++ "%s", + (error_message = "Global DNS configuration already set via configuration file")); + goto done; + } +@@ -4949,6 +4953,7 @@ do_set_property_check (gpointer user_data) + if (!pfd->subject) { + reply = g_dbus_message_new_method_error (pfd->message, + NM_PERM_DENIED_ERROR, ++ "%s", + (error_message = "Could not determine request UID.")); + goto out; + } +@@ -4958,6 +4963,7 @@ do_set_property_check (gpointer user_data) + if (!chain) { + reply = g_dbus_message_new_method_error (pfd->message, + NM_PERM_DENIED_ERROR, ++ "%s", + (error_message = "Could not authenticate request.")); + goto out; + } +-- +2.13.2 + diff --git a/meta-oe/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb b/meta-oe/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb index 0de4383fb..e7dd4ef31 100644 --- a/meta-oe/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb +++ b/meta-oe/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb @@ -34,6 +34,8 @@ SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManag file://0001-check-for-strndupa-before-using-it.patch \ file://0001-dns-resolved-add-systemd-resolved-backend.patch \ file://0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch \ + file://0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch \ + file://0002-user-format-string-in-g_dbus_message_new_method_erro.patch \ " SRC_URI[md5sum] = "63f1e0d6d7e9099499d062c84c927a75" SRC_URI[sha256sum] = "829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309"