mirror of
https://github.com/darlinghq/darling-libxpc.git
synced 2024-11-26 21:20:28 +00:00
Stub launch_activate_socket
This commit is contained in:
parent
96d94ab0d0
commit
a5afd7a370
@ -22,4 +22,6 @@ mach_port_t xpc_dictionary_copy_mach_send(xpc_object_t, const char *);
|
||||
xpc_object_t xpc_copy_entitlements_for_pid(pid_t);
|
||||
xpc_object_t ld2xpc(launch_data_t);
|
||||
|
||||
int launch_activate_socket(const char* key, int** fds, size_t* count);
|
||||
|
||||
#endif
|
||||
|
20
xpc_misc.c
20
xpc_misc.c
@ -1050,3 +1050,23 @@ xpc_dictionary_set_uuid(xpc_object_t xdict, const char *key, const uuid_t uuid)
|
||||
{
|
||||
printf("STUB xpc_dictionary_set_uuid\n");
|
||||
}
|
||||
|
||||
int launch_activate_socket(const char* key, int** fds, size_t* count) {
|
||||
// notes for someone implementing this in the future:
|
||||
//
|
||||
// this function is used in OpenSSH in ssh-agent.c
|
||||
//
|
||||
// `key` is the socket key in the current process's launchd plist
|
||||
// `fds` is a pointer to an array that we allocate that is freed by the caller
|
||||
// `count` is the size of that array
|
||||
//
|
||||
// implementing this requires looking up the current process's launchd plist
|
||||
// and reading socket values from there (or talking to launchd to do that,
|
||||
// if we can do that; i haven't looked into this much)
|
||||
printf("STUB launch_activate_socket\n");
|
||||
if (fds)
|
||||
*fds = NULL;
|
||||
if (count)
|
||||
*count = 0;
|
||||
return -1;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user