author | wimpie <wimpie> | 2004-04-05 01:13:11 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-05 01:13:11 (UTC) |
commit | 6be3d148fc1d610ebfa193012657b3b77d9368e3 (patch) (unidiff) | |
tree | d7bbd308d17ffe7557c7749776f4945e499d7c10 /noncore/settings/networksettings2/main.cpp | |
parent | b0ceb8843ebe9ee3054faa98f08bd255df955aa3 (diff) | |
download | opie-6be3d148fc1d610ebfa193012657b3b77d9368e3.zip opie-6be3d148fc1d610ebfa193012657b3b77d9368e3.tar.gz opie-6be3d148fc1d610ebfa193012657b3b77d9368e3.tar.bz2 |
For usb this seems to be working
Also for non-root users (requires using SUDO)
Diffstat (limited to 'noncore/settings/networksettings2/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/main.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/main.cpp b/noncore/settings/networksettings2/main.cpp index 7ec26a7..e2c00f6 100644 --- a/noncore/settings/networksettings2/main.cpp +++ b/noncore/settings/networksettings2/main.cpp | |||
@@ -3,2 +3,3 @@ | |||
3 | #include "networksettings.h" | 3 | #include "networksettings.h" |
4 | |||
4 | #include <qpe/qpeapplication.h> | 5 | #include <qpe/qpeapplication.h> |
@@ -78,3 +79,15 @@ int main( int argc, char * argv[] ) { | |||
78 | { NetworkSettingsData NS; | 79 | { NetworkSettingsData NS; |
79 | NS.canStart( argv[1] ); | 80 | if( NS.canStart( argv[1] ) ) { |
81 | QString S; | ||
82 | S.sprintf( QPEApplication::qpeDir()+ | ||
83 | "/bin/networksettings2" ); | ||
84 | char * MyArgv[4]; | ||
85 | MyArgv[0] = "networksettings2"; | ||
86 | MyArgv[1] = "--prompt"; | ||
87 | MyArgv[2] = argv[1]; | ||
88 | MyArgv[3] = NULL; | ||
89 | NSResources->system().execAsUser( S, MyArgv ); | ||
90 | // if we come here , failed | ||
91 | printf( "%s-cNN-disallowed", argv[1] ); | ||
92 | } | ||
80 | } | 93 | } |