summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick/applications/kvpnc/debian/patches
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-06 12:27:48 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-06 12:27:48 -0600
commit6c303203c7d66f41951a406adf1e411ac5731a48 (patch)
tree1e6a3a0f6b5d64069143de5b453bee94e73ab494 /ubuntu/maverick/applications/kvpnc/debian/patches
parent56809f1d3ee9817c1ee360045ed8e7d22f7626e7 (diff)
downloadtde-packaging-6c303203c7d66f41951a406adf1e411ac5731a48.tar.gz
tde-packaging-6c303203c7d66f41951a406adf1e411ac5731a48.zip
Add initial packaging files for kvpnc to Debian and Ubuntu
Diffstat (limited to 'ubuntu/maverick/applications/kvpnc/debian/patches')
-rw-r--r--ubuntu/maverick/applications/kvpnc/debian/patches/10_su-to-root_usage.diff11
-rw-r--r--ubuntu/maverick/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff24
-rw-r--r--ubuntu/maverick/applications/kvpnc/debian/patches/series2
3 files changed, 37 insertions, 0 deletions
diff --git a/ubuntu/maverick/applications/kvpnc/debian/patches/10_su-to-root_usage.diff b/ubuntu/maverick/applications/kvpnc/debian/patches/10_su-to-root_usage.diff
new file mode 100644
index 000000000..9630fd3f8
--- /dev/null
+++ b/ubuntu/maverick/applications/kvpnc/debian/patches/10_su-to-root_usage.diff
@@ -0,0 +1,11 @@
+--- a/src/kvpnc.desktop
++++ b/src/kvpnc.desktop
+@@ -18,7 +18,7 @@
+ GenericName[xx]=xxVPN Client GUIxx
+
+ Categories=Network;RemoteAccess;KDE;Qt
+-Exec=kvpnc
++Exec=su-to-root -X -c /opt/trinity/bin/kvpnc
+ X-KDE-SubstituteUID=true
+ Icon=kvpnc
+ Type=Application
diff --git a/ubuntu/maverick/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff b/ubuntu/maverick/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff
new file mode 100644
index 000000000..d7abf1b8f
--- /dev/null
+++ b/ubuntu/maverick/applications/kvpnc/debian/patches/13_add_kuser_issuperuser.diff
@@ -0,0 +1,24 @@
+--- 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>
+@@ -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!" ) );
++ exit(0);
++ }
++
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ a.setMainWidget( kvpnc );
diff --git a/ubuntu/maverick/applications/kvpnc/debian/patches/series b/ubuntu/maverick/applications/kvpnc/debian/patches/series
new file mode 100644
index 000000000..09040ada9
--- /dev/null
+++ b/ubuntu/maverick/applications/kvpnc/debian/patches/series
@@ -0,0 +1,2 @@
+10_su-to-root_usage.diff
+13_add_kuser_issuperuser.diff