From 3a09ccd89c3a627b3468bda68d0f621c9aa9bb41 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 6 Dec 2011 18:06:32 -0600 Subject: Fix kvpnc patch 13 --- .../debian/patches/13_add_kuser_issuperuser.diff | 29 +++++++++++++--------- .../debian/patches/13_add_kuser_issuperuser.diff | 29 +++++++++++++--------- 2 files changed, 34 insertions(+), 24 deletions(-) (limited to 'debian') diff --git a/debian/lenny/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff b/debian/lenny/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff index d7abf1b8f..70fd0192e 100644 --- a/debian/lenny/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff +++ b/debian/lenny/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff @@ -1,3 +1,5 @@ +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 @@ @@ -8,17 +10,20 @@ #include #include -@@ -129,7 +130,12 @@ - // KMessageBox::error( 0, I18N_NOOP( "Kvpnc must be started as root!" ) ); - // exit(0); - // } -- -+ if (!KUser().isSuperUser()) -+ { -+ KMessageBox::error( 0L, i18n( "Kvpnc must be started as root!" ) ); +@@ -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(); - - a.setMainWidget( kvpnc ); + diff --git a/debian/squeeze/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff b/debian/squeeze/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff index d7abf1b8f..70fd0192e 100644 --- a/debian/squeeze/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff +++ b/debian/squeeze/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff @@ -1,3 +1,5 @@ +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 @@ @@ -8,17 +10,20 @@ #include #include -@@ -129,7 +130,12 @@ - // KMessageBox::error( 0, I18N_NOOP( "Kvpnc must be started as root!" ) ); - // exit(0); - // } -- -+ if (!KUser().isSuperUser()) -+ { -+ KMessageBox::error( 0L, i18n( "Kvpnc must be started as root!" ) ); +@@ -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(); - - a.setMainWidget( kvpnc ); + -- cgit v1.2.3