Skip to content

Sudo? #38

@chucker

Description

@chucker

Having a privileged helper tool would enable a few more possibilities, such as

  • flood ping (see Ping tab #13)
  • mtr instead of traceroute (traceroute seems to be setuid; otherwise, it, too, would require sudo)

But that's a lot of work. One path would be an installer package. Another is to have an API prompt for authorization on first use, then install a helper tool, which in turn is restricted to only do the necessary privileged things. The way to do that these days seems to be SMJobBless.

  • Have a separate project for the helper tool
  • Code-sign both the main project and the helper project
  • Have SMPrivilegedExecutables on the main project reference the helper
  • Have SMAuthorizedClients on the helper project reference the main app
  • The helper must be single-file, not a bundle
  • Embed the Info.plist in the helper
  • Also embed a launchd plist
  • Implement a basic communication interface
  • Talk via XPC
  • Fortify against third-party code trying to talk to the helper directly (mainly: check the connecting client's bundle identifier and signature)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions