[Top][All Lists]

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

What's missing/wrong in these test programs?

From: Svante Signell
Subject: What's missing/wrong in these test programs?
Date: Wed, 08 Apr 2015 10:12:24 +0200


I'm trying to write test programs for auth_user/server_authenticate (and
later for proc_user/server_authenticate) and have problems to get them
right. The attached programs generate the following output:

auth_recv.c: Socket file descriptor = 3
auth_recv.c: Receiving via datagram socket
auth_send.c: Socket file descriptor = 3
auth_send.c: Sending via datagram socket
auth_send.c: rendezvous = 128
auth_send.c: mach_port_insert_right() err = 0
auth_send.c: Sent rendezvous port = 128
auth_send.c: send() returned 4 bytes
auth_recv.c: recv() returned 4 bytes
auth_recv.c: Received data = 128
auth_recv.c: rendezvous valid
auth_recv.c: mach_port_mod_refs() err = 15
auth_recv.c: err = 15

EKERN_INVALID_NAME              = 15

trying with mach_port_insert_right() gives error 18:
EKERN_INVALID_VALUE             = 18

What's missing/wrong here?
Do I have to reauthenticate the received rendezvous port in auth_recv?

Attachment: auth_send.c
Description: Text Data

Attachment: auth_recv.c
Description: Text Data

reply via email to

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