bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Update: Failing tests: Re: RFC: [PATCH] SCM_CREDS support


From: Samuel Thibault
Subject: Re: Update: Failing tests: Re: RFC: [PATCH] SCM_CREDS support
Date: Mon, 14 Mar 2016 12:02:01 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Svante Signell, on Mon 14 Mar 2016 09:05:56 +0100, wrote:
> On Mon, 2016-03-14 at 00:57 +0100, Samuel Thibault wrote:
> > Svante Signell, on Sun 13 Mar 2016 14:19:35 +0100, wrote:
> > > Running the code reveals that the current implementation in glibc is 
> > > buggy:
> > > 
> > > ./scm_rights+creds_recv
> > > Number of SCM_RIGHTS [<=3], SCM_CREDS [<=2]: [1,1] 
> > > Input error: Using defaults: 
> > > NRIGHTS = 1, NCREDS = 1
> > > scm_rights+creds_send.c: msgh.msg_controllen = 112 (from control_un)
> > > Receiving via datagram socket
> > > recvmsg: (os/kern) invalid right
> > 
> > I've had a closer look, what happens here is that the
> > mach_port_mod_refs() call on the rendezvous port fails because the port
> > type of the rendezvous port is DEADNAME, i.e. the other end dropped the
> > port.  Indeed, your sending program terminates as soon as it has sent
> > its message.  You need to make it wait at least a bit for the receiver
> > to get to receive the credentials.
> 
> Well, the program works perfectly on kFreeBSD (Linux is different).

That doesn't mean that the program behaves correctly.

> And with my old implementation it worked perfectly too.

Because it was synchronous, which was posing other problems.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]