Commit Graph

14 Commits

Author SHA1 Message Date
Ariel Abreu
394e033333
Add various XPC_ACTIVITY key declarations
Required by `secd`
2023-09-20 21:16:55 -04:00
Ariel Abreu
d908c3c6be
Add more missing declarations 2023-07-05 13:34:05 -04:00
Thomas A
b52d51e118 Replace xpc Header Files 2023-06-25 09:20:14 -07:00
Thomas A
0fc9e15167 Fix implicit-function-declaration
`launch_activate_socket` will be relocated into `launch.h` header file.
2023-06-19 17:51:00 -07:00
Thomas A
887ba9589a Add xpc_connection_get_audit_token in header file 2023-01-24 10:49:58 -08:00
Thomas A
1e6fc31277 Add xpc_event_publisher stubs 2022-04-29 16:47:03 -07:00
Ariel Abreu
95ff731415
Implement xpc_dictionary_get_audit_token; remove _od_rpc_call
It's in libinfo now, where it belongs
2021-11-28 23:45:34 -05:00
Ariel Abreu
efee6f689e
Add license headers everywhere and fix small issues 2021-04-22 09:18:09 -04:00
Ariel Abreu
96434fd2f1
Implement bundles and property list parsing
As noted in `plist.m`, the XML parsing implemented here is NOT robust, but it's good enough for the vast majority of files.

This commit also adds many new String methods. It also fixes an issue where syslogd would get stuck trying to send a message to itself due to our logging.
2021-04-21 12:02:02 -04:00
Ariel Abreu
b91537684e
Implement some stubs and store remote credentials for connections
Also uncomment some code for pipes (I had commented it out during testing)
2021-04-11 09:38:30 -04:00
Ariel Abreu
90b934b336
Implement pipes...
...also, add stub messages everywhere.

launchd now works again as of this commit.
2021-04-10 20:25:39 -04:00
Ariel Abreu
07ae92b98b
Implement XPC connections on top of dispatch_mach
Also includes a serialization overhaul to be more object-oriented (each XPC object class worries about its own (de)serialization). The new serialization code also includes Mach port serialization (which we didn't have before).

The "test" service is not really a test; it's more of a sample. You have to test it out manually.
2021-04-07 13:53:02 -04:00
Ariel Abreu
675120a197
Initial rewrite commit
This commit is the first in the rewrite of libxpc. It implements the basic API (that is, the XPC object system and the most basic objects and collections). It also adds some tests for the basic API.

The current test suite uses ctest as the testing framework, but for future tests (such as for connections), it may be necessary to find something a little more robust (or roll our own).

Future commits will implement the rewritten connection system based on top of libdispatch's private Mach API, which is made specifically for this purpose (it even has certain methods marked as `4libxpc`).
2021-03-27 15:14:08 -04:00
Ariel Abreu
8596b6c39a
Restrucure project and rewrite serialization logic
This commit reorganizes the project to be a little more... organized ;)

It's a matter of preference, but I personally think separating sources and headers is more orderly. Various unnecessary sources that we inherited from NextBSD have also been removed.

We now use an exported symbols list to make our exported symbols match Apple's official libxpc (with the exception of those that we haven't stubbed/defined yet).

And finally, the {de,}serialization logic has been completely rewritten to match Apple's serialization format. The only possible issue there are doubles, which like the old code, we assume the double format is identical between the source machine and the receiving machine (which is probably a safe assumption, but should be avoided if possible).

Oh, and it also various little fixes, the most important of which is that creating a non-empty dictionary now works properly (we were previously doubling the entry count).
2021-01-07 00:19:52 -05:00