version 1.12, 2002/10/02 20:35:09
|
version 1.21, 2006/08/18 17:58:49
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// 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.; |
|
// 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. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec 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: Nag Boranna, Hewlett Packard Company (nagaraja_boranna@hp.com) | // Modified By: Nag Boranna, Hewlett Packard Company (nagaraja_boranna@hp.com) |
// Carol Ann Krug Graves, Hewlett-Packard Company | // Carol Ann Krug Graves, Hewlett-Packard Company |
// (carolann_graves@hp.com) | // (carolann_graves@hp.com) |
|
// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for PEP#101 |
|
// David Dillard, VERITAS Software Corp. |
|
// (david.dillard@veritas.com) |
// | // |
//%//////////////////////////////////////////////////////////////////////////// | //%//////////////////////////////////////////////////////////////////////////// |
| |
|
|
| |
#include <Pegasus/Common/FileSystem.h> | #include <Pegasus/Common/FileSystem.h> |
#include <Pegasus/Common/HashTable.h> | #include <Pegasus/Common/HashTable.h> |
#include <Pegasus/Common/Destroyer.h> |
|
#include <Pegasus/Common/Logger.h> | #include <Pegasus/Common/Logger.h> |
#include <Pegasus/Common/System.h> | #include <Pegasus/Common/System.h> |
#include <Pegasus/Common/Tracer.h> | #include <Pegasus/Common/Tracer.h> |
|
|
#include "AuthorizationHandler.h" | #include "AuthorizationHandler.h" |
#include "UserExceptions.h" | #include "UserExceptions.h" |
| |
|
#ifdef PEGASUS_OS_OS400 |
|
#include "qycmutiltyUtility.H" |
|
#include "OS400ConvertChar.h" |
|
#endif |
| |
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
| |
|
|
{ | { |
_loadAllAuthorizations(); | _loadAllAuthorizations(); |
} | } |
catch(Exception& e) |
catch (Exception&) |
{ | { |
//ATTN-NB-03-20020402: Should this exception be thrown or ignored ? | //ATTN-NB-03-20020402: Should this exception be thrown or ignored ? |
//throw e; | //throw e; |
|
|
} | } |
| |
} | } |
catch(Exception& e) |
catch(const Exception&) |
{ | { |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw e; |
throw; |
} | } |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
|
|
} | } |
} | } |
| |
|
#ifdef PEGASUS_OS_OS400 |
|
if (readOperation || writeOperation) |
|
{ |
|
// Use OS/400 Application Administration to do cim operation verification |
|
// (note - need to convert to EBCDIC before calling ycm) |
|
CString userCStr = userName.getCString(); |
|
const char * user = (const char *)userCStr; |
|
AtoE((char *)user); |
|
CString nsCStr = nameSpace.getString().getCString(); |
|
const char * ns = (const char *)nsCStr; |
|
AtoE((char *)ns); |
|
CString cimMethCStr = cimMethodName.getString().getCString(); |
|
const char * cimMeth = (const char *)cimMethCStr; |
|
AtoE((char *)cimMeth); |
|
int os400auth = |
|
ycmVerifyFunctionAuthorization(user, |
|
ns, |
|
cimMeth); |
|
if (os400auth == TRUE) |
|
authorized = true; |
|
} |
|
#else |
// | // |
// Get the authorization of the specified user and namespace | // Get the authorization of the specified user and namespace |
// | // |
|
|
{ | { |
auth = getAuthorization(userName, nameSpace); | auth = getAuthorization(userName, nameSpace); |
} | } |
catch (Exception& e) |
catch (Exception&) |
{ | { |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return authorized; | return authorized; |
|
|
{ | { |
authorized = true; | authorized = true; |
} | } |
|
#endif |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |