libjailbreak_mig.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #include <sys/types.h>
  2. #include <stdint.h>
  3. /* Flags for entp command. Any combination or none can be specified. */
  4. /* Wait for xpcproxy to exec before continuing */
  5. #define FLAG_WAIT_EXEC (1 << 5)
  6. /* Wait for 0.5 sec after acting */
  7. #define FLAG_DELAY (1 << 4)
  8. /* Send SIGCONT after acting */
  9. #define FLAG_SIGCONT (1 << 3)
  10. /* Set sandbox exception */
  11. #define FLAG_SANDBOX (1 << 2)
  12. /* Set platform binary flag */
  13. #define FLAG_PLATFORMIZE (1 << 1)
  14. /* Set basic entitlements */
  15. #define FLAG_ENTITLE (1)
  16. typedef void *jb_connection_t;
  17. #if __BLOCKS__
  18. typedef void (^jb_callback_t)(int result);
  19. /* These ones run asynchronously. Callbacks take 1 on success, 0 on failure.
  20. The queue which they run on is undefined. */
  21. extern void jb_entitle(jb_connection_t connection, pid_t pid, uint32_t what, jb_callback_t done);
  22. extern void jb_fix_setuid(jb_connection_t connection, pid_t pid, jb_callback_t done);
  23. #endif
  24. extern jb_connection_t jb_connect(void);
  25. extern void jb_disconnect(jb_connection_t connection);
  26. extern int jb_entitle_now(jb_connection_t connection, pid_t pid, uint32_t what);
  27. extern int jb_fix_setuid_now(jb_connection_t connection, pid_t pid);
  28. extern void jb_oneshot_entitle_now(pid_t pid, uint32_t what);
  29. extern void jb_oneshot_fix_setuid_now(pid_t pid);