O
O
OkeyDJ2017-07-23 22:58:54
Qt
OkeyDJ, 2017-07-23 22:58:54

How to run QProcess as a different user?

Hello, tell me if it is possible to make the program run as root and run other programs through QProcess on behalf of another user. I only found in the documentation that you can enjoy QProcess and overload the setupChildProcess () function and do :: setuid (1000) in it, the only problem is that all privileges seem to drop and after that the running process cannot listen to ports, it gives an error, which is already such an address is busy, although if you run it from the console from this user, then everything is OK. Maybe someone has a solution to this issue.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question