--- kdenetwork-3.5.8/kppp/pppdata.h~ 2005-09-10 12:20:37 +0400 +++ kdenetwork-3.5.8/kppp/pppdata.h 2008-01-16 19:04:20 +0300 @@ -489,6 +489,8 @@ public: void winPosStatWin(int &, int &); void setWinPosStatWin(int, int); + bool etcnetResolvMods(); + private: QString passwd; KConfig* config; // configuration object @@ -504,6 +506,8 @@ private: int pppderror; // error encounterd running pppd int pppdVer, pppdMod, pppdPatch; // pppd version bool waitcallback; // callback waiting flag + bool etcnet_resolv_mods; // etcnet resolv.conf modifications flag + bool etcnet_resolv_mods_checked; // is checked for etcnet resolv.conf modifications QStringList phonelist; }; --- kdenetwork-3.5.8/kppp/pppdata.cpp~ 2008-01-17 14:15:32 +0300 +++ kdenetwork-3.5.8/kppp/pppdata.cpp 2008-01-17 15:56:29 +0300 @@ -48,10 +48,30 @@ PPPData::PPPData() pppderror(0), waitcallback(false) { + etcnet_resolv_mods_checked = false; + etcnet_resolv_mods = true; } // +// check for resolv.conf modifications +// +bool PPPData::etcnetResolvMods() +{ + if( !etcnet_resolv_mods_checked ) + { + etcnet_resolv_mods_checked = true; + KConfig sysconfig_network("/etc/sysconfig/network", true, false); + QString mods = sysconfig_network.readEntry("RESOLV_MODS", "yes"); + mods.remove("\""); + mods.remove("\'"); + if( mods == "no" || mods == "0" || mods == "false" ) + etcnet_resolv_mods = false; + } + return etcnet_resolv_mods; +} + +// // open configuration file // bool PPPData::open() { --- kdenetwork-3.5.8/kppp/connect.cpp~ 2008-01-16 19:58:52 +0300 +++ kdenetwork-3.5.8/kppp/connect.cpp 2008-01-16 20:07:01 +0300 @@ -1407,6 +1407,7 @@ void auto_hostname() { // Replace the DNS domain entry in the /etc/resolv.conf file and // disable the nameserver entries if option is enabled void add_domain(const QString &domain) { + if( gpppdata.etcnetResolvMods() ) return; int fd; char c; @@ -1458,6 +1459,7 @@ void add_domain(const QString &domain) { // adds the DNS entries in the /etc/resolv.conf file void adddns() { + if( gpppdata.etcnetResolvMods() ) return; int fd; if ((fd = Requester::rq->openResolv(O_WRONLY|O_APPEND)) >= 0) { @@ -1476,6 +1478,7 @@ void adddns() } void addpeerdns() { + if( gpppdata.etcnetResolvMods() ) return; int fd, fd2; if((fd = Requester::rq->openResolv(O_WRONLY|O_APPEND)) >= 0) {