diff options
Diffstat (limited to 'meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch')
-rw-r--r-- | meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch | 34 |
1 files changed, 0 insertions, 34 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 deleted file mode 100644 index f267875ed..000000000 --- a/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 86dae8010310d13bd2a2beb006b4085d06ae1556 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 | --- | ||
15 | src/tools.cc | 5 +++-- | ||
16 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/src/tools.cc b/src/tools.cc | ||
19 | index 5829574..19f0836 100644 | ||
20 | --- a/src/tools.cc | ||
21 | +++ b/src/tools.cc | ||
22 | @@ -581,8 +581,10 @@ enter_suid(void) | ||
23 | debugs (21, 3, "enter_suid: setresuid failed: " << xstrerr(xerrno)); | ||
24 | } | ||
25 | #else | ||
26 | - | ||
27 | - setuid(0); | ||
28 | + if (setuid(0) < 0) { | ||
29 | + const auto xerrno = errno; | ||
30 | + debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerr(xerrno)); | ||
31 | + } | ||
32 | #endif | ||
33 | #if HAVE_PRCTL && defined(PR_SET_DUMPABLE) | ||
34 | /* Set Linux DUMPABLE flag */ | ||