KDEsuClient Class Reference
#include <client.h>
Detailed Description
A client class to access kdesud, the KDE su daemon.Kdesud can assist in password caching in two ways:
- For high security passwords, like for su and ssh, it executes the password requesting command for you. It feeds the password to the command, without ever returning it to you, the user. The daemon should be installed setgid nogroup, in order to be able to act as an inaccessible, trusted 3rd party. See exec, setPass, delCommand.
- For lower security passwords, like web and ftp passwords, it can act as a persistent storage for string variables. These variables are returned to the user, and the daemon doesn't need to be setgid nogroup for this. See setVar, delVar, delGroup.
Definition at line 50 of file client.h.
Public Member Functions | |
int | exec (const QCString &command, const QCString &user, const QCString &options=0, const QCStringList &env=QCStringList()) |
int | exitCode () |
int | setPass (const char *pass, int timeout) |
int | setHost (const QCString &host) |
int | setPriority (int priority) |
int | setScheduler (int scheduler) |
int | delCommand (const QCString &command, const QCString &user) |
int | setVar (const QCString &key, const QCString &value, int timeout=0, const QCString &group=0) |
QCString | getVar (const QCString &key) |
QValueList< QCString > | getKeys (const QCString &group) |
bool | findGroup (const QCString &group) |
int | delVar (const QCString &key) |
int | delVars (const QCString &special_key) |
int | delGroup (const QCString &group) |
int | ping () |
int | stopServer () |
int | startServer () |
bool | isServerSGID () |
Member Function Documentation
|
Remove a password for a user/command.
Definition at line 268 of file client.cpp. |
|
Delete all persistent variables in a group.
Definition at line 353 of file client.cpp. |
|
Delete a persistent variable.
Definition at line 345 of file client.cpp. |
|
Delete all persistent variables with the given key.
A specicalized variant of delVar(QCString) that removes all subsets of the cached varaibles given by
Definition at line 361 of file client.cpp. |
|
Lets kdesud execute a command. If the daemon does not have a password for this command, this will fail and you need to call setPass().
Definition at line 224 of file client.cpp. |
|
Wait for the last command to exit and return the exit code.
Definition at line 374 of file client.cpp. |
|
Returns true if the specified group exists is cached.
Definition at line 335 of file client.cpp. |
|
Gets all the keys that are membes of the given group.
Definition at line 302 of file client.cpp. |
|
Get a persistent variable.
Definition at line 292 of file client.cpp. |
|
Returns true if the server is safe (installed setgid), false otherwise.
Definition at line 401 of file client.cpp. |
|
Ping kdesud. This can be used for diagnostics.
Definition at line 369 of file client.cpp. |
|
Set the target host (optional).
Definition at line 246 of file client.cpp. |
|
Set root's password, lasts one session.
Definition at line 214 of file client.cpp. |
|
Set the desired priority (optional), see StubProcess.
Definition at line 254 of file client.cpp. |
|
Set the desired scheduler (optional), see StubProcess.
Definition at line 261 of file client.cpp. |
|
Set a persistent variable.
Definition at line 277 of file client.cpp. |
|
Try to start up kdesud.
Definition at line 417 of file client.cpp. |
|
Stop the daemon.
Definition at line 383 of file client.cpp. |
The documentation for this class was generated from the following files: