mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
policycoreutils: remove format-security from CFLAGS.
Remove -Wno-error=format-security from CFLAGS. and add a patch so we can build policycoreutils if -Werror=format-security enabled. Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
This commit is contained in:
parent
3467300a26
commit
a95119dbec
|
|
@ -0,0 +1,31 @@
|
|||
From 11686426e6148dd55c250570f3d537a3b2c2724d Mon Sep 17 00:00:00 2001
|
||||
From: Xin Ouyang <Xin.Ouyang@windriver.com>
|
||||
Date: Mon, 23 Jul 2012 11:22:56 +0800
|
||||
Subject: [PATCH] policycoreutils: fix format-security build error.
|
||||
|
||||
With this fix, we can build policycoreutils with
|
||||
-Werror=format-security enabled.
|
||||
|
||||
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
|
||||
---
|
||||
sandbox/seunshare.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sandbox/seunshare.c b/sandbox/seunshare.c
|
||||
index c493e98..d7eb0b9 100644
|
||||
--- a/sandbox/seunshare.c
|
||||
+++ b/sandbox/seunshare.c
|
||||
@@ -311,8 +311,8 @@ static int seunshare_mount(const char *src, const char *dst, struct stat *src_st
|
||||
*/
|
||||
static int sandbox_error(const char *string)
|
||||
{
|
||||
- fprintf(stderr, string);
|
||||
- syslog(LOG_AUTHPRIV | LOG_ALERT, string);
|
||||
+ fprintf(stderr, "%s", string);
|
||||
+ syslog(LOG_AUTHPRIV | LOG_ALERT, "%s", string);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
|
|
@ -14,6 +14,8 @@ include selinux_20120216.inc
|
|||
SRC_URI[md5sum] = "fefdede2815cdd2ba8b68599fef1f257"
|
||||
SRC_URI[sha256sum] = "8bbbc36b7d375edff891503932da93e37553f0dd7bdceded7ce9a45c80bec3d1"
|
||||
|
||||
SRC_URI += "file://policycoreutils-fix-format-security.patch"
|
||||
|
||||
DEPENDS += "libsepol libselinux libsemanage ${EXTRA_DEPENDS}"
|
||||
EXTRA_DEPENDS = "libcap-ng libcgroup"
|
||||
EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
|
||||
|
|
@ -43,7 +45,6 @@ FILES_${PN}-sandbox = "${datadir}/sandbox/*"
|
|||
FILES_${PN}-sandbox += "${bindir}/sandbox"
|
||||
FILES_${PN}-sandbox += "${sbindir}/seunshare"
|
||||
|
||||
CFLAGS_append = " -Wno-error=format-security"
|
||||
AUDITH="`ls ${STAGING_INCDIR}/libaudit.h >/dev/null 2>&1 && echo /usr/include/libaudit.h `"
|
||||
PAMH="`ls ${STAGING_INCDIR}/security/pam_appl.h >/dev/null 2>&1 && echo /usr/include/security/pam_appl.h `"
|
||||
EXTRA_OEMAKE += "PAMH=${PAMH} AUDITH=${AUDITH} INOTIFYH=n"
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ include selinux_git.inc
|
|||
SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
|
||||
PV = "2.1.10+git${SRCPV}"
|
||||
|
||||
SRC_URI += "file://policycoreutils-fix-format-security.patch"
|
||||
|
||||
DEPENDS += "libsepol libselinux libsemanage ${EXTRA_DEPENDS}"
|
||||
EXTRA_DEPENDS = "libcap-ng libcgroup"
|
||||
EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
|
||||
|
|
@ -44,7 +46,6 @@ FILES_${PN}-sandbox = "${datadir}/sandbox/*"
|
|||
FILES_${PN}-sandbox += "${bindir}/sandbox"
|
||||
FILES_${PN}-sandbox += "${sbindir}/seunshare"
|
||||
|
||||
CFLAGS_append = " -Wno-error=format-security"
|
||||
AUDITH="`ls ${STAGING_INCDIR}/libaudit.h >/dev/null 2>&1 && echo /usr/include/libaudit.h `"
|
||||
PAMH="`ls ${STAGING_INCDIR}/security/pam_appl.h >/dev/null 2>&1 && echo /usr/include/security/pam_appl.h `"
|
||||
EXTRA_OEMAKE += "PAMH=${PAMH} AUDITH=${AUDITH} INOTIFYH=n"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user