summaryrefslogtreecommitdiffstats
path: root/debian/patches/suexec-custom.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-25 04:41:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-25 04:41:28 +0000
commit2eeb62e38ae17a3523ad3cd81c3de9f20f9e7742 (patch)
treefe91033d4712f6d836006b998525656b9dd193b8 /debian/patches/suexec-custom.patch
parentMerging upstream version 2.4.59. (diff)
downloadapache2-2eeb62e38ae17a3523ad3cd81c3de9f20f9e7742.tar.xz
apache2-2eeb62e38ae17a3523ad3cd81c3de9f20f9e7742.zip
Adding debian version 2.4.59-1~deb10u1.debian/2.4.59-1_deb10u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/suexec-custom.patch')
-rw-r--r--debian/patches/suexec-custom.patch32
1 files changed, 15 insertions, 17 deletions
diff --git a/debian/patches/suexec-custom.patch b/debian/patches/suexec-custom.patch
index 9c7a732..37b761d 100644
--- a/debian/patches/suexec-custom.patch
+++ b/debian/patches/suexec-custom.patch
@@ -2,8 +2,6 @@ Description: the actual patch to make suexec-custom read a config file
Forwarded: not-needed
Author: Stefan Fritsch <sf@debian.org>
Last-Update: 2018-07-17
-diff --git a/support/suexec-custom.c b/support/suexec-custom.c
-index f3811a97..30bb644b 100644
--- a/support/suexec-custom.c
+++ b/support/suexec-custom.c
@@ -29,6 +29,7 @@
@@ -22,7 +20,7 @@ index f3811a97..30bb644b 100644
#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
-@@ -222,6 +224,26 @@ static void log_no_err(const char *fmt,...)
+@@ -222,6 +224,26 @@
return;
}
@@ -48,8 +46,8 @@ index f3811a97..30bb644b 100644
+
static void clean_env(void)
{
- char pathbuf[512];
-@@ -288,6 +310,11 @@ int main(int argc, char *argv[])
+ char **cleanenv;
+@@ -286,6 +308,11 @@
struct stat dir_info; /* directory info holder */
struct stat prg_info; /* program info holder */
int cwdh; /* handle to cwd */
@@ -61,7 +59,7 @@ index f3811a97..30bb644b 100644
/*
* Start with a "clean" environment
-@@ -317,15 +344,10 @@ int main(int argc, char *argv[])
+@@ -315,15 +342,10 @@
|| (! strcmp(AP_HTTPD_USER, pw->pw_name)))
#endif /* _OSD_POSIX */
) {
@@ -78,17 +76,17 @@ index f3811a97..30bb644b 100644
#if defined(AP_LOG_SYSLOG)
fprintf(stderr, " -D AP_LOG_SYSLOG\n");
#elif defined(AP_LOG_EXEC)
-@@ -339,9 +361,6 @@ int main(int argc, char *argv[])
- #endif
+@@ -338,9 +360,6 @@
#ifdef AP_UID_MIN
fprintf(stderr, " -D AP_UID_MIN=%d\n", AP_UID_MIN);
--#endif
+ #endif
-#ifdef AP_USERDIR_SUFFIX
- fprintf(stderr, " -D AP_USERDIR_SUFFIX=\"%s\"\n", AP_USERDIR_SUFFIX);
- #endif
+-#endif
exit(0);
}
-@@ -357,23 +376,6 @@ int main(int argc, char *argv[])
+ /*
+@@ -355,23 +374,6 @@
target_gname = argv[2];
cmd = argv[3];
@@ -112,11 +110,10 @@ index f3811a97..30bb644b 100644
/*
* Check for a leading '/' (absolute path) in the command to be executed,
-@@ -397,6 +399,59 @@ int main(int argc, char *argv[])
- userdir = 1;
+@@ -396,6 +398,59 @@
}
-+ /*
+ /*
+ * Check to see if the user running this program
+ * is the user allowed to do so as defined in
+ * SUEXEC_CONFIG_DIR/username
@@ -169,10 +166,11 @@ index f3811a97..30bb644b 100644
+ }
+ }
+
- /*
++ /*
* Error out if the target username is invalid.
*/
-@@ -538,7 +593,7 @@ int main(int argc, char *argv[])
+ if (strspn(target_uname, "1234567890") != strlen(target_uname)) {
+@@ -538,7 +593,7 @@
if (userdir) {
if (((chdir(target_homedir)) != 0) ||
@@ -181,7 +179,7 @@ index f3811a97..30bb644b 100644
((getcwd(dwd, AP_MAXPATH)) == NULL) ||
((fchdir(cwdh)) != 0)) {
log_err("cannot get docroot information (%s)\n", target_homedir);
-@@ -546,7 +601,7 @@ int main(int argc, char *argv[])
+@@ -546,7 +601,7 @@
}
}
else {