Re: [Kolab-devel] kolab command without root priviledges

Henning <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Message-ID <[email protected]>
Patch for
http://git.kolab.org/pykolab/tree/kolab.py
attached.

Am 09.12.2013 11:54, schrieb Torsten Grote:
> On Monday 09 December 2013 11:42:41 Henning wrote:
>> >could the command "kolab" notify on runing without root permissions?
> Sure it could. The code is athttp://git.kolab.org/pykolab/
>
> Patches welcome;)
>
> Kind Regards,
> Torsten

_______________________________________________
devel mailing list
[email protected]
https://lists.kolab.org/mailman/listinfo/devel
kolab.py.patch (text/x-patch, 394 B)
--- kolab.py.tmp        2013-12-09 15:00:02.278783455 +0100
+++ /usr/sbin/kolab     2013-12-09 14:55:28.525630027 +0100
@@ -22,6 +22,10 @@
 import os
 import sys

+# If not running as root, exit
+if os.geteuid() != 0:
+    exit("This requires superuser privileges! Exiting.")
+
 # For development purposes
 sys.path.extend(['.', '..'])

@@ -39,4 +43,3 @@
     kolab = Cli()
     kolab.run()

-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.