SelfControlApp / selfcontrol

:skull: Mac app to block your own access to distracting websites etc for a predetermined period of time. It can not be undone by the app or by a restart – you must wait for the timer to run out.
http://selfcontrolapp.com
GNU General Public License v3.0
4.03k stars 399 forks source link

[SPOiLER] Block X/Y preferences #299

Closed pheonixia closed 10 months ago

pheonixia commented 9 years ago

I just found out that one can unlock Self Control when it is running if we go and change the Date/Time Preferences in Mac. It shuts down the application. My question is: is there a way to block date/time preferences to be opened while this program is running?

anshukla commented 9 years ago

An easy workaround would be to have someone else change your administrator password so it's impossible to edit System Preferences.

pheonixia commented 8 years ago

Sorry about that - I added the spoiler.

sejmann commented 8 years ago

Irony. A spoiler warning calling out the simple bypass for an app for people with self-control issues. Are the users supposed to see the spoiler and resist? =)

I see three possible solutions: 1) A background helper process could also monitor the real time clock and detect jumps as they happen, and adjust the unlock target date/time accordingly. 2) The app could use an NTP server to verify true time at the start and end. 3) A background helper process could keep track of minutes as they tick passed, recording the number remaining in an obfuscated placed, to survive reboots.

The first is my favorite, because it doesn't require internet access, or the computer to be on all the time, as the other two do, respectively.

Edit: It just occurred to me that it would be necessary differentiate between time jumps related to computer sleeping/waking and RTC adjustment, by listening for a wake event.

miheerdew commented 8 years ago

Sorry for reviving this thread, and adding a shameless plug. But I think that SelfControl should assume that the user does not have admin privileges (just like parental controls) - not doing so may unnecessarily limit the code and make it more complicated.

Users with admin privileges can either give their passwords to someone they trust, or do some kind of privilege dropping like I have done here.

slambert commented 10 months ago

Duplicate https://github.com/SelfControlApp/selfcontrol/issues/28