(file) Return to Parent.c CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Executor

Diff for /pegasus/src/Executor/Parent.c between version 1.19 and 1.19.2.3

version 1.19, 2010/10/29 05:29:49 version 1.19.2.3, 2013/07/20 18:32:37
Line 58 
Line 58 
  
 #if defined(PEGASUS_PAM_AUTHENTICATION) #if defined(PEGASUS_PAM_AUTHENTICATION)
 # include "PAMAuth.h" # include "PAMAuth.h"
   #else
   /* PAM_SUCCESS is defined to 0 by PAM */
   #define PAM_SUCCESS 0
 #endif #endif
  
 /* /*
Line 261 
Line 264 
 static void HandleStartProviderAgentRequest(int sock) static void HandleStartProviderAgentRequest(int sock)
 { {
     int status;     int status;
     int uid;  
     int gid;  
     int pid;     int pid;
     int to[2];     int to[2];
     int from[2];     int from[2];
Line 310 
Line 311 
  
         /* Look up the user ID and group ID of the specified user. */         /* Look up the user ID and group ID of the specified user. */
  
           int uid;
           int gid;
         if (GetUserInfo(request.userName, &uid, &gid) != 0)         if (GetUserInfo(request.userName, &uid, &gid) != 0)
         {         {
               Log(LL_WARNING, "User %s does not exist on this system, "
                   "hence cannot start the provider agent %s",
                   request.userName, request.module);
             status = -1;             status = -1;
             break;             break;
         }         }
Line 607 
Line 613 
     int status;     int status;
     struct ExecutorAuthenticatePasswordRequest request;     struct ExecutorAuthenticatePasswordRequest request;
     struct ExecutorAuthenticatePasswordResponse response;     struct ExecutorAuthenticatePasswordResponse response;
     int gid;  
     int uid;  
  
     memset(&response, 0, sizeof(response));     memset(&response, 0, sizeof(response));
  
Line 627 
Line 631 
  
     do     do
     {     {
         if (GetUserInfo(request.username, &uid, &gid) != 0)  
         {  
             status = -1;  
             break;  
         }  
  
 #if defined(PEGASUS_PAM_AUTHENTICATION) #if defined(PEGASUS_PAM_AUTHENTICATION)
  
         if (PAMAuthenticate(request.username, request.password) != 0)          status = PAMAuthenticate(request.username, request.password);
   
           if (status == PAM_SUCCESS)
         {         {
             status = -1;              Log(LL_TRACE,
             break;                  "Basic authentication through PAM: "
                       "username = %s, successful.",
                   request.username);
           }
           else
           {
               Log(LL_TRACE,
                   "Basic authentication through PAM: "
                       "username = %s, failed with PAM return code= %d.",
                   request.username,
                   status);
         }         }
   
  
 #else /* !PEGASUS_PAM_AUTHENTICATION */ #else /* !PEGASUS_PAM_AUTHENTICATION */
  
         {         {
               int gid;
               int uid;
               if (GetUserInfo(request.username, &uid, &gid) != 0)
               {
                   status = -1;
                   break;
               }
   
             const char* path = FindMacro("passwordFilePath");             const char* path = FindMacro("passwordFilePath");
  
             if (!path)             if (!path)
Line 661 
Line 679 
             }             }
         }         }
  
           Log(LL_TRACE, "Basic authentication attempt: username = %s, "
               "successful = %s",
               request.username, status == PAM_SUCCESS ? "TRUE" : "FALSE" );
   
 #endif /* !PEGASUS_PAM_AUTHENTICATION */ #endif /* !PEGASUS_PAM_AUTHENTICATION */
     }     }
     while (0);     while (0);
  
     Log(LL_TRACE, "Basic authentication attempt: username = %s, "  
         "successful = %s",  
         request.username, status == 0 ? "TRUE" : "FALSE" );  
   
     /* Send response message. */     /* Send response message. */
  
     response.status = status;     response.status = status;
Line 707 
Line 725 
  
 #if defined(PEGASUS_PAM_AUTHENTICATION) #if defined(PEGASUS_PAM_AUTHENTICATION)
  
     if (PAMValidateUser(request.username) != 0)      status = PAMValidateUser(request.username);
         status = -1;  
  
 #else /* !PEGASUS_PAM_AUTHENTICATION */ #else /* !PEGASUS_PAM_AUTHENTICATION */
  


Legend:
Removed from v.1.19  
changed lines
  Added in v.1.19.2.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2