Public Types |
enum | Errors { SuNotFound = 1,
SuNotAllowed,
SuIncorrectPassword
} |
enum | checkMode { NoCheck = 0,
Install = 1,
NeedPassword = 2
} |
Public Member Functions |
| SuProcess (const TQCString &user=0, const TQCString &command=0) |
int | exec (const char *password, int check=NoCheck) |
int | checkInstall (const char *password) |
int | checkNeedPassword () |
Protected Member Functions |
virtual void | virtual_hook (int id, void *data) |
Executes a command under elevated privileges, using su.
Definition at line 26 of file su.h.
TQCString command = __PATH_SU; if (::access(__PATH_SU, X_OK) != 0)
command = TQFile::encodeName(KGlobal::dirs()->findExe("su"));
if (kill(m_Pid, SIGKILL) < 0) { ret=error; }
Definition at line 86 of file su.cpp.