aboutsummaryrefslogtreecommitdiff
path: root/security/sudo
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2017-08-11 18:32:57 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2017-08-11 18:32:57 +0000
commit3adb452fd9d8bece0e32ae68f0efd682281b237c (patch)
tree3f01470dcd43bb7e94aea17381ebd31f755ea241 /security/sudo
parentb2f4914a225bc7129b501bdba40a0dcfd6a04198 (diff)
downloadports-3adb452fd9d8bece0e32ae68f0efd682281b237c.tar.gz
ports-3adb452fd9d8bece0e32ae68f0efd682281b237c.zip
- Fix sudo sending a 2nd SIGINFO on ^T to processes, which is already
handled by the kernel sending it to the entire controlling terminal's process group. - This fixes ^T with 'sudo poudriere ...' showing a status log twice. - This is intended to be upstreamed. Approved by: garga (maintainer) Tested by: swills, bdrewery Reviewed/Discussed with: kib Reported by: kwm, swills, bapt, dim, kib, many others MFH: 2017Q3
Notes
Notes: svn path=/head/; revision=447784
Diffstat (limited to 'security/sudo')
-rw-r--r--security/sudo/Makefile2
-rw-r--r--security/sudo/files/patch-src_exec__nopty.c26
2 files changed, 27 insertions, 1 deletions
diff --git a/security/sudo/Makefile b/security/sudo/Makefile
index 75341b135537..f37bd6212c50 100644
--- a/security/sudo/Makefile
+++ b/security/sudo/Makefile
@@ -3,7 +3,7 @@
PORTNAME= sudo
PORTVERSION= 1.8.20p2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= security
MASTER_SITES= SUDO
diff --git a/security/sudo/files/patch-src_exec__nopty.c b/security/sudo/files/patch-src_exec__nopty.c
new file mode 100644
index 000000000000..188125823925
--- /dev/null
+++ b/security/sudo/files/patch-src_exec__nopty.c
@@ -0,0 +1,26 @@
+--- src/exec_nopty.c.orig 2017-08-09 17:20:41 UTC
++++ src/exec_nopty.c
+@@ -201,7 +201,7 @@ exec_nopty(struct command_details *details, struct com
+ sudo_warn(U_("unable to set handler for signal %d"), SIGCHLD);
+ if (sudo_sigaction(SIGCONT, &sa, NULL) != 0)
+ sudo_warn(U_("unable to set handler for signal %d"), SIGCONT);
+-#ifdef SIGINFO
++#if defined(SIGINFO) && !defined(__FreeBSD__)
+ if (sudo_sigaction(SIGINFO, &sa, NULL) != 0)
+ sudo_warn(U_("unable to set handler for signal %d"), SIGINFO);
+ #endif
+@@ -222,6 +222,14 @@ exec_nopty(struct command_details *details, struct com
+ sudo_warn(U_("unable to set handler for signal %d"), SIGQUIT);
+ if (sudo_sigaction(SIGTSTP, &sa, NULL) != 0)
+ sudo_warn(U_("unable to set handler for signal %d"), SIGTSTP);
++#if defined(SIGINFO) && defined(__FreeBSD__)
++ /*
++ * FreeBSD's ^T will generate a SIGINFO to the controlling terminal's
++ * process group.
++ */
++ if (sudo_sigaction(SIGINFO, &sa, NULL) != 0)
++ sudo_warn(U_("unable to set handler for signal %d"), SIGINFO);
++#endif
+
+ /*
+ * The policy plugin's session init must be run before we fork