13#include <kdesu/kdesu_export.h>
60 int exec(
const QByteArray &command,
const QByteArray &user,
const QByteArray &options =
nullptr,
const QList<QByteArray> &env = QList<QByteArray>());
75 int setPass(
const char *pass,
int timeout);
98 int delCommand(
const QByteArray &command,
const QByteArray &user);
109 int setVar(
const QByteArray &key,
const QByteArray &value,
int timeout = 0,
const QByteArray &group =
nullptr);
116 QByteArray
getVar(
const QByteArray &key);
123 QList<QByteArray>
getKeys(
const QByteArray &group);
190 int command(
const QByteArray &cmd, QByteArray *result =
nullptr);
191 QByteArray escape(
const QByteArray &str);
194 std::unique_ptr<class KDEsuClientPrivate>
const d;
A client class to access kdesud, the KDE su daemon.
Definition: client.h:42
int setScheduler(int scheduler)
Set the desired scheduler (optional), see StubProcess.
int delVars(const QByteArray &special_key)
Delete all persistent variables with the given key.
int delCommand(const QByteArray &command, const QByteArray &user)
Remove a password for a user/command.
QList< QByteArray > getKeys(const QByteArray &group)
Gets all the keys that are membes of the given group.
int setHost(const QByteArray &host)
Set the target host (optional).
int setPass(const char *pass, int timeout)
Set root's password, lasts one session.
int delGroup(const QByteArray &group)
Delete all persistent variables in a group.
QByteArray getVar(const QByteArray &key)
Get a persistent variable.
int exec(const QByteArray &command, const QByteArray &user, const QByteArray &options=nullptr, const QList< QByteArray > &env=QList< QByteArray >())
Lets kdesud execute a command.
int setPriority(int priority)
Set the desired priority (optional), see StubProcess.
int stopServer()
Stop the daemon.
bool isServerSGID()
Returns true if the server is safe (installed setgid), false otherwise.
int exitCode()
Wait for the last command to exit and return the exit code.
bool findGroup(const QByteArray &group)
Returns true if the specified group exists is cached.
int startServer()
Try to start up kdesud.
int setVar(const QByteArray &key, const QByteArray &value, int timeout=0, const QByteArray &group=nullptr)
Set a persistent variable.
int delVar(const QByteArray &key)
Delete a persistent variable.