KDEsu
SuProcess Class Reference
Executes a command under elevated privileges, using su. More...
#include <su.h>
Inheritance diagram for SuProcess:

Public Types | |
| enum | checkMode { NoCheck = 0, Install = 1, NeedPassword = 2 } |
| enum | Errors { SuNotFound = 1, SuNotAllowed, SuIncorrectPassword } |
Public Member Functions | |
| int | checkInstall (const char *password) |
| int | checkNeedPassword () |
| int | exec (const char *password, int check=NoCheck) |
| SuProcess (const QCString &user=0, const QCString &command=0) | |
| ~SuProcess () | |
Protected Member Functions | |
| virtual void | virtual_hook (int id, void *data) |
Detailed Description
Executes a command under elevated privileges, using su.Definition at line 26 of file su.h.
Member Enumeration Documentation
| enum SuProcess::checkMode |
| enum SuProcess::Errors |
Constructor & Destructor Documentation
Member Function Documentation
| int SuProcess::checkInstall | ( | const char * | password | ) |
| int SuProcess::checkNeedPassword | ( | ) |
QCString command = __PATH_SU; if (access(__PATH_SU, X_OK) != 0)
command = QFile::encodeName(KGlobal::dirs()->findExe("su"));
if (kill(m_Pid, SIGKILL) < 0) { ret=error; }
| void SuProcess::virtual_hook | ( | int | id, | |
| void * | data | |||
| ) | [protected, virtual] |
The documentation for this class was generated from the following files:
KDE 3.5 API Reference