[launchd-dev] Replacing the env variable set by SecureSocketWithKey.

Mihai Moldovan ionic at ionic.de
Sun Jul 6 15:01:30 PDT 2014


* On 06.07.2014 05:21 pm, Mihai Moldovan wrote:
> Reading launchd's source code, I've gathered from support/launchctl.c that
> LAUNCH_JOBSOCKETKEY_SECUREWITHKEY is just a wrapper and actually adds a
> LAUNCH_JOBSOCKETKEY_PATHNAME dict with the secure socket path to the data array.
>
> However, I have been unable to query a LAUNCH_JOBSOCKETKEY_PATHNAME from a
> socket dict returned by launch_data_dict_lookup(checkin_response,
> LAUNCH_JOBKEY_SOCKETS);

This said, taking another look at src/core.c:job_export() reveals that for any
CheckIn request, only an array of file descriptors is returned for all defined
sockets. So whatever I try to do with the returned object, I won't be able to
fetch the socket path out of this one.

The other code (the "LAUNCH_JOBSOCKETKEY_PATHNAME" part) seems to be
launchd-internal and I don't see any way to access this private data.

Am I missing something?



Mihai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4265 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.macosforge.org/pipermail/launchd-dev/attachments/20140707/3b801d9b/attachment.p7s>


More information about the launchd-dev mailing list