version 1.11.4.6, 2008/02/25 16:38:34
|
version 1.14, 2007/03/16 17:16:50
|
|
|
#define SocketzOS_inline_h | #define SocketzOS_inline_h |
| |
#include <Pegasus/Common/Logger.h> | #include <Pegasus/Common/Logger.h> |
#ifdef PEGASUS_ZOS_SECURITY |
|
// This include file will not be provided in the OpenGroup CVS for now. |
|
// Do NOT try to include it in your compile |
|
#include <Pegasus/Common/safCheckzOS_inline.h> |
|
#endif |
|
#include <sys/ioctl.h> | #include <sys/ioctl.h> |
#include <net/rtrouteh.h> | #include <net/rtrouteh.h> |
#include <net/if.h> | #include <net/if.h> |
|
|
| |
MP_Socket::MP_Socket(SocketHandle socket) | MP_Socket::MP_Socket(SocketHandle socket) |
: _socket(socket), _isSecure(false), | : _socket(socket), _isSecure(false), |
_userAuthenticated(false) |
_userAuthenticated(false), |
|
_socketWriteTimeout(PEGASUS_DEFAULT_SOCKETWRITE_TIMEOUT_SECONDS) |
{ | { |
_username[0]=0; | _username[0]=0; |
} | } |
|
|
SSLContext * sslcontext, | SSLContext * sslcontext, |
ReadWriteSem * sslContextObjectLock) | ReadWriteSem * sslContextObjectLock) |
: _socket(socket), | : _socket(socket), |
_userAuthenticated(false) |
_userAuthenticated(false), |
|
_socketWriteTimeout(PEGASUS_DEFAULT_SOCKETWRITE_TIMEOUT_SECONDS) |
{ | { |
PEG_METHOD_ENTER(TRC_SSL, "MP_Socket::MP_Socket()"); | PEG_METHOD_ENTER(TRC_SSL, "MP_Socket::MP_Socket()"); |
_username[0]=0; | _username[0]=0; |
|
|
Logger::put_l( | Logger::put_l( |
Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, | Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE, |
"Pegasus.Common.SocketzOS_inline.POLICY_NOT_ENABLED", | "Pegasus.Common.SocketzOS_inline.POLICY_NOT_ENABLED", |
"ATTLS policy is not active for the CIM Server HTTPS port. " |
"ATTLS policy is not aktive for the CIM Server HTTPS port. " |
"Communication not secured. Connection closed."); | "Communication not secured. Connection closed."); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return -1; | return -1; |
|
|
case(TTLS_SEC_SRV_CA_REQD): | case(TTLS_SEC_SRV_CA_REQD): |
{ | { |
PEG_TRACE_CSTRING(TRC_SSL, Tracer::LEVEL4, | PEG_TRACE_CSTRING(TRC_SSL, Tracer::LEVEL4, |
"---> ATTLS Security Type is valid but no SAFCHK."); |
"---> ATTLS Securtiy Type is valid but no SAFCHK."); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return 1; | return 1; |
} | } |
|
|
_username[ioc.TTLSi_UserID_Len]=0; // null terminated string | _username[ioc.TTLSi_UserID_Len]=0; // null terminated string |
__etoa(_username); // the user name is in EBCDIC ! | __etoa(_username); // the user name is in EBCDIC ! |
PEG_TRACE((TRC_SSL, Tracer::LEVEL2, | PEG_TRACE((TRC_SSL, Tracer::LEVEL2, |
"---> ATTLS Security Type is SAFCHK. Resolved user ID \'%s\'", |
"---> ATTLS Securtiy Type is SAFCHK. Resolved user ID \'%s\'", |
_username)); | _username)); |
|
|
// Check if the user is authorized to CIMSERV |
|
#ifdef PEGASUS_ZOS_SECURITY |
|
if ( !CheckProfileCIMSERVclassWBEM(_username, __READ_RESOURCE) ) |
|
{ |
|
Logger::put_l(Logger::STANDARD_LOG, ZOS_SECURITY_NAME, |
|
Logger::WARNING, |
|
"Pegasus.Common.SocketzOS_inline.NOREAD_CIMSERV_ACCESS", |
|
"Request UserID $0 doesn't have READ permission" |
|
" to profile CIMSERV CL(WBEM).", |
|
_username); |
|
return -1; |
|
} |
|
#endif |
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return 1; | return 1; |
| |