Stub launch_activate_socket

This commit is contained in:
Ariel Abreu 2020-07-29 18:49:53 -04:00
parent 96d94ab0d0
commit a5afd7a370
No known key found for this signature in database
GPG Key ID: ECF8C2B9E8AD3E6B
2 changed files with 22 additions and 0 deletions

View File

@ -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

View File

@ -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;
};