bug-hurd
[Top][All Lists]
Advanced

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

Re: What's missing/wrong in these test programs?


From: Svante Signell
Subject: Re: What's missing/wrong in these test programs?
Date: Fri, 10 Apr 2015 13:58:23 +0200

On Thu, 2015-04-09 at 01:13 +0200, Samuel Thibault wrote:
> Svante Signell, le Wed 08 Apr 2015 21:56:36 +0200, a écrit :
> > New try, now with sendmsg/recvmsg.
> 
> Ah, I hadn't read your source code when answering on IRC.
> 
> > How to send the rendzevous port: as real data or ancillary data?
> 
> None of those two: real data wouldn't actually transfer the port, and
> as anciliary data, it would need to be an FD, which it isn't.  What
> you want to do is not use the posix layer (send/sendmsg), but the
> underlying hurdish interface (which is what you'll want to use for
> running proc_identify for flock and SCM_CRED anyway), i.e. socket_send
> and socket_receive on the underlying port behind the socket FD. Those
> function will take and give the rendez-vous port properly (i.e. not just
> the port name value, but the real port transferred from one process to
> another, with most probably a different port name value in the target
> process).

New test programs:
auth_socket_send/recv.c
ident_socket_send/recv.c (change if 0 to if 1 to activate
proc_user/server_identify())

One strange thing with these programs (without
proc_user/server_identify() enabled) is:
- auth_socket_send/recv.c reports received data being zero for
SOCKET_STREAM
- ident_socket_send/recv.c reports received data being zero for
SOCKET_DGRAM

Attachment: auth_socket_recv.c
Description: Text Data

Attachment: auth_socket_send.c
Description: Text Data

Attachment: ident_socket_recv.c
Description: Text Data

Attachment: ident_socket_send.c
Description: Text Data


reply via email to

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