system_services.h 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef SANDBOX_MAC_SYSTEM_SERVICES_H_
  5. #define SANDBOX_MAC_SYSTEM_SERVICES_H_
  6. #include "sandbox/mac/seatbelt_export.h"
  7. namespace sandbox {
  8. // Tells LaunchServices that the process is not a normal GUI application, which
  9. // permits the process to call into various Carbon services without requiring
  10. // an ASN. This marks the process as a "daemon". If the process is currently
  11. // connected to LaunchServices, the connection is closed and the system is
  12. // instructed to not attempt to connect again. This does not alter the sandbox
  13. // policy (i.e., direct lookup requests to launchd will not be affected), but
  14. // it instructs system frameworks to not attempt to connect.
  15. SEATBELT_EXPORT void DisableLaunchServices();
  16. // Disables the CoresServices CheckFix list. CoreServices maintains a
  17. // compatability database of bugs and workarounds by bundle ID. The system
  18. // depends on check-in in to LaunchServices to obtain a shared memory mapping of
  19. // the database, but if that fails (e.g. under the sandbox), it scans entries
  20. // in /System/Library for individual bug fix lists. This call disables the
  21. // CheckFix list.
  22. SEATBELT_EXPORT void DisableCoreServicesCheckFix();
  23. } // namespace sandbox
  24. #endif // SANDBOX_MAC_SYSTEM_SERVICES_H_