Commit Graph

84 Commits

Author SHA1 Message Date
Ariel Abreu
edac36c44d
Remove the JETSAM_PRIORITY_* enum in launchd_defs.h
These are already defined in <sys/kern_memorystatus.h>
2020-07-01 22:42:48 -04:00
Ariel Abreu
814e55abd7
Merge remote-tracking branch 'origin/master' into update-sources 2020-06-15 14:32:20 -04:00
Ariel Abreu
5a644a2867
Move launchd_defs.h from the main repo into libxpc 2020-06-14 23:40:20 -04:00
Ariel Abreu
3416b3d19f
Fix up definition/declaration of xpc_pipe_create and add some flag definitions 2020-06-10 10:01:53 -04:00
Thomas A
542a107926 Include libkern/OSAtomic.h
Unlike x86, there isn't an ARM specific implementation. Therefore, we need to rely on the generic implementation of OSAtomic. Since I have decided to rely on `libkern/OSAtomicDeprecated.h` for the time being, this header must be exposed to any function that uses (directly on indirectly) OSAtomic functions.
2020-05-14 18:33:08 -07:00
Ariel Abreu
79a8161e63
Initial update to clean up include directories
"initial" because there might some additional modifications necessary later on
2020-05-14 12:57:42 -04:00
Ariel Abreu
f1ec0d634c
Add xpc/availability.h
Copied over from darling/platform-include/xpc
2020-05-14 12:51:17 -04:00
Luboš Doležel
9b767f9ebe
Merge pull request #7 from facekapow/implement-dict-setters
Implement a few XPC dictionary getters and setters
2020-04-19 12:44:53 +02:00
Luboš Doležel
5e02bdd435
Merge pull request #6 from facekapow/remove-nv
Reimplement XPC packing/unpacking without `nvlist`/`nvpair`
2020-04-19 12:44:37 +02:00
Ariel Abreu
69cc197766
Implement a few XPC dictionary setters 2020-04-16 09:33:59 -04:00
Ariel Abreu
49f351dda3
xpc_double_create, not xpc_uint64_create 2020-04-16 09:30:12 -04:00
Ariel Abreu
3532d84d70
Fix algorithm explanation note in xpc_misc.c 2020-04-14 23:06:05 -04:00
Ariel Abreu
debabdb6be
Increment xo_size when appending to arrays 2020-04-14 21:20:41 -04:00
Ariel Abreu
8253dd79a8
Fix up the new implementation of the new packing algorithm 2020-04-14 21:20:03 -04:00
Ariel Abreu
e4fa5b7a15
Add back subr_sbuf.c
I accidentally deleted it thinking it was part of the `nv` implementation (since it started with `subr_` just like the `nv` files)
2020-04-14 21:18:44 -04:00
Ariel Abreu
9f3cbc2a66
Initial rewrite of XPC encoding/decoding code 2020-04-13 19:05:18 -04:00
Luboš Doležel
0564f3dad4
Merge pull request #5 from facekapow/fix-dict-getters
Return default values from xpc_dictionary getters when key isn't found
2020-04-11 08:41:31 +02:00
Ariel Abreu
6754295346
Return default values from xpc_dictionary getters when key isn't found 2020-04-10 16:35:36 -04:00
Luboš Doležel
fc8c48b5f6
Merge pull request #4 from facekapow/fix-msg-packing-and-handling
Fix message handling race condition and remove unnecessary checks in nvlist/nvpair
2020-04-10 20:10:55 +02:00
Ariel Abreu
1cbf7e4e75
Don't check for peer->xc_handler before it can be set; and...
...remove unnecessary checks in nvpair/nvlist
2020-04-10 10:10:27 -04:00
Luboš Doležel
087a54b95a
Merge pull request #3 from facekapow/xpc_create-and-misc-fixes
Implement a few more XPC functions and fix `xpc_connection_create_mach_service`
2020-04-09 08:52:06 +02:00
Ariel Abreu
d93f539811
Implement xpc_create_* and xpc_dictionary_get_double and...
...fix `xpc_connection_create_mach_service`; XPC connections must be resumed before they can be released
2020-04-08 19:43:14 -04:00
Luboš Doležel
404333b15e
Merge pull request #2 from facekapow/fix-xpc-object-behavior
Fix behavior of some XPC object functions
2020-04-07 16:08:00 +02:00
Ariel Abreu
7d8c664778
Fix behavior of some XPC object functions
In particular:
  * `xpc_string_create` needs to copy its input
  * `xpc_data_create` needs to do the same
  * `xpc_object_destroy` needs to free the memory copied into `xpc_string`s and `xpc_data`s
  * `xpc_dictionary_set_value` needs to copy the key given to it
  * `xpc_dictionary_destroy` needs to free the keys it copied

There's probably a few more, but these are the ones that popped up when I was fixing another library
2020-04-07 08:44:15 -04:00
Thomas A
b9301ffde6 Add xpc_dictionary_get_uuid stub 2020-04-01 08:56:45 -07:00
Lubos Dolezel
206faca6f3 Quick fix for a launchd crash 2020-02-28 23:38:01 +01:00
Andrew Hyatt
c2d653aa36
Merge pull request #1 from CuriousTommy/CFOpenDirectory_Fix
Add xpc_connection stubs for CFOpenDirectory
2019-09-02 01:14:51 -04:00
Thomas A
b64a02d94c Add xpc_connection stubs for CFOpenDirectory 2019-08-30 06:12:01 -07:00
Sergey Bugaev
ab2c970b0a Fix crashes in xpc_connection_recv_message() 2019-02-23 15:00:20 +03:00
Andrew Hyatt
d6a7cefd72 Correct xpc function paramater types 2019-01-15 23:49:58 -05:00
Andrew Hyatt
695e0d5e33 XPC stubs for securityd 2019-01-15 11:57:14 -05:00
Andrew Hyatt
bb16507350 Missing libxpc symbol (darlinghq/darling#445) 2019-01-05 10:51:37 -05:00
Andrew Hyatt
d3dcb32fff Changes to get libinfo to attempt DS IPC
Libinfo should now attempt to do directory service
related stuff.

darlinghq/darling#357
2018-12-17 16:11:50 -05:00
Andrew Hyatt
801e57848e Forward reboot3 to reboot2 (darlinghq/darling#450) 2018-11-22 22:43:30 -05:00
Andrew Hyatt
799f3e8965 reboot3 stub (darlinghq/darling#450) 2018-11-22 22:30:21 -05:00
Lubos Dolezel
a3e012662c Integrate some fixes from https://github.com/PureDarwin/launchd-and-libxpc/pull/3 2018-08-22 22:29:52 +02:00
Lubos Dolezel
e5ffcf16ed Integrate bugfixes from commit 43c30a322c4299c9642a62665f5698e08f35a546 in https://github.com/PureDarwin/launchd-and-libxpc.git 2018-08-22 22:11:53 +02:00
Andrew Hyatt
dad2be36e2 Stub impl 2018-01-16 21:23:03 -08:00
Lubos Dolezel
bfa1f223ac Add some more XPC activity constants 2017-08-08 21:15:06 +02:00
Andrew Hyatt
20bfd9cc53 Add stubs to xpc_dictionary.c 2017-08-07 15:24:30 -07:00
Lubos Dolezel
c7e5af6a2c Add xpc_track_activity() dummy 2017-07-25 00:48:55 +02:00
Lubos Dolezel
f053776c58 Silence yet another printf() 2017-07-24 19:26:16 +02:00
Lubos Dolezel
e05700cd55 Build fix 2017-07-24 18:54:56 +02:00
Lubos Dolezel
9c5865bcd2 Add MIG_NO_REPLY handling, the lack of which was badly breaking launchd 2017-07-24 18:49:33 +02:00
Lubos Dolezel
4437a46ee1 Fix a ton of severe bugs in libxpc to the point where it seems to work a little 2017-07-23 16:24:18 +02:00
Lubos Dolezel
a7dffc1fd5 Fix very obvious bugs in xpc_misc.c 2017-07-19 23:17:02 +02:00
Andrew Hyatt
be9688fd1d Resolve duplicate symbol 2017-05-02 20:03:09 -07:00
Andrew Hyatt
388310b810 Merge branch 'master' of github.com:darlinghq/darling-libxpc 2017-05-02 19:56:50 -07:00
Andrew Hyatt
e04033de24 Add missing function 2017-05-02 19:56:37 -07:00
Lubos Dolezel
b0d590f7f6 ...and add bsm_wrappers again 2017-05-02 23:44:38 +02:00