Call for testing: OpenSSH-6.5

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Mon, 27 Jan 2014, Tom G. Christensen wrote:

> Sorry, but the inet_ntop change was just a hack, not a proper solution.
> For correctness such a change should be looking for inet_ntop in both
> libresolv and libnsl (for Solaris 8-10).
> Note though that Solaris 7 does not declare this function in the headers.
> 
> For killpg vs. kill I'm just patching sshd.c, changing the single use of
> killpg to kill.
> I don't know if this is universally acceptable and I only know of IRIX which
> has this issue. It might not actually cause any problems to use killpg, but as
> the manpage says results can be unpredictable.

Could you try this? You'll need to run autoreconf.

AFAIK it's actually better to use kill(0, ...) than killpg(0, ...).
My copy of susv3 says:

> int killpg(pid_t pgrp, int sig);
> ...
> If pgrp is less than or equal to 1, the behavior of killpg() is undefined.

This code was only added relatively recently, with AuthorizedKeysCommand.
It should be safe to change.

-d

Index: configure.ac
===================================================================
RCS file: /var/cvs/openssh/configure.ac,v
retrieving revision 1.564
diff -u -p -r1.564 configure.ac
--- configure.ac	25 Jan 2014 22:46:54 -0000	1.564
+++ configure.ac	27 Jan 2014 12:05:32 -0000
@@ -1240,6 +1240,9 @@ AC_SEARCH_LIBS([openpty], [util bsd])
 AC_SEARCH_LIBS([updwtmp], [util bsd])
 AC_CHECK_FUNCS([fmt_scaled scan_scaled login logout openpty updwtmp logwtmp])
 
+# On some platforms, inet_ntop may be found in libresolv or libnsl.
+AC_SEARCH_LIBS([inet_ntop], [resolv nsl])
+
 AC_FUNC_STRFTIME
 
 # Check for ALTDIRFUNC glob() extension
Index: sshd.c
===================================================================
RCS file: /var/cvs/openssh/sshd.c,v
retrieving revision 1.441
diff -u -p -r1.441 sshd.c
--- sshd.c	17 Jan 2014 05:47:04 -0000	1.441
+++ sshd.c	27 Jan 2014 12:07:47 -0000
@@ -372,7 +372,7 @@ grace_alarm_handler(int sig)
 	 */
 	if (getpgid(0) == getpid()) {
 		signal(SIGTERM, SIG_IGN);
-		killpg(0, SIGTERM);
+		kill(0, SIGTERM);
 	}
 
 	/* Log error and exit. */


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux