version 1.10, 2001/07/04 14:08:39
|
version 1.20, 2002/03/07 22:58:45
|
|
|
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) | // Author: Mike Brasher (mbrasher@bmc.com) |
// | // |
// Modified By: |
// Modified By: Sushma Fernandes (sushma_fernandes@hp.com) |
|
// |
|
// Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#include <direct.h> | #include <direct.h> |
#include <sys/stat.h> | #include <sys/stat.h> |
#include <sys/types.h> | #include <sys/types.h> |
|
#include <windows.h> |
|
#include <process.h> |
| |
#define ACCESS_EXISTS 0 | #define ACCESS_EXISTS 0 |
#define ACCESS_WRITE 2 | #define ACCESS_WRITE 2 |
|
|
return DynamicLibraryHandle(LoadLibrary(fileName)); | return DynamicLibraryHandle(LoadLibrary(fileName)); |
} | } |
| |
String System::DynamicLoadError(void) { |
void System::unloadDynamicLibrary(DynamicLibraryHandle libraryHandle) |
|
{ |
|
FreeLibrary(HINSTANCE(libraryHandle)); |
|
} |
|
|
|
String System::dynamicLoadError(void) { |
return String(); | return String(); |
} | } |
| |
|
|
return hostname; | return hostname; |
} | } |
| |
|
Uint32 System::lookupPort( |
|
const char * serviceName, |
|
Uint32 defaultPort) |
|
{ |
|
Uint32 localPort; |
|
|
|
struct servent *serv; |
|
|
|
// |
|
// Get wbem-local port from /etc/services |
|
// |
|
if ( (serv = getservbyname(serviceName, TCP)) != NULL ) |
|
{ |
|
localPort = serv->s_port; |
|
} |
|
else |
|
{ |
|
localPort = defaultPort; |
|
} |
|
|
|
return localPort; |
|
} |
|
|
|
String System::getPassword(const char* prompt) |
|
{ |
|
//ATTN: Implement this method to get password from User with no echo |
|
// This is used in cimuser CLI |
|
String password("dummy"); |
|
|
|
return password; |
|
} |
|
|
|
String System::getCurrentLoginName() |
|
{ |
|
//ATTN: Implement this method to get the current login user name |
|
// This is used in local authentication. |
|
|
|
return String(); |
|
} |
|
|
|
String System::encryptPassword(const char* password, const char* salt) |
|
{ |
|
//ATTN: Implement this method to encrypt the password |
|
// This is used in User Manager |
|
return (String("dummy")); |
|
} |
|
|
|
Boolean System::isSystemUser(char* userName) |
|
{ |
|
//ATTN: Implement this method to verify if user is vaild on the local system |
|
// This is used in User Manager |
|
return true; |
|
} |
|
|
|
Boolean System::isPrivilegedUser(const String userName) |
|
{ |
|
// ATTN: Implement this method to verify if user executing the current |
|
// command is a priviliged user, when user name is not passed as |
|
// as argument. If user name is passed the function checks |
|
// whether the given user is a priviliged user. |
|
// This is used in cimuser CLI and CIMOperationRequestAuthorizer |
|
return true; |
|
} |
|
|
|
String System::getPrivilegedUserName() |
|
{ |
|
// ATTN-NB-03-20000304: Implement better way to get the privileged |
|
// user on the system. |
|
|
|
return (String("Administrator")); |
|
} |
|
|
|
Uint32 System::getPID() |
|
{ |
|
return _getpid(); |
|
} |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |