(file) Return to LocalAuthenticationHandler.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Security / Authentication

Diff for /pegasus/src/Pegasus/Security/Authentication/LocalAuthenticationHandler.cpp between version 1.27 and 1.27.4.2

version 1.27, 2009/08/07 05:43:31 version 1.27.4.2, 2013/07/20 18:32:56
Line 66 
Line 66 
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  
 Boolean LocalAuthenticationHandler::authenticate(  AuthenticationStatus LocalAuthenticationHandler::authenticate(
     const String& authHeader,     const String& authHeader,
     AuthenticationInfo* authInfo)     AuthenticationInfo* authInfo)
 { {
Line 79 
Line 79 
     if (colon1 == PEG_NOT_FOUND)     if (colon1 == PEG_NOT_FOUND)
     {     {
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return false;          return AuthenticationStatus(AUTHSC_UNAUTHORIZED);
     }     }
  
     String userName = authHeader.subString(0, colon1);     String userName = authHeader.subString(0, colon1);
Line 110 
Line 110 
     if (filePath != authInfo->getLocalAuthFilePath())     if (filePath != authInfo->getLocalAuthFilePath())
     {     {
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return false;          return AuthenticationStatus(AUTHSC_UNAUTHORIZED);
     }     }
  
     //     //
Line 119 
Line 119 
     if (secretReceived.size() == 0 || userName.size() == 0)     if (secretReceived.size() == 0 || userName.size() == 0)
     {     {
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return false;          return AuthenticationStatus(AUTHSC_UNAUTHORIZED);
     }     }
  
     String authenticatedUsername = authInfo->getAuthenticatedUser();     String authenticatedUsername = authInfo->getAuthenticatedUser();
Line 133 
Line 133 
         userName != authenticatedUsername)         userName != authenticatedUsername)
     {     {
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return false;          return AuthenticationStatus(AUTHSC_UNAUTHORIZED);
     }     }
  
     //     //
Line 142 
Line 142 
     if (!System::isSystemUser(userName.getCString()))     if (!System::isSystemUser(userName.getCString()))
     {     {
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return false;          return AuthenticationStatus(AUTHSC_UNAUTHORIZED);
     }     }
  
     // Check if the user is authorized to CIMSERV     // Check if the user is authorized to CIMSERV
Line 156 
Line 156 
                 "Request UserID $0 doesn't have READ permission "                 "Request UserID $0 doesn't have READ permission "
                     "to profile CIMSERV CL(WBEM).",                     "to profile CIMSERV CL(WBEM).",
                 userName));                 userName));
         return false;          return AuthenticationStatus(AUTHSC_UNAUTHORIZED);
     }     }
 #endif #endif
  
Line 165 
Line 165 
     authInfo->setRemotePrivilegedUserAccessChecked();     authInfo->setRemotePrivilegedUserAccessChecked();
  
     // Authenticate     // Authenticate
     Boolean authenticated = _localAuthenticator->authenticate(      AuthenticationStatus authStatus = _localAuthenticator->authenticate(
         filePath, secretReceived, authInfo->getLocalAuthSecret());         filePath, secretReceived, authInfo->getLocalAuthSecret());
  
     if (authenticated)      if (authStatus.isSuccess())
     {     {
         authInfo->setAuthenticatedUser(userName);         authInfo->setAuthenticatedUser(userName);
         // For Privilege Separation, remember the secret on subsequent requests         // For Privilege Separation, remember the secret on subsequent requests
Line 186 
Line 186 
                 "IP address $1.",userName,authInfo->getIpAddress()));                 "IP address $1.",userName,authInfo->getIpAddress()));
     }     }
  
     PEG_AUDIT_LOG(logLocalAuthentication(userName, authenticated));      PEG_AUDIT_LOG(logLocalAuthentication(userName, authStatus.isSuccess()));
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
  
     return authenticated;      return authStatus;
 } }
  
 Boolean LocalAuthenticationHandler::validateUser(const String& userName)  AuthenticationStatus LocalAuthenticationHandler::validateUser(
       const String& userName,
       AuthenticationInfo* authInfo)
 { {
     return _localAuthenticator->validateUser(userName);      return _localAuthenticator->validateUser(userName,authInfo);
 } }
  
 String LocalAuthenticationHandler::getAuthResponseHeader( String LocalAuthenticationHandler::getAuthResponseHeader(


Legend:
Removed from v.1.27  
changed lines
  Added in v.1.27.4.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2