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

kdesu

  • kdesu
su.h
1 /* vi: ts=8 sts=4 sw=4
2  *
3  * $Id$
4  *
5  * This file is part of the KDE project, module kdesu.
6  * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
7  *
8  * This is free software; you can use this library under the GNU Library
9  * General Public License, version 2. See the file "COPYING.LIB" for the
10  * exact licensing terms.
11  */
12 
13 #ifndef __SU_h_Included__
14 #define __SU_h_Included__
15 
16 #include <tqcstring.h>
17 
18 #include <kdelibs_export.h>
19 
20 #include "stub.h"
21 
26 class KDESU_EXPORT SuProcess: public StubProcess
27 {
28 public:
29  SuProcess(const TQCString &user=0, const TQCString &command=0);
30  ~SuProcess();
31 
32  enum Errors { SuNotFound=1, SuNotAllowed, SuIncorrectPassword };
33 
37  enum checkMode { NoCheck=0, Install=1, NeedPassword=2 } ;
38  int exec(const char *password, int check=NoCheck);
39 
44  int checkInstall(const char *password);
45 
49  int checkNeedPassword();
50 
51 private:
52  enum SuErrors { error=-1, ok=0, killme=1, notauthorized=2 } ;
53  int ConverseSU(const char *password);
54 
55 protected:
56  virtual void virtual_hook( int id, void* data );
57 private:
58  class SuProcessPrivate;
59  SuProcessPrivate *d;
60  TQString superUserCommand;
61 };
62 
63 #endif
StubProcess
Chat with kdesu_stub.
Definition: stub.h:32
SuProcess::checkMode
checkMode
Executes the command.
Definition: su.h:37
PtyProcess::exec
int exec(const TQCString &command, const QCStringList &args)
Forks off and execute a command.
Definition: process.cpp:324
SuProcess
Executes a command under elevated privileges, using su.
Definition: su.h:26

kdesu

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

kdesu

Skip menu "kdesu"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdesu by doxygen 1.8.6
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |