[PATCH] Cygwin: Allow to set SO_PEERCRED zero (v2)

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Dec 8 09:47:33 GMT 2020


Hi Mark,

On Dec  7 19:25, Mark Geisert wrote:
> Hi Corinna,
> 
> Corinna Vinschen via Cygwin-patches wrote:
> > On Dec  7 16:30, Corinna Vinschen via Cygwin-patches wrote:
> > > On Dec  7 02:29, Mark Geisert wrote:
> > > > The existing code errors as EINVAL any attempt to set a value for
> > > > SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket.  But to
> > > > enable the workaround set_no_getpeereid behavior for Python one has
> > > > to be able to set SO_PEERCRED to zero.  Ergo, this patch.  Python has
> > > > no way to specify a NULL pointer for 'optval'.
> > > > 
> > > > This v2 of patch allows the original working (i.e., allow NULL,0 for
> > > > optval,optlen to mean turn off SO_PEERCRED) in addition to the new
> > > > working described above.  The sense of the 'if' stmt is reversed for
> > > > readability.
> > > > 
> > > > ---
> [...]
> > > > -- 
> > > > 2.29.2
> > > 
> > > Pushed
> > 
> > I created new developer snapshots for testing.
> 
> I didn't phrase my comment somewhere about "future snapshot TBA" as I had
> intended.  I just meant some future snapshot, not that I was requesting one
> for this patch.  But thank you very much anyway.

I freely admit I didn't actually read your comment :}

I just created this snapshot because it seemed useful, so all is well :)


Corinna


More information about the Cygwin-patches mailing list