Development/Tutorials/PolicyKit/Helper HowTo: Difference between revisions

From KDE TechBase
(New page: {{Template:I18n/Language Navigation Bar|Development/Tutorials/PolicyKit/Introduction}} {{TutorialBrowser| series=PolicyKit Tutorial| name=Using the caller-helper model to perform action...)
 
No edit summary
Line 14: Line 14:
}}
}}


==
== Before you start ==
Applications running under root privileges has always been a major problem in Linux, and PolicyKit was created exactly to make the whole process easier and more secure. Though, running applications as root, even if small and controlled, can be still a major issue. So there are a few things you should take in account that will help you minimize possible issues:
 
* [b]Include in the helper just the strictly needed code.[/b] The fact itself that is a helper delegated to run just small parts of code implies that only the few lines of code you need to run as root should go in
* [b]Link against and use the minor number of libraries possible[/b]. The helper itself requires only QtCore and QtDBus. In particular, try not to use KDELibs as possible, as they were not designed to be used as root.

Revision as of 17:11, 11 March 2009


Development/Tutorials/PolicyKit/Introduction


Using the caller-helper model to perform actions as root
Tutorial Series   PolicyKit Tutorial
Previous   Development/Tutorials/PolicyKit/Introduction
What's Next   None

reading=None

Further Reading   n/a

Before you start

Applications running under root privileges has always been a major problem in Linux, and PolicyKit was created exactly to make the whole process easier and more secure. Though, running applications as root, even if small and controlled, can be still a major issue. So there are a few things you should take in account that will help you minimize possible issues:

* [b]Include in the helper just the strictly needed code.[/b] The fact itself that is a helper delegated to run just small parts of code implies that only the few lines of code you need to run as root should go in
* [b]Link against and use the minor number of libraries possible[/b]. The helper itself requires only QtCore and QtDBus. In particular, try not to use KDELibs as possible, as they were not designed to be used as root.