summaryrefslogtreecommitdiff
path: root/data/sudo
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2019-03-17 21:30:36 -1000
committerSam Bingner <sam@bingner.com>2019-03-17 23:47:58 -1000
commita3e37b3468d9b32b893c6c038270f7c67233fc48 (patch)
tree447b42a80107d9f5877ac2f1fb00f624356c1519 /data/sudo
parentbfcd24a800925cc5fdb559ff5dd355aa59de4879 (diff)
Update sudo to 1.8.27 and make it handle shebangs
Diffstat (limited to 'data/sudo')
-rw-r--r--data/sudo/_metadata/version2
-rw-r--r--data/sudo/shebang.diff27
-rw-r--r--data/sudo/sudo-1.8.23.tar.gzbin3150674 -> 0 bytes
-rw-r--r--data/sudo/sudo-1.8.27.tar.gzbin0 -> 3293178 bytes
4 files changed, 28 insertions, 1 deletions
diff --git a/data/sudo/_metadata/version b/data/sudo/_metadata/version
index 02408ef69..3741959db 100644
--- a/data/sudo/_metadata/version
+++ b/data/sudo/_metadata/version
@@ -1 +1 @@
-1.8.23
+1.8.27
diff --git a/data/sudo/shebang.diff b/data/sudo/shebang.diff
new file mode 100644
index 000000000..c57c84ba1
--- /dev/null
+++ b/data/sudo/shebang.diff
@@ -0,0 +1,27 @@
+diff -ur sudo-1.8.27/src/exec_common.c sudo-1.8.27+enoexec/src/exec_common.c
+--- sudo-1.8.27/src/exec_common.c 2019-01-02 04:37:41.000000000 -1000
++++ sudo-1.8.27+enoexec/src/exec_common.c 2019-03-17 23:40:50.000000000 -1000
+@@ -200,17 +200,19 @@
+ else
+ #endif
+ execve(path, argv, envp);
+- if (fd == -1 && errno == ENOEXEC) {
++ if (fd == -1 && (errno == ENOEXEC || errno == EPERM)) {
+ int argc;
+ char **nargv;
+
+ for (argc = 0; argv[argc] != NULL; argc++)
+ continue;
+- nargv = reallocarray(NULL, argc + 2, sizeof(char *));
++ nargv = reallocarray(NULL, argc + 4, sizeof(char *));
+ if (nargv != NULL) {
+ nargv[0] = "sh";
+- nargv[1] = (char *)path;
+- memcpy(nargv + 2, argv + 1, argc * sizeof(char *));
++ nargv[1] = "-c";
++ nargv[2] = "exec \"$0\" \"$@\"";
++ nargv[3] = (char *)path;
++ memcpy(nargv + 4, argv + 1, argc * sizeof(char *));
+ execve(_PATH_SUDO_BSHELL, nargv, envp);
+ free(nargv);
+ }
diff --git a/data/sudo/sudo-1.8.23.tar.gz b/data/sudo/sudo-1.8.23.tar.gz
deleted file mode 100644
index 09f772023..000000000
--- a/data/sudo/sudo-1.8.23.tar.gz
+++ /dev/null
Binary files differ
diff --git a/data/sudo/sudo-1.8.27.tar.gz b/data/sudo/sudo-1.8.27.tar.gz
new file mode 100644
index 000000000..4f95fcb77
--- /dev/null
+++ b/data/sudo/sudo-1.8.27.tar.gz
Binary files differ