author | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
commit | a7e015198a8c5ad3b6e144a9032b059086253e00 (patch) (side-by-side diff) | |
tree | b712b6f11310d88744fe393a92b3160b741a7efe /noncore/settings/networksettings/ppp/runtests.cpp | |
parent | beba0e73306815337bf04dee39502233595e9739 (diff) | |
download | opie-a7e015198a8c5ad3b6e144a9032b059086253e00.zip opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.gz opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.bz2 |
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/settings/networksettings/ppp/runtests.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/runtests.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/noncore/settings/networksettings/ppp/runtests.cpp b/noncore/settings/networksettings/ppp/runtests.cpp index 83ef2ea..5548601 100644 --- a/noncore/settings/networksettings/ppp/runtests.cpp +++ b/noncore/settings/networksettings/ppp/runtests.cpp @@ -35,26 +35,24 @@ #include <pwd.h> #include <netinet/in.h> #ifdef HAVE_RESOLV_H #include <arpa/nameser.h> #include <resolv.h> #endif #ifndef _PATH_RESCONF #define _PATH_RESCONF "/etc/resolv.conf" #endif -//#include <klocale.h> -#define i18n QObject::tr #include "pppdata.h" // initial effective uid (main.cpp) extern uid_t euid; // secure pppd location (opener.cpp) extern const char* pppdPath(); // shamelessly stolen from pppd-2.3.5 /******************************************************************** * * Internal routine to decode the version.modification.patch level @@ -208,71 +206,71 @@ int runTests() { access = TRUE; fclose(f); f = NULL; } } } if(f) fclose(f); } if(!access) { QMessageBox::warning(0,"error", - i18n("You're not allowed to dial out with " + QObject::tr("You're not allowed to dial out with " "kppp.\nContact your system administrator.")); return TEST_CRITICAL; } } // Test 1: search the pppd binary const char *f = pppdPath(); if(!f) { QMessageBox::warning(0,"error", - i18n("Cannot find the PPP daemon!\n" + QObject::tr("Cannot find the PPP daemon!\n" "Make sure that pppd is installed.")); warning++; } // Test 2: check access to the pppd binary if(f) { #if 0 if(access(f, X_OK) != 0 /* && geteuid() != 0 */) { KMessageBox::warning(0, - i18n("You do not have the permission " + QObject::tr("You do not have the permission " "to start pppd!\n" "Contact your system administrator " "and ask to get access to pppd.")); return TEST_CRITICAL; } #endif if(geteuid() != 0) { struct stat st; stat(f, &st); if(st.st_uid != 0 || (st.st_mode & S_ISUID) == 0) { QMessageBox::warning(0,"error", - i18n("You don't have sufficient permission to run\n" + QObject::tr("You don't have sufficient permission to run\n" "%1\n" "Please make sure that kppp is owned by root " "and has the SUID bit set.").arg(f)); warning++; } } } // Test 5: check for existence of /etc/resolv.conf if (access(_PATH_RESCONF, R_OK) != 0) { QString file = _PATH_RESCONF" "; - QString msgstr = i18n("%1 is missing or can't be read!\n" + QString msgstr = QObject::tr("%1 is missing or can't be read!\n" "Ask your system administrator to create " "this file (can be empty) with appropriate " "read and write permissions.").arg(file); QMessageBox::warning(0, "errror", msgstr); warning ++; } if(warning == 0) return TEST_OK; else return TEST_WARNING; } |