File: disable-setuid-confchecks.patch

package info (click to toggle)
samba 2%3A4.23.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 188,052 kB
  • sloc: ansic: 2,006,990; python: 272,597; sh: 72,208; xml: 51,608; perl: 36,090; makefile: 6,353; yacc: 5,320; exp: 1,582; lex: 1,504; cpp: 1,224; awk: 589; java: 119; csh: 58; pascal: 54; sed: 45; asm: 30
file content (29 lines) | stat: -rw-r--r-- 1,216 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Michael Tokarev <mjt@tls.msk.ru>
Date: Fri, 08 Apr 2022 11:50:21 +0300
Subject: disable setuid configure checks
Forwarded: not-needed

For some strange reason, when running reprotest test on salsa-ci,
which apparently is running as root, - on the *second* build only
the configure fails (after successfully built package the first
time). The configure test tries to change gid and verifies it
actually changed (not that the syscall exist), - and that fails.
Since it is extremely uncommon to configure the build process as
root, salsa-ci test environment details are quite deep down the line,
and we know the syscall actually works, just disable the probe,
pretending we are not root.

For upstream, this probably should be done by removing a *lot* of
configure-time checks which are useless these days.

diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
index 30a29f535b1..451ad396965 100644
--- a/source3/lib/util_sec.c
+++ b/source3/lib/util_sec.c
@@ -556,5 +556,5 @@ static int have_syscall(void)
 int main(void)
 {
-        if (getuid() != 0) {
+        if (1 || getuid() != 0) {
 #if (defined(AIX) && defined(USE_SETREUID))
 		/* setreuid is badly broken on AIX 4.1, we avoid it completely */