Skip to content

chore(mdm): use launchctl bootstrap/bootout instead of load/unload#98

Open
shubham-stepsecurity wants to merge 2 commits into
step-security:mainfrom
shubham-stepsecurity:sm/feat/add-support
Open

chore(mdm): use launchctl bootstrap/bootout instead of load/unload#98
shubham-stepsecurity wants to merge 2 commits into
step-security:mainfrom
shubham-stepsecurity:sm/feat/add-support

Conversation

@shubham-stepsecurity
Copy link
Copy Markdown
Member

What does this PR do?

Type of change

  • Bug fix
  • Enhancement
  • Documentation

Testing

  • Tested on macOS (version: ___)
  • Binary runs without errors: ./stepsecurity-dev-machine-guard --verbose
  • JSON output is valid: ./stepsecurity-dev-machine-guard --json | python3 -m json.tool
  • No secrets or credentials included
  • Lint passes: make lint
  • Tests pass: make test

Related Issues

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the macOS launchd installer/uninstaller to use launchctl bootstrap / launchctl bootout instead of the deprecated load / unload verbs, selecting the appropriate launchd domain (system vs gui/<uid>) based on whether the process is running as root.

Changes:

  • Switch install path from launchctl load <plist> to launchctl bootstrap <domain> <plist>.
  • Switch uninstall path from launchctl unload <plist> to launchctl bootout ... and add domain targeting logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/launchd/launchd.go Outdated
Comment thread internal/launchd/launchd.go Outdated
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.

2 participants