• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdesu
 

tdesu

Public Types | Public Member Functions | Protected Member Functions

SuProcess Class Reference

Executes a command under elevated privileges, using su. More...

#include <su.h>

Inheritance diagram for SuProcess:
StubProcess PtyProcess

List of all members.

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)

Detailed Description

Executes a command under elevated privileges, using su.

Definition at line 26 of file su.h.


Member Enumeration Documentation

enum SuProcess::checkMode

Executes the command.

This will wait for the command to finish.

Definition at line 37 of file su.h.


Member Function Documentation

int SuProcess::checkInstall ( const char *  password  ) 

Checks if the stub is installed and the password is correct.

Returns:
Zero if everything is correct, nonzero otherwise.

Definition at line 72 of file su.cpp.

int SuProcess::checkNeedPassword (  ) 

Checks if a password is needed.

Definition at line 77 of file su.cpp.

int SuProcess::exec ( const char *  password,
int  check = NoCheck 
)

TQCString command = __PATH_SU; if (access(__PATH_SU, X_OK) != 0)

command = TQFile::encodeName(TDEGlobal::dirs()->findExe("su"));

if (kill(m_Pid, SIGKILL) < 0) { ret=error; }

Definition at line 86 of file su.cpp.


The documentation for this class was generated from the following files:
  • su.h
  • su.cpp

tdesu

Skip menu "tdesu"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdesu

Skip menu "tdesu"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdesu by doxygen 1.7.1
This website is maintained by Timothy Pearson.