Commit Graph

9 Commits

Author SHA1 Message Date
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
0ec7a91082
Implement xpc_main
However, bundled XPC services still don't work properly.

The problem is that bundled XPC service support needs to be implemented in launchd.
The open-source launchd sources are severely outdated, much like CoreFoundation.
The new launchd is based on libxpc and is closed-source.
We probably don't want to completely rewrite launchd, but at the very least, we do need to add support for new XPC-based features.
2021-04-21 17:30:34 -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
6a52941087
Fix absolute dates 2021-04-21 11:55:56 -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