version 1.44, 2004/08/25 11:15:54
|
version 1.55, 2005/06/03 19:47:32
|
|
|
//%2003//////////////////////////////////////////////////////////////////////// |
//%2005//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; | // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
// IBM Corp.; EMC Corporation, The Open Group. | // IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) | // Author: Mike Brasher (mbrasher@bmc.com) |
// | // |
// Modified By: |
// Modified By: Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) |
// Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) |
// Dave Rosckes (rosckes@us.ibm.com) |
// |
|
// Modified By: Dave Rosckes (rosckes@us.ibm.com) |
|
// Robert Kieninger, IBM (kieningr@de.ibm.com) for Bug#667 | // Robert Kieninger, IBM (kieningr@de.ibm.com) for Bug#667 |
|
// David Dillard, VERITAS Software Corp. |
|
// (david.dillard@veritas.com) |
|
// Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com) |
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
| |
static Boolean copyFile(const char* fromPath, const char* toPath); | static Boolean copyFile(const char* fromPath, const char* toPath); |
| |
/** Unix issue:<br><br><b>RTLD_<bah></b> issue. Currently Pegasus uses RTLD_NOW during |
/** Unix issue:<br><br><b>RTLD_<blah></b> issue. Currently Pegasus uses RTLD_GLOBAL during |
loading of the library if supported by OS. Previous to 2.2, Pegasus used RTLD_GLOBAL on Linux |
loading of the library if supported by OS. Previous to 2.2, Pegasus used RTLD_GLOBAL on Linux. In between 2.3 and 2.4, it used RTDL_NOW. In 2.5 it is using RTLD_GLOBAL. Please consult doc/ProviderLoading.txt for more information. |
- that behaviour is now deprecated. |
|
*/ | */ |
static DynamicLibraryHandle loadDynamicLibrary(const char* fileName); | static DynamicLibraryHandle loadDynamicLibrary(const char* fileName); |
| |
|
|
static String getHostName(); | static String getHostName(); |
static String getFullyQualifiedHostName (); | static String getFullyQualifiedHostName (); |
static String getSystemCreationClassName (); | static String getSystemCreationClassName (); |
|
static String getHostIP(const String &hostName); |
| |
static Uint32 _acquireIP(const char* hostname); | static Uint32 _acquireIP(const char* hostname); |
| |
|
|
@param userName User name to be checked. | @param userName User name to be checked. |
@return true if the user is a privileged user, else false | @return true if the user is a privileged user, else false |
*/ | */ |
static Boolean isPrivilegedUser(const String userName); |
static Boolean isPrivilegedUser(const String& userName); |
| |
/** | /** |
This function returns the privileged user name on the system. | This function returns the privileged user name on the system. |
|
|
static Boolean isGroupMember(const char* userName, const char* groupName); | static Boolean isGroupMember(const char* userName, const char* groupName); |
| |
/** | /** |
|
Changes the process user context to the specified user. |
|
|
|
@param userName User name to set as the process user context. |
|
|
|
@return True if the user context is successfully changed, |
|
false otherwise. |
|
*/ |
|
#ifndef PEGASUS_OS_OS400 |
|
static Boolean changeUserContext(const char* userName); |
|
#endif |
|
/** |
This function is used to get the process ID of the calling process. | This function is used to get the process ID of the calling process. |
| |
@return Process ID | @return Process ID |
|
|
*/ | */ |
static Boolean changeFilePermissions(const char* path, mode_t mode); | static Boolean changeFilePermissions(const char* path, mode_t mode); |
| |
|
/** Checks whether the specified file is owned by the effective user for |
|
the current process. |
|
@param path Path of the file to check. |
|
@return True if the file is owned by the effective user for the |
|
current process, false otherwise. |
|
*/ |
|
static Boolean verifyFileOwnership(const char* path); |
|
|
/** | /** |
Flag indicating whether shared libraries are loaded with the | Flag indicating whether shared libraries are loaded with the |
BIND_VERBOSE option. | BIND_VERBOSE option. |
|
|
*/ | */ |
static Boolean bindVerbose; | static Boolean bindVerbose; |
| |
/** This function is an abstraction for the openlog interface used in the Logger |
/** |
class. Each platform intending to use system logs should support this interface |
Writes a message to the system log. This method encapsulates the |
*/ |
semantics of opening the system log, writing the specified message, |
static void openlog(const String); |
and closing the log. |
|
|
/** This function is an abstraction for the syslog interface used in the Logger |
@param ident An identifier to be prepended to the log messages |
class. Each platform intending to use system logs should support this interface |
(typically a program name). |
*/ |
@param severity A severity value to be associated with the message. |
static void syslog(Uint32, const char *); |
Severity values are defined in Logger.h. |
|
@param message A message to be written to the system log. |
/** This function is an abstraction for the closelog interface used in the Logger |
*/ |
class. Each platform intending to use system logs should support this interface |
static void syslog( |
*/ |
const String& ident, |
static void closelog(); |
Uint32 severity, |
|
const char* message); |
| |
// System ID constants for Logger::put and Logger::trace | // System ID constants for Logger::put and Logger::trace |
static const String CIMSERVER; | static const String CIMSERVER; |
| |
// System ID constants for Logger::put and Logger::trace | // System ID constants for Logger::put and Logger::trace |
static const String CIMLISTENER; | static const String CIMLISTENER; |
|
|
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |