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) (ignore 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 | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "nsdata.h" | 1 | #include "nsdata.h" |
2 | #include "activateprofile.h" | 2 | #include "activateprofile.h" |
3 | #include "networksettings.h" | 3 | #include "networksettings.h" |
4 | |||
4 | #include <qpe/qpeapplication.h> | 5 | #include <qpe/qpeapplication.h> |
5 | 6 | ||
6 | #include <opie/oapplicationfactory.h> | 7 | #include <opie/oapplicationfactory.h> |
@@ -76,7 +77,19 @@ int main( int argc, char * argv[] ) { | |||
76 | switch( Action ) { | 77 | switch( Action ) { |
77 | case ACT_REQUEST : | 78 | case ACT_REQUEST : |
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 | } |
81 | break; | 94 | break; |
82 | case ACT_REGEN : | 95 | case ACT_REGEN : |