Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Writing of Preference File Values #12

Closed
0xmachos opened this issue Feb 9, 2021 · 2 comments
Closed

Inconsistent Writing of Preference File Values #12

0xmachos opened this issue Feb 9, 2021 · 2 comments
Milestone

Comments

@0xmachos
Copy link

0xmachos commented Feb 9, 2021

macOS Version: macOS 11.2 (20D64)
Kernel Version: Darwin 20.3.0
Shield Version: v0.9.5
User Type: Admin
Terminal Full Disk Access: Yes
SIP: Enabled

While discovering #11 I noticed that the value of isRunning is not consistantly updated in the PREFS_FILE (com.csaba.fitzl.shield.preferences.plist) when the UI Preferences Toggle is changed or the Menu Bar menu is used to start/ stop shield.

It appears that the value of isRunning being updated in com.csaba.fitzl.shield.preferences.plist is linked to value of isBlocking being changed.

Steps to Reproduce

  1. Open Shield Preferences
  2. Disable all injection protection settings
    • This is not necessary for reproduction it just makes it easier to read the defaults output later on
  3. Enable Shield and enable blocking mode
  4. Execute defaults read /Library/Application\ Support/Shield/com.csaba.fitzl.shield.preferences.plist
    • The result should be:
isBlocking = 1;
isRunning = 1;
  1. Disable Shield via the Shield Preferences UI or Menu Bar UI
  2. Execute defaults read /Library/Application\ Support/Shield/com.csaba.fitzl.shield.preferences.plist
    • The result should be:
isBlocking = 1;
isRunning = 1;
  • However the Shield Preferences UI and Menu Bar UI will indicate that Shield is stopped
  1. Disable Blocking Mode
  2. Execute defaults read /Library/Application\ Support/Shield/com.csaba.fitzl.shield.preferences.plist
    • The result should be:
isBlocking = 0;
isRunning = 0;
  1. Enable Shield via the Shield Preferences UI or Menu Bar UI
    • Execute defaults read /Library/Application\ Support/Shield/com.csaba.fitzl.shield.preferences.plist
    • The result should be:
isBlocking = 0;
isRunning = 0;

These steps also work if you start with Blocking Mode disabled and enable it in step 7 rather than disabling it.

The value of isRunning is also not updated if you close the Shield Preferences window then execute the defaults read command.

@theevilbit
Copy link
Owner

Indeed. I guess this was "by design", as I ignore the isRunning setting in beta completely. I will fix it in the next release, so even if it's ignored, it's still correctly saved.

@theevilbit theevilbit added this to the 9.5.1 milestone Feb 9, 2021
@theevilbit
Copy link
Owner

Fixed in 13c48e0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants