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

KDEsu

  • 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
19namespace KDESu {
20
25class KDESU_EXPORT SuProcess: public StubProcess
26{
27public:
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
63private:
64 enum SuErrors { error=-1, ok=0, killme=1, notauthorized=2 } ;
65 int ConverseSU(const char *password);
66
67protected:
68 virtual void virtual_hook( int id, void* data );
69private:
70 class SuProcessPrivate;
71 SuProcessPrivate * const d;
72};
73
74}
75
76#endif
KDESu::StubProcess
Chat with kdesu_stub.
Definition: stub.h:33
KDESu::SuProcess
Executes a command under elevated privileges, using su.
Definition: su.h:26
KDESu::SuProcess::Errors
Errors
Definition: su.h:31
KDESu::SuProcess::checkMode
checkMode
Executes the command.
Definition: su.h:36
kdesu_export.h
KDESu
Definition: client.cpp:41
stub.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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