summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff
blob: 70fd0192e7ce7541626e632a4132fa6221703128 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff --git a/src/main.cpp b/src/main.cpp
index 7c45fcf..b933832 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -24,6 +24,7 @@
 #include <kmessagebox.h>
 #include <kmainwindow.h>
 #include <kapp.h>
+#include <kuser.h>
 
 #include <klocale.h>
 #include <dcopclient.h>
@@ -134,11 +135,11 @@ int main ( int argc, char *argv[] )
 	}
 	else
 	{
-// 		if (getenv("USER") != "root")
-// 		{
-// 			KMessageBox::error( 0, I18N_NOOP( "Kvpnc must be started as root!" ) );
-// 			exit(0);
-// 		}
+ 		if (getenv("USER") != "root")
+ 		{
+ 			KMessageBox::error( 0, I18N_NOOP( "Kvpnc must be started as root!" ) );
+ 			exit(0);
+ 		}
 
 		KCmdLineArgs *args = KCmdLineArgs::parsedArgs();