univ-of-utah-marriott-library-apple / privacy_services_manager

A single management utility to administer Location Services, Contacts requests, Accessibility, and iCloud access in Apple's OS X.
MIT License
126 stars 10 forks source link

Support bin for accessibility db #10

Closed MoOx closed 9 years ago

MoOx commented 9 years ago

Would be nice to be able to do

$ privacy_services_manager.py add accessibility /usr/local/bin/tmux
Set to modify local permissions for user 'MoOx' at '/Users/MoOx/Library/Application Support/com.apple.TCC/TCC.db'.
Set to modify global permissions for all users at '/Library/Application Support/com.apple.TCC/TCC.db'.
Error: ValueError: Invalid application: no path found.

I know this other project seems to handle simple bin https://github.com/jacobsalmela/tccutil

pdarragh commented 9 years ago

Hello @MoOx,

I can see why this ability would be useful, but I'm a bit hesitant. Through the current implementation, Privacy Services Manager can only modify settings for actual applications – those that have a bundle identifier registered with the system. Giving the script the ability to modify settings for regular command line utilities also inherently gives it the ability to modify settings for any kind of file on the system. This concerns me because it could potentially open the door for attacks that I can't foresee.

On the other hand, I imagine anybody using this tool is an administrator with some knowledge of what they're doing... and I suppose I would rather enable administration than restrict it.

I think I will add the ability to modify settings for any kind of file through an additional command-line switch (maybe --force or something) and document that its use is potentially dangerous yadda yadda yadda.

Thanks for using our tool! I hope this is an acceptable resolution? I'll update this issue when the update is committed.

Pierce

MoOx commented 9 years ago

I don't think a --force is required. Like you said, this tool is for people who know what there are doing. But if you want to do this, it's your tool, and this will still allow users to do what they want (so it's acceptable)

Note: you can update issue directly from commit message or just make a reference by writing the number like that: #10