diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-06-25 22:34:41 -0700 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2017-06-28 10:29:39 -0400 |
commit | 841bb94ce8bfe62515e266c346752c60ce3c9b1b (patch) | |
tree | d2a9530bb6a11c386d02b67ba1b1e6cdc0d32af2 /meta-networking/recipes-daemons | |
parent | 4267eede662006f54694d6062ceea98835b99dd6 (diff) | |
download | meta-openembedded-841bb94ce8bfe62515e266c346752c60ce3c9b1b.tar.gz |
squid: Fix build with hardening
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-daemons')
-rw-r--r-- | meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch | 36 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/squid/squid_3.5.26.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch b/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch new file mode 100644 index 000000000..082a1114b --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From a78f2f0feda8f92cb59afe8236bd90726908768f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 25 Jun 2017 00:59:24 -0700 | ||
4 | Subject: [PATCH] tools.cc: fixed unused-result warning | ||
5 | |||
6 | fix | ||
7 | | ../../squid-3.5.26/src/tools.cc: In function 'void enter_suid()': | ||
8 | | ../../squid-3.5.26/src/tools.cc:616:11: error: ignoring return value of 'int setuid(__uid_t)', declared with attribute warn_unused_result [-Werror=unused-result] | ||
9 | | setuid(0); | ||
10 | | ~~~~~~^~~ | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | Upstream-Status: Submitted | ||
15 | |||
16 | src/tools.cc | 4 ++-- | ||
17 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/src/tools.cc b/src/tools.cc | ||
20 | index 8137a03..843e266 100644 | ||
21 | --- a/src/tools.cc | ||
22 | +++ b/src/tools.cc | ||
23 | @@ -612,8 +612,8 @@ enter_suid(void) | ||
24 | if (setresuid((uid_t)-1, 0, (uid_t)-1) < 0) | ||
25 | debugs (21, 3, "enter_suid: setresuid failed: " << xstrerror ()); | ||
26 | #else | ||
27 | - | ||
28 | - setuid(0); | ||
29 | + if (setuid(0) < 0) | ||
30 | + debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerror()); | ||
31 | #endif | ||
32 | #if HAVE_PRCTL && defined(PR_SET_DUMPABLE) | ||
33 | /* Set Linux DUMPABLE flag */ | ||
34 | -- | ||
35 | 2.13.1 | ||
36 | |||
diff --git a/meta-networking/recipes-daemons/squid/squid_3.5.26.bb b/meta-networking/recipes-daemons/squid/squid_3.5.26.bb index e1b4c06dc..a78a09135 100644 --- a/meta-networking/recipes-daemons/squid/squid_3.5.26.bb +++ b/meta-networking/recipes-daemons/squid/squid_3.5.26.bb | |||
@@ -24,6 +24,7 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${P | |||
24 | file://0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch \ | 24 | file://0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch \ |
25 | file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ | 25 | file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ |
26 | file://gcc7-fixes.patch \ | 26 | file://gcc7-fixes.patch \ |
27 | file://0001-tools.cc-fixed-unused-result-warning.patch \ | ||
27 | " | 28 | " |
28 | SRC_URI[md5sum] = "dc1830cd361e077814aa39bcc3691d8b" | 29 | SRC_URI[md5sum] = "dc1830cd361e077814aa39bcc3691d8b" |
29 | SRC_URI[sha256sum] = "41d8845863dcd026c856508cd1599d417c8947ffd96e86e24085f9893cb8b8c2" | 30 | SRC_URI[sha256sum] = "41d8845863dcd026c856508cd1599d417c8947ffd96e86e24085f9893cb8b8c2" |