This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Logging-in using ssh elevates the user privilege.


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

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]