Page MenuHomePhabricator

[lldb] Add an option to inherit TCC permissions from parent.
ClosedPublic

Authored by JDevlieghere on Aug 4 2020, 12:08 PM.

Details

Summary

Add an option that allows the user to decide to not make the inferior is responsible for its own TCC permissions. If you don't make the inferior responsible, it inherits the permissions of its parent. The motivation is the scenario of running the LLDB test suite from an external hard drive. If the inferior is responsible, every test needs to be granted access to the external volume. When the permissions are inherited, approval needs to be granted only once.

Diff Detail

Event Timeline

JDevlieghere requested review of this revision.Aug 4 2020, 12:08 PM
JDevlieghere created this revision.
friss added a comment.Aug 4 2020, 2:55 PM

The logic of the patch itself looks fine, but the names, description and commit message are off. A process cannot disable TCC, it's always active. What your patch decides is whether the inferior is responsible for its own TCC permissions. If you don't make the inferior responsible, it inherits the permissions of its parent (which might have inherited them from its own parent). On the command line, you'll most likely get the Terminal.app permissions if nothing in the middle resets the responsible process.

JDevlieghere retitled this revision from [lldb] Add an option to disable TCC to [lldb] Add an option to inherit TCC permissions from parent..
JDevlieghere edited the summary of this revision. (Show Details)

Make it clear that TCC cannot be disabled but instead we're inheriting the permissions.

friss accepted this revision.Aug 4 2020, 4:32 PM

LGTM

This revision is now accepted and ready to land.Aug 4 2020, 4:32 PM