commit | f6c7504fedb30bcf48d229fb3f4db7c08e8e7b80 | [log] [tgz] |
---|---|---|
author | Ian McKellar <ianloic@google.com> | Mon Apr 24 12:12:11 2017 -0700 |
committer | Ian McKellar <ianloic@google.com> | Mon Apr 24 12:12:11 2017 -0700 |
tree | 9fe453fd9305f365d64e429fde7b8e2a0ee14231 | |
parent | 0e75f9ae1c72a58ed580675a8c0f352ec152df09 [diff] |
In inetd mode use the socket on stdin for input and output. Change-Id: I3d8f8c8b06b7c9032bf0bf7ef317bd2422bcd1ce
diff --git a/sshd.c b/sshd.c index df694fe..9b3caab 100644 --- a/sshd.c +++ b/sshd.c
@@ -993,7 +993,12 @@ } } else { *sock_in = dup(STDIN_FILENO); +#ifdef __Fuchsia__ + // Currently in Fuchsia the socket only comes on stdin. + *sock_out = dup(STDIN_FILENO); +#else *sock_out = dup(STDOUT_FILENO); +#endif // __Fuchsia__ } /* * We intentionally do not close the descriptors 0, 1, and 2