You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-packaging/ubuntu/maverick/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff

30 lines
705 B

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 <tdemessagebox.h>
#include <tdemainwindow.h>
#include <kapp.h>
+#include <kuser.h>
#include <tdelocale.h>
#include <dcopclient.h>
@@ -134,11 +135,11 @@ int main ( int argc, char *argv[] )
}
else
{
-// if (getenv("USER") != TQString("root"))
-// {
-// KMessageBox::error( 0, I18N_NOOP( "Kvpnc must be started as root!" ) );
-// exit(0);
-// }
+ if (getenv("USER") != TQString("root"))
+ {
+ KMessageBox::error( 0, I18N_NOOP( "Kvpnc must be started as root!" ) );
+ exit(0);
+ }
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();