Skip to content

Fix privileged helper installation file scope - #8

Open
kennywam wants to merge 1 commit into
XiaoMiku01:mainfrom
kennywam:fix/tetherkit-helper-install-scope
Open

kennywam wants to merge 1 commit into
XiaoMiku01:mainfrom
kennywam:fix/tetherkit-helper-install-scope

Conversation

@kennywam

Copy link
Copy Markdown

Problem

The privileged helper installer recursively changed ownership of the shared:

/Library/PrivilegedHelperTools

This can affect files owned by unrelated applications and may fail when macOS protects those files.

The installer could therefore fail even though TetherKit's own helper payload was valid.

Fix

  • Limit ownership and permission changes to TetherKit-owned helper files.
  • Derive installed library paths from the packaged TetherKit payload instead of scanning the shared destination directory.
  • Avoid changing permissions on an existing /Library/PrivilegedHelperTools directory.
  • Reject symlinked helper, plist, and shared-directory paths.
  • Prefer the packaged helper payload over inherited TETHERKIT_HELPER_DIR values during GUI installation.
  • Scope uninstall cleanup to libraries present in the trusted TetherKit payload.
  • Remove com.apple.quarantine from the installed LaunchDaemon plist before registration.

Verification

Verified locally on macOS:

  • C++ build passes
  • CTest: 23/23 passed
  • Swift package builds
  • GUI packaging passes
  • Code signature verification passes
  • Shell syntax validation passes
  • No recursive chown -R or chmod -R remains
  • Normal GUI privileged-helper installation succeeds
  • LaunchDaemon starts successfully
  • Helper runs from /Library/PrivilegedHelperTools/com.tetherkit.helper
  • Unrelated eqMac and Docker helper ownership/permissions remain unchanged
  • Installed LaunchDaemon plist contains no com.apple.quarantine

Notes

Swift XCTest could not run because the active Command Line Tools SDK does not provide the XCTest module. No system configuration changes were made to work around that.

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

Successfully merging this pull request may close these issues.

1 participant