version 1.44, 2004/08/25 11:15:54
|
version 1.49, 2005/02/05 22:59:24
|
|
|
//%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 |
|
|
// | // |
// Modified By: 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) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
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. |
|
*/ |
|
static Boolean changeUserContext(const char* userName); |
|
|
|
/** |
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. |