Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using SMJobBless to execute commands with elevated privileges on Mac OS X
Forum Updated to NodeBB v4.3 + New Features

Using SMJobBless to execute commands with elevated privileges on Mac OS X

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • napajejenunedk0N Offline
    napajejenunedk0N Offline
    napajejenunedk0
    wrote on last edited by
    #1

    Is there a live example which describes the proper way to integrate:
    https://github.com/atnan/SMJobBlessXPC

    in an existing Qt application project?

    From Mac OS X 10.7 onwards writing to /Library/Application Support/... needs elevated privileges.

    As far as I know using SMJobBless in an application is the most proper way to execute commands with elevated privileges on Mac OS X. This means that the application that should execute such commands should install a privileged helper tool in /Library/PrivilegedHelperTools and when the source application wants to execute a command with elevated privileges, it should first install the helper tool and communicate with it the commands to be executed.

    Is there any written walkthrough about how to incorporate the privileged helper tool technique in Qt application project?

    1 Reply Last reply
    0
    • KATO2K Offline
      KATO2K Offline
      KATO2
      wrote on last edited by
      #2

      I have create a project in Qt to show how to sign, install an execute a privileged helper tool by using SMJobBless; you can see the code here: https://github.com/mbsanchez/QtPrivilegedHelperExample

      I have created it, because there is not documentation on how to install a privileged helper tool, developed with C++ on QtCreator. Other projects are developed using xcode, however my code is developed completely in C++ using QtCreator.

      qmake is used to alter the plist files, and sign the executables and app bundle.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved