Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

unconitionally use socketpair?

2 views
Skip to first unread message

Darren Tucker

unread,
Jun 2, 2011, 9:08:02 PM6/2/11
to
Does anyone actually use sshd on a system that doesn't have socketpair?
It's used elsewhere so the don't-have path seems like it'd never be
exercised these days.

Index: monitor.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh/monitor.c,v
retrieving revision 1.147
diff -u -p -r1.147 monitor.c
--- monitor.c 29 May 2011 11:39:38 -0000 1.147
+++ monitor.c 3 Jun 2011 01:05:31 -0000
@@ -1853,13 +1853,8 @@ mm_init_compression(struct mm_master *mm
static void
monitor_socketpair(int *pair)
{
-#ifdef HAVE_SOCKETPAIR
if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
fatal("%s: socketpair", __func__);
-#else
- fatal("%s: UsePrivilegeSeparation=yes not supported",
- __func__);
-#endif
FD_CLOSEONEXEC(pair[0]);
FD_CLOSEONEXEC(pair[1]);
}

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-...@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

Tim Rice

unread,
Jun 2, 2011, 9:34:58 PM6/2/11
to
On Fri, 3 Jun 2011, Darren Tucker wrote:

> Does anyone actually use sshd on a system that doesn't have socketpair?
> It's used elsewhere so the don't-have path seems like it'd never be
> exercised these days.

I found 2 systems in my survey file. One was an old SCO system we no
longer support and the other (from 2006) was "host: i586-pc-syllable"
Whatever that is.

--
Tim Rice Multitalents (707) 456-1146
t...@multitalents.net (707) 887-1469

Darren Tucker

unread,
Jun 2, 2011, 10:08:53 PM6/2/11
to
On Fri, Jun 3, 2011 at 11:34 AM, Tim Rice <t...@multitalents.net> wrote:
[...]

> I found 2 systems in my survey file. One was an old SCO system we no
> longer support and the other (from 2006) was "host: i586-pc-syllable"
> Whatever that is.

It's a BEOS clone.

We could just stick a null implementation of socketpair in the compat
library that just returns failure and sets errno to ENOENT or
something. That'd allow any such systems to still compile and mostly
work, without adding to the work of pulling changes from OpenBSD.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Darren Tucker

unread,
Jun 3, 2011, 12:04:57 AM6/3/11
to
On Fri, Jun 3, 2011 at 12:08 PM, Darren Tucker <dtu...@zip.com.au> wrote:
[...]

> We could just stick a null implementation of socketpair in the compat
> library that just returns failure and sets errno to ENOENT or
> something.  That'd allow any such systems to still compile and mostly
> work, without adding to the work of pulling changes from OpenBSD.

I committed the removal. This code has been in sshd.c for ~5y without
an ifdef, so anything that doesn't have socketpair is long broken.

if (rexec_flag && socketpair(AF_UNIX,
SOCK_STREAM, 0, config_s) == -1) {

0 new messages