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. Sudo Qt Application on OS X from the created DMG
Forum Updated to NodeBB v4.3 + New Features

Sudo Qt Application on OS X from the created DMG

Scheduled Pinned Locked Moved General and Desktop
macdeployqtmacsudococoasudo
1 Posts 1 Posters 838 Views 2 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.
  • B Offline
    B Offline
    blues-man
    wrote on 24 Mar 2015, 23:48 last edited by
    #1

    Hi,
    I would like to find out the most suitable way in order to deliver a Qt Application on OS X that requires root privileges. I'm using macdeployqt tool that let me resolve all dependencies and ship everything in a DMG, but I need to sudo the Qt binary to open some privileged port (<1024) thus I need to ask the user password before executing it.
    Right now, I'm just calling Cocoasudo binary from a C program that makes:

    execlp("./cocoasudo", "cocoasudo", "./qtbinary");

    this binary is called modifying Info.plist Application file, thus the Application ask for user password and cocoasudo does it job, but I wonder if there is another more standard way in order to do this without this tricky mode. Maybe integrating directly Cocoasudo code inside the Qt Project, but how to run grant the program from Qt main loop?

    Thanks

    1 Reply Last reply
    0

    1/1

    24 Mar 2015, 23:48

    • Login

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