Browse Source

Merge pull request #13460 from ghalliday/issue23549

HPCC-23549 Remove legacy code for obtaining passwords from environment

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 years ago
parent
commit
4240227c6f

+ 0 - 107
common/environment/dalienv.cpp

@@ -88,113 +88,6 @@ class CIpOsHashTable: public CMinHashTable<CIpOsInstance>
 {
 };
 
-
-
-class SDSPasswordProvider : public CInterface, implements IPasswordProvider
-{
-public:
-    SDSPasswordProvider();
-    ~SDSPasswordProvider() { delete map; }
-    IMPLEMENT_IINTERFACE
-
-    virtual bool getPassword(const IpAddress & ip, StringBuffer & username, StringBuffer & password);
-    void clearCache()
-    {
-        delete map;
-        map = new CIpPasswordHashTable();
-    }
-
-protected:
-    //MORE: This cache needs to be invalidated at some point...
-    CIpPasswordHashTable    *map;
-    Owned<IConstEnvironment> env;
-    Mutex mutex;
-};
-
-SDSPasswordProvider::SDSPasswordProvider() 
-{
-    Owned<IEnvironmentFactory> factory = getEnvironmentFactory(true);
-    env.setown(factory->openEnvironment());
-    map = new CIpPasswordHashTable();
-}
-
-bool SDSPasswordProvider::getPassword(const IpAddress & ip, StringBuffer & username, StringBuffer & password)
-{
-    synchronized procedure(mutex);
-    if (!env)
-        return false;
-    CIpPasswordInstance *match = map->find((const char *)&ip,false);
-    if (!match)
-    {
-        match = new CIpPasswordInstance(ip);
-
-        StringBuffer ipText;
-        ip.getIpText(ipText);
-        Owned<IConstMachineInfo> machine = env->getMachineByAddress(ipText.str());
-        if (machine)
-        {
-            Owned<IConstDomainInfo> domain = machine->getDomain();
-            if (domain)
-            {
-                SCMStringBuffer username;
-
-                StringAttrAdaptor strval(match->password);
-                domain->getAccountInfo(username, strval);
-
-                SCMStringBuffer domainname;
-                domain->getName(domainname);
-                match->user.set(domainname.s.append('\\').append(username.str()).str());
-                match->matched = true;
-            }
-        }
-        map->add(match);
-    }
-    username.append(match->user);
-    password.append(match->password);
-    return match->matched;
-}
-
-static CriticalSection passwordProviderCrit;
-static SDSPasswordProvider * passwordProvider = NULL;
-MODULE_INIT(INIT_PRIORITY_ENV_ENVIRONMENT)
-{
-    return true;
-}
-
-MODULE_EXIT()
-{
-    clearPasswordsFromSDS();
-}
-
-void __stdcall setPasswordsFromSDS()
-{
-    CriticalBlock block(passwordProviderCrit);
-    if (passwordProvider == NULL)
-    {
-        passwordProvider = new SDSPasswordProvider();
-        setPasswordProvider(passwordProvider);
-    }
-}
-
-void __stdcall resetPasswordsFromSDS()
-{
-    CriticalBlock block(passwordProviderCrit);
-    if (passwordProvider)
-        passwordProvider->clearCache();
-}
-
-void __stdcall clearPasswordsFromSDS()
-{
-    CriticalBlock block(passwordProviderCrit);
-    if (passwordProvider) {
-        setPasswordProvider(NULL);
-        passwordProvider->Release();
-        passwordProvider = NULL;
-    }
-}
-
-
-
 //---------------------------------------------------------------------------
 
 static CriticalSection ipcachesect;

+ 0 - 3
common/environment/dalienv.hpp

@@ -30,9 +30,6 @@ interface IFile;
 class RemoteFilename;
 
 extern ENVIRONMENT_API EnvMachineOS queryOS(const IpAddress & ip);
-extern "C" ENVIRONMENT_API void __stdcall setPasswordsFromSDS();
-extern "C" ENVIRONMENT_API void __stdcall resetPasswordsFromSDS();
-extern "C" ENVIRONMENT_API void __stdcall clearPasswordsFromSDS();
 
 
 extern ENVIRONMENT_API bool canAccessFilesDirectly(const RemoteFilename & file);

+ 0 - 2
common/environment/environment.cpp

@@ -1887,7 +1887,6 @@ void CLocalEnvironment::clearCache()
     keyGroupMap.clear();
     keyPairMap.clear();
     init();
-    resetPasswordsFromSDS();
 }
 
 IConstDropZoneInfo * CLocalEnvironment::getDropZoneByAddressPath(const char * netaddress, const char *targetFilePath) const
@@ -2469,7 +2468,6 @@ extern ENVIRONMENT_API void closeEnvironment()
             pFactory = factory;
             factory = nullptr;
         }
-        clearPasswordsFromSDS();
         if (pFactory)
         {
             removeShutdownHook(*pFactory);

+ 0 - 1
common/remote/CMakeLists.txt

@@ -27,7 +27,6 @@ project( remote )
 HPCC_ADD_SUBDIRECTORY(hooks)
 
 set (    SRCS 
-         rmtpass.cpp 
          rmtspawn.cpp 
          rmtssh.cpp 
          rmtsmtp.cpp 

+ 0 - 115
common/remote/rmtpass.cpp

@@ -1,115 +0,0 @@
-/*##############################################################################
-
-    HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-############################################################################## */
-
-#include "jliball.hpp"
-
-#include "platform.h"
-
-#include "jlib.hpp"
-#include "jsem.hpp"
-#include "jthread.hpp"
-
-#include "portlist.h"
-#include "jsocket.hpp"
-
-#include "rmtpass.hpp"
-
-void CachedPasswordProvider::addPasswordForFilename(const char * filename)
-{
-    RemoteFilename remote;
-    remote.setRemotePath(filename);
-    addPasswordForIp(remote.queryIP());
-}
-
-
-void CachedPasswordProvider::addPasswordForFilename(RemoteFilename & filename)
-{
-    addPasswordForIp(filename.queryIP());
-}
-
-void CachedPasswordProvider::addPasswordForIp(const IpAddress & ip)
-{
-    if (!hasPassword(ip))
-    {
-        IPasswordProvider * provider = queryPasswordProvider();
-        StringBuffer username, password;
-
-        if (provider && provider->getPassword(ip, username, password))
-        {
-            CachedPassword & cur = * new CachedPassword;
-            cur.ip.ipset(ip);
-            cur.password.set(password.str());
-            cur.username.set(username.str());
-            passwords.append(cur);
-        }
-    }
-}
-
-
-void CachedPasswordProvider::clear()
-{
-    passwords.kill();
-}
-
-void CachedPasswordProvider::deserialize(MemoryBuffer & in)
-{
-    unsigned num;
-    in.read(num);
-    while (num--)
-    {
-        CachedPassword & cur = * new CachedPassword;
-        cur.deserialize(in);
-        passwords.append(cur);
-    }
-}
-
-void CachedPasswordProvider::serialize(MemoryBuffer & out)
-{
-    unsigned num = passwords.ordinality();
-    out.append(num);
-    ForEachItemIn(idx, passwords)
-        passwords.item(idx).serialize(out);
-}
-
-bool CachedPasswordProvider::getPassword(const IpAddress & ip, StringBuffer & username, StringBuffer & password)
-{
-    ForEachItemIn(idx, passwords)
-    {
-        CachedPassword & cur = passwords.item(idx);
-        if (cur.ip.ipequals(ip))
-        {
-            username.append(cur.username);
-            password.append(cur.password);
-            return true;
-        }
-    }
-    StringBuffer iptext;
-    LOG(MCdebugInfo, unknownJob, "cached:getPassword(%s) failed", ip.getIpText(iptext).str());
-    return false;
-}
-
-bool CachedPasswordProvider::hasPassword(const IpAddress & ip) const
-{
-    ForEachItemIn(idx, passwords)
-    {
-        CachedPassword & cur = passwords.item(idx);
-        if (cur.ip.ipequals(ip))
-            return true;
-    }
-    return false;
-}
-

+ 0 - 61
common/remote/rmtpass.hpp

@@ -1,61 +0,0 @@
-/*##############################################################################
-
-    HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-############################################################################## */
-
-#ifndef RMTPASS_HPP
-#define RMTPASS_HPP
-
-#ifdef REMOTE_EXPORTS
-#define REMOTE_API DECL_EXPORT
-#else
-#define REMOTE_API DECL_IMPORT
-#endif
-
-class REMOTE_API CachedPassword : public CInterface
-{
-public:
-    void deserialize(MemoryBuffer & in)     { ip.ipdeserialize(in); in.read(password).read(username); }
-    void serialize(MemoryBuffer & out)      { ip.ipserialize(out); out.append(password).append(username); }
-
-public:
-    IpAddress ip;
-    StringAttr password;
-    StringAttr username;
-};
-
-
-class RemoteFilename;
-class REMOTE_API CachedPasswordProvider : public CInterface, implements IPasswordProvider
-{
-public:
-    IMPLEMENT_IINTERFACE
-
-    virtual bool getPassword(const IpAddress & ip, StringBuffer & username, StringBuffer & password);
-
-    void addPasswordForFilename(const char * filename);
-    void addPasswordForFilename(RemoteFilename & filename);
-    void addPasswordForIp(const IpAddress & ip);
-    void clear();
-    void deserialize(MemoryBuffer & in);
-    void serialize(MemoryBuffer & out);
-    bool hasPassword(const IpAddress & ip) const;
-
-protected:
-    CIArrayOf<CachedPassword>   passwords;
-};
-
-
-#endif

+ 0 - 7
common/remote/rmtspawn.cpp

@@ -30,7 +30,6 @@
 
 #include "rmtspawn.hpp"
 #include "rmtssh.hpp"
-#include "rmtpass.hpp"
 
 
 
@@ -425,8 +424,6 @@ void CRemoteSlave::run(int argc, char * argv[])
         info.log();
         EnableSEHtoExceptionMapping();
 
-        CachedPasswordProvider passwordProvider;
-        setPasswordProvider(&passwordProvider);
         try
         {
             if (info.sendReply(version))
@@ -449,8 +446,6 @@ void CRemoteSlave::run(int argc, char * argv[])
                         msg.setEndian(__BIG_ENDIAN);
                         byte action;
                         msg.read(action);
-                        passwordProvider.clear();
-                        passwordProvider.deserialize(msg);
 
                         ok = processCommand(action, masterSocket, msg, results);
                     }
@@ -497,8 +492,6 @@ void CRemoteSlave::run(int argc, char * argv[])
             PrintExceptionLog(e, slaveName.get());
             e->Release();
         }
-
-        setPasswordProvider(NULL);
     }
     LOG(MCdebugProgress, unknownJob, "Stopping %s", slaveName.get());
 }

+ 0 - 2
dali/dfu/dfu2.cpp

@@ -27,7 +27,6 @@
 #include "daclient.hpp"
 #include "dadfs.hpp"
 #include "dasds.hpp"
-#include "dalienv.hpp"
 #include "jio.hpp"
 #include "daft.hpp"
 #include "daftcfg.hpp"
@@ -124,7 +123,6 @@ int main(int argc, const char *argv[])
             throwError(DFUERR_NoDaliServerList);
         Owned<IGroup> serverGroup = createIGroup(daliServer.str(),DALI_SERVER_PORT);
         initClientProcess(serverGroup, 0, NULL, NULL, MP_WAIT_FOREVER, true);               // so that 
-        setPasswordsFromSDS(); 
             
         DFUcmd cmd = decodeDFUcommand(argv[1]);
         addAbortHandler(actionOnAbort);

+ 1 - 2
dali/dfu/dfuserver.cpp

@@ -28,7 +28,7 @@
 #include "daclient.hpp"
 #include "dadfs.hpp"
 #include "dasds.hpp"
-#include "dalienv.hpp"
+#include "environment.hpp"
 #include "jio.hpp"
 #include "daft.hpp"
 #include "daftcfg.hpp"
@@ -170,7 +170,6 @@ int main(int argc, const char *argv[])
     try {
         Owned<IGroup> serverGroup = createIGroup(daliServer.str(),DALI_SERVER_PORT);
         initClientProcess(serverGroup, DCR_DfuServer, 0, NULL, NULL, stop?(1000*30):MP_WAIT_FOREVER);
-        setPasswordsFromSDS();
 
         if(!stop)
         {

+ 0 - 3
dali/dfuxref/dfuxrefmain.cpp

@@ -20,7 +20,6 @@
 #include "jlib.hpp"
 #include "jmisc.hpp"
 #include "jptree.hpp"
-#include "dalienv.hpp"
 #include "daclient.hpp"
 
 static bool AddCompleteOrphans = false;
@@ -77,7 +76,6 @@ int main(int argc, char* argv[])
     try
     {
         initClientProcess(group, DCR_XRef);
-        setPasswordsFromSDS();
         StringArray args, clusters;
         bool backupcheck = false;
         unsigned mode = PMtextoutput|PMcsvoutput|PMtreeoutput;
@@ -203,7 +201,6 @@ int main(int argc, char* argv[])
     }
 
     DBGLOG("Finished%s",cmdline.str());
-    closeEnvironment();
     closedownClientProcess();
 
     releaseAtoms();

+ 0 - 4
dali/ft/daftdir.cpp

@@ -462,7 +462,6 @@ bool DirectoryThread::performCommand()
         //Send message and wait for response... 
         //MORE: they should probably all be sent on different threads....
         msg.append((byte)FTactiondirectory);
-        passwordProvider.serialize(msg);
         msg.append(directory);
         options->serialize(msg);
         node->serialize(msg);
@@ -799,10 +798,8 @@ void doPhysicalCopy(IPropertyTree * source, const char * target, IPropertyTree *
 
     SocketEndpoint sourceMachine(source->queryProp("machine/@ip"));
     RemoteFilename targetName;
-    CachedPasswordProvider passwordProvider;
     Owned<IException> error;
 
-    passwordProvider.addPasswordForIp(sourceMachine);
     targetName.setRemotePath(target);
     const IpAddress & targetIP = targetName.queryIP();
     if (!canSpawnChildProcess(targetIP))
@@ -825,7 +822,6 @@ void doPhysicalCopy(IPropertyTree * source, const char * target, IPropertyTree *
         //Send message and wait for response... 
         //MORE: they should probably all be sent on different threads....
         msg.append((byte)FTactionpcopy);
-        passwordProvider.serialize(msg);
         source->serialize(msg);
         targetName.serialize(msg);
         options->serialize(msg);

+ 0 - 2
dali/ft/daftdir.ipp

@@ -20,7 +20,6 @@
 
 #include "daftdir.hpp"
 #include "ftbase.ipp"
-#include "rmtpass.hpp"
 
 class DirectoryBuilder : public CInterface
 {
@@ -91,7 +90,6 @@ protected:
     bool commandAndSignal();
 
 protected:
-    CachedPasswordProvider      passwordProvider;
     IRunningSlaveObserver &     observer;
     const char *                directory;
     Owned<INode>                node;

+ 0 - 2
dali/ft/daftformat.cpp

@@ -1881,7 +1881,6 @@ void CRemotePartitioner::callRemote()
             //Send message and wait for response...
             //MORE: they should probably all be sent on different threads....
             msg.append((byte)FTactionpartition);
-            passwordProvider.serialize(msg);
             srcFormat.serialize(msg);
             tgtFormat.serialize(msg);
             msg.append(whichInput);
@@ -1966,7 +1965,6 @@ void CRemotePartitioner::setSource(unsigned _whichInput, const RemoteFilename &
 {
     whichInput = _whichInput;
     fullPath.set(_fullPath);
-    passwordProvider.addPasswordForFilename(fullPath);
     compressedInput = _compressedInput;
     decryptKey.set(_decryptKey);
 }

+ 0 - 2
dali/ft/daftformat.ipp

@@ -22,7 +22,6 @@
 #include "ftbase.ipp"
 #include "daftmc.hpp"
 #include "daftformat.hpp"
-#include "rmtpass.hpp"
 #include "jptree.hpp"
 
 
@@ -724,7 +723,6 @@ protected:
     virtual bool isAborting() { UNIMPLEMENTED; };
 
 protected:
-    CachedPasswordProvider      passwordProvider;
     SocketEndpoint              ep;
     FileFormat                  srcFormat;
     FileFormat                  tgtFormat;

+ 0 - 3
dali/ft/filecopy.cpp

@@ -194,8 +194,6 @@ void FileTransferThread::addPartition(PartitionPoint & nextPartition, OutputProg
 {
     partition.append(OLINK(nextPartition));
     progress.append(OLINK(nextProgress));
-    passwordProvider.addPasswordForIp(nextPartition.inputName.queryIP());
-    passwordProvider.addPasswordForIp(nextPartition.outputName.queryIP());
 }
 
 unsigned __int64 FileTransferThread::getInputSize()
@@ -338,7 +336,6 @@ bool FileTransferThread::performTransfer()
 
         //Send message and wait for response...
         msg.append(action);
-        passwordProvider.serialize(msg);
         ep.serialize(msg);
         sprayer.srcFormat.serialize(msg);
         sprayer.tgtFormat.serialize(msg);

+ 0 - 1
dali/ft/filecopy.ipp

@@ -78,7 +78,6 @@ protected:
     bool transferAndSignal();
 
 protected:
-    CachedPasswordProvider      passwordProvider;
     FileSprayer &               sprayer;
     SocketEndpoint              ep;
     PartitionPointArray         partition;

+ 0 - 2
dali/fuse/dafuse.cpp

@@ -32,7 +32,6 @@
 #include "dautils.hpp"
 #include "dadfs.hpp"
 #include "dasds.hpp"
-#include "dalienv.hpp"
 #include "mplog.hpp"
 
 #define FUSE_USE_VERSION 26
@@ -749,7 +748,6 @@ class CFuseDaliDFS: public CFuseBase
             setDaliServixSocketCaching(true);
             Owned<IGroup> serverGroup = createIGroup(daliServer,DALI_SERVER_PORT);
             initClientProcess(serverGroup, DCR_Dfu, 0, NULL, NULL, MP_WAIT_FOREVER);                // so that 
-            setPasswordsFromSDS(); 
             startLogMsgParentReceiver();    // for auditing
             connectLogMsgManagerToDali();
         }

+ 1 - 2
dali/sasha/saserver.cpp

@@ -31,7 +31,7 @@
 #include "dasess.hpp"
 #include "dasds.hpp"
 #include "daclient.hpp"
-#include "dalienv.hpp"
+#include "environment.hpp"
 #include "dllserver.hpp"
 #include "rmtfile.hpp"
 
@@ -332,7 +332,6 @@ int main(int argc, const char* argv[])
         unsigned short port = (stop||coalescer)?0:DEFAULT_SASHA_PORT;
         Owned<IGroup> serverGroup = createIGroup(daliServer.str(),DALI_SERVER_PORT);
         initClientProcess(serverGroup, DCR_SashaServer, port, NULL, NULL, MP_WAIT_FOREVER);
-        setPasswordsFromSDS(); 
         if (!stop&!coalescer) {
             startLogMsgParentReceiver();    // for auditing
             connectLogMsgManagerToDali();

+ 0 - 4
ecl/eclagent/eclagent.cpp

@@ -3472,10 +3472,6 @@ extern int HTHOR_API eclagent_main(int argc, const char *argv[], StringBuffer *
             daliDownMonitor.setown(new CDaliDownMonitor(daliEp));
             addMPConnectionMonitor(daliDownMonitor);
 
-            {
-                MTIME_SECTION(queryActiveTimer(), "Environment_Initialize");
-                setPasswordsFromSDS();
-            }
             LOG(MCoperatorInfo, "ECLAGENT build %s", BUILD_TAG);
             startLogMsgParentReceiver();    
             connectLogMsgManagerToDali();

+ 1 - 2
esp/platform/espcfg.cpp

@@ -37,7 +37,7 @@
 #include "mplog.hpp"
 #include "rmtfile.hpp"
 
-#include <dalienv.hpp>
+//#include <dalienv.hpp>
 
 /*
 #if defined(USING_MPATROL)
@@ -547,7 +547,6 @@ void CEspConfig::initDali(const char *servers)
         // Initialize client process
         if (!initClientProcess(serverGroup, DCR_EspServer))
             throw MakeStringException(0, "Could not initialize dali client");
-        setPasswordsFromSDS();
 
         serverstatus = new CSDSServerStatus("ESPserver");
         ensureSDSSessionDomains();

+ 0 - 1
esp/platform/espcfg.ipp

@@ -300,7 +300,6 @@ public:
 
     void stopping()
     {
-        clearPasswordsFromSDS();
         try
         {
             if (serverstatus)

+ 0 - 2
esp/services/ws_roxie/ws_roxieService.cpp

@@ -24,7 +24,6 @@
 
 #include "ws_roxieService.hpp"
 #include "jstring.hpp"
-#include "dalienv.hpp"
 #include "espxslt.hpp"
 
 void writeFile(const char * path, const char * txt)
@@ -74,7 +73,6 @@ void CRoxieEx::init(IPropertyTree *cfg, const char *process, const char *service
         }
         Owned<IGroup> serverGroup = createIGroup(daliServers_.str(), DALI_SERVER_PORT);
         initClientProcess(serverGroup, DCR_EspServer);
-        setPasswordsFromSDS();
     }
 }
 

+ 0 - 2
esp/services/ws_workunits/ws_workunitsService.cpp

@@ -21,7 +21,6 @@
 #include "jlib.hpp"
 #include "jflz.hpp"
 #include "daclient.hpp"
-#include "dalienv.hpp"
 #include "dadfs.hpp"
 #include "daaudit.hpp"
 #include "dautils.hpp"
@@ -352,7 +351,6 @@ void CWsWorkunitsEx::init(IPropertyTree *cfg, const char *process, const char *s
         OERRLOG("No Dali Connection Active.");
         throw MakeStringException(-1, "No Dali Connection Active. Please Specify a Dali to connect to in you configuration file");
     }
-    setPasswordsFromSDS();
 
     DBGLOG("Initializing %s service [process = %s]", service, process);
 

+ 1 - 2
roxie/ccd/ccddali.cpp

@@ -17,7 +17,7 @@
 
 #include "jlib.hpp"
 #include "workunit.hpp"
-#include "dalienv.hpp"
+#include "environment.hpp"
 #include "daclient.hpp"
 #include "dautils.hpp"
 #include "dllserver.hpp"
@@ -760,7 +760,6 @@ public:
                     // Initialize client process
                     if (!initClientProcess(serverGroup, DCR_RoxyMaster, 0, NULL, NULL, timeout))
                         throw MakeStringException(ROXIE_DALI_ERROR, "Could not initialize dali client");
-                    setPasswordsFromSDS();
                     serverStatus = new CSDSServerStatus("RoxieServer");
                     serverStatus->queryProperties()->setProp("@cluster", roxieName.str());
                     serverStatus->commitProperties();

+ 0 - 48
system/jlib/jfile.cpp

@@ -1186,18 +1186,6 @@ unsigned CFile::getCRC()
 
 //---------------------------------------------------------------------------
 
-static Linked<IPasswordProvider> passwordProvider;
-
-MODULE_INIT(INIT_PRIORITY_JFILE)
-{
-    return true;
-}
-
-MODULE_EXIT()
-{
-    passwordProvider.clear();
-}
-
 #ifdef _WIN32
 static bool parseShare(const char *filename,IpAddress &machine,StringBuffer &share)
 { // windows share parsing
@@ -4003,42 +3991,6 @@ IDirectoryDifferenceIterator *CFile::monitorDirectory(IDirectoryIterator *_prev,
 
 //---------------------------------------------------------------------------
 
-class FixedPasswordProvider : implements IPasswordProvider, public CInterface
-{
-public:
-    FixedPasswordProvider(const char * _username, const char * _password) { username.set(_username); password.set(_password); }
-    IMPLEMENT_IINTERFACE;
-
-    virtual bool getPassword(const IpAddress & ip, StringBuffer & _username, StringBuffer & _password)
-    {
-        _username.append(username.get());
-        _password.append(password.get());
-        return true;
-    }
-
-protected:
-    StringAttr      username;
-    StringAttr      password;
-};
-
-IPasswordProvider * queryPasswordProvider()
-{
-    return passwordProvider;
-}
-
-void setPasswordProvider(IPasswordProvider * provider)
-{
-    passwordProvider.set(provider);
-}
-
-void setDefaultUser(const char * username,const char *password)
-{
-    Owned<IPasswordProvider> provider = new FixedPasswordProvider(username, password);
-    setPasswordProvider(provider);
-}
-
-//---------------------------------------------------------------------------
-
 bool recursiveCreateDirectory(const char * path)
 {
     Owned<IFile> file = createIFile(path);

+ 0 - 12
system/jlib/jfile.hpp

@@ -223,14 +223,6 @@ interface IDiscretionaryLock: extends IInterface
 
 //-- Interfaces/functions used for managing passwords needed to access remote machines.
 
-class IpAddress;
-interface IPasswordProvider : public IInterface
-{
-    virtual bool getPassword(const IpAddress & ip, StringBuffer & username, StringBuffer & password) = 0;
-
-};
-
-
 #ifndef _WIN32
 #define _MAX_DRIVE      4
 #define _MAX_DIR        256
@@ -239,10 +231,6 @@ interface IPasswordProvider : public IInterface
 void jlib_decl _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext);
 #endif
 
-extern jlib_decl void setDefaultUser(const char * username,const char *password);
-extern jlib_decl IPasswordProvider * queryPasswordProvider();
-extern jlib_decl void setPasswordProvider(IPasswordProvider * provider);
-
 //-- Helper routines 
 
 

+ 0 - 2
thorlcr/master/thmastermain.cpp

@@ -666,8 +666,6 @@ int main( int argc, const char *argv[]  )
         if (globals->getPropBool("@MPChannelReconnect"))
             getMPServer()->setOpt(mpsopt_channelreopen, "true");
 
-        setPasswordsFromSDS();
-
         if (globals->getPropBool("@enableSysLog",true))
             UseSysLogForOperatorMessages();
 

+ 1 - 2
thorlcr/slave/slavmain.cpp

@@ -48,7 +48,7 @@
 #include "thgraphslave.hpp"
 #include "slave.ipp"
 #include "thcompressutil.hpp"
-#include "dalienv.hpp"
+#include "environment.hpp"
 #include "eclhelper_dyn.hpp"
 #include "rtlcommon.hpp"
 #include "../activities/keyedjoin/thkeyedjoincommon.hpp"
@@ -87,7 +87,6 @@ void enableThorSlaveAsDaliClient()
             Sleep(retry*2000);
         }
     }
-    setPasswordsFromSDS();
 #endif
 }
 

+ 0 - 3
tools/swapnode/swapnode.cpp

@@ -31,7 +31,6 @@
 #include "dafdesc.hpp"
 #include "dasds.hpp"
 #include "danqs.hpp"
-#include "dalienv.hpp"
 #include "rmtfile.hpp"
 #include "rmtsmtp.hpp"
 
@@ -50,11 +49,9 @@ struct DaliClient
 
         if (!initClientProcess(serverGroup,DCR_SwapNode))
             throw MakeStringException(0, "Could not initializing client process");
-        setPasswordsFromSDS();
     }
     ~DaliClient()
     {
-        clearPasswordsFromSDS();
         closedownClientProcess();
     }
     Owned<IGroup> serverGroup;

+ 1 - 2
tools/wutool/wutool.cpp

@@ -29,7 +29,7 @@
 #include "dasds.hpp"
 #include "dautils.hpp"
 #include "danqs.hpp"
-#include "dalienv.hpp"
+#include "environment.hpp"
 #include "anawu.hpp"
 
 #ifdef _USE_CPPUNIT
@@ -392,7 +392,6 @@ int main(int argc, const char *argv[])
         {
             Owned<IGroup> serverGroup = createIGroup(daliServers.str(), DALI_SERVER_PORT);
             initClientProcess(serverGroup, DCR_Testing);
-            setPasswordsFromSDS();
         }
         else if (!serverSpecified)
         {