• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEsu

  • sources
  • kde-4.12
  • kdelibs
  • kdesu
su.h
Go to the documentation of this file.
1 /* vi: ts=8 sts=4 sw=4
2  *
3  * This file is part of the KDE project, module kdesu.
4  * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
5  *
6  * This is free software; you can use this library under the GNU Library
7  * General Public License, version 2. See the file "COPYING.LIB" for the
8  * exact licensing terms.
9  */
10 
11 #ifndef __SU_h_Included__
12 #define __SU_h_Included__
13 
14 #include <kdesu/kdesu_export.h>
15 
16 #include "stub.h"
17 
18 
19 namespace KDESu {
20 
25 class KDESU_EXPORT SuProcess: public StubProcess
26 {
27 public:
28  explicit SuProcess(const QByteArray &user=0, const QByteArray &command=0);
29  ~SuProcess();
30 
31  enum Errors { SuNotFound=1, SuNotAllowed, SuIncorrectPassword };
32 
36  enum checkMode { NoCheck=0, Install=1, NeedPassword=2 } ;
37  int exec(const char *password, int check=NoCheck);
38 
43  int checkInstall(const char *password);
44 
48  int checkNeedPassword();
49 
54  QString superUserCommand();
55 
61  bool useUsersOwnPassword();
62 
63 private:
64  enum SuErrors { error=-1, ok=0, killme=1, notauthorized=2 } ;
65  int ConverseSU(const char *password);
66 
67 protected:
68  virtual void virtual_hook( int id, void* data );
69 private:
70  class SuProcessPrivate;
71  SuProcessPrivate * const d;
72 };
73 
74 }
75 
76 #endif
kdesu_export.h
QString
KDESu::SuProcess::Errors
Errors
Definition: su.h:31
KDESu::SuProcess
Executes a command under elevated privileges, using su.
Definition: su.h:25
stub.h
KDESu::StubProcess
Chat with kdesu_stub.
Definition: stub.h:32
KDESu::SuProcess::checkMode
checkMode
Executes the command.
Definition: su.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEsu

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal