Logging-in using ssh elevates the user privilege.
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Mar 8 15:56:00 GMT 2019
On Mar 9 00:39, Takashi Yano wrote:
> Hi Corinna,
>
> On Fri, 8 Mar 2019 15:11:18 +0100 Corinna Vinschen wrote:
> > setsockopt (sock, SOL_SOCKET, SO_PEERCRED, NULL, 0);
> > before calling accept or connect.
>
> I added this to the test code but it failed as:
>
> Server: Created.
> Server: Binded.
> Server: Listened.
> Client: Created.
> Client: Connected.
> Client: Written.
> accept: Software caused connection abort
>
> Of course, setsockopt() was added also before connect().
>
> So, I moved the setsockopt() from just before accept()
> to just before listen(), then it succeeded.
>
> Server: Created.
> Server: Binded.
> Server: Listened.
> Client: Created.
> Client: Connected.
> Client: Written.
> Server: Accepted.
> 10: 1234567890
> Server: Read.
>
> Does this affect to listen() as well?
No, listen isn't affected.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190308/e21edb3f/attachment.sig>
More information about the Cygwin
mailing list