[BACK] Return to cimservera.cpp CVS log [TXT][DIR] Up to [Pegasus] / pegasus / src / Pegasus / Security / Cimservera

Diff for /pegasus/src/Pegasus/Security/Cimservera/Attic/cimservera.cpp between version 1.6 and 1.6.32.1

version 1.6, 2006/01/30 16:18:29 version 1.6.32.1, 2008/01/04 20:13:03
Line 17 
Line 17 
 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 // sell copies of the Software, and to permit persons to whom the Software is // sell copies of the Software, and to permit persons to whom the Software is
 // furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
 //  //
 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Ben Heilbronn, Hewlett-Packard Company(ben_heilbronn@hp.com) 
 // 
 //         Parts of this code originated within PAMBasicAuthenticator. 
 // 
 // Modified By: Sushma Fernandes, Hewlett-Packard Company(sushma_fernandes@hp.com) 
 // 
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
  // NOCHKSRC
  
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/FileSystem.h> #include <Pegasus/Common/FileSystem.h>
 #include <Pegasus/Common/PegasusVersion.h> #include <Pegasus/Common/PegasusVersion.h>
 #include <Pegasus/Security/Authentication/PAMBasicAuthenticator.h> #include <Pegasus/Security/Authentication/PAMBasicAuthenticator.h>
  
 #include <sys/stat.h> #include <sys/stat.h>
 #include <unistd.h> #include <unistd.h>
 #include <sys/types.h> #include <sys/types.h>
 #include <sys/resource.h> #include <sys/resource.h>
 #include <string.h> #include <string.h>
 #include <strings.h> #include <strings.h>
 #include <stdio.h> #include <stdio.h>
 #include <stdlib.h> #include <stdlib.h>
  
Line 173 
Line 169 
     }      }
     else      else
     {     {
         return PAM_CONV_ERR;         return PAM_CONV_ERR;
     }     }
  
     for ( Sint32 i = 0; i < num_msg; i++ )      for ( Sint32 i = 0; i < num_msg; i++ )
     {     {
         switch ( msg[i]->msg_style )          switch ( msg[i]->msg_style )
         {         {
             case PAM_PROMPT_ECHO_OFF:             case PAM_PROMPT_ECHO_OFF:
                 //                  //
                 // copy the user password                 // copy the user password
                 //                  //
                 resp[i]->resp = (char *)malloc(PAM_MAX_MSG_SIZE);                 resp[i]->resp = (char *)malloc(PAM_MAX_MSG_SIZE);
                 strcpy(resp[i]->resp, mydata->userPassword);                 strncpy(resp[i]->resp, mydata->userPassword, PAM_MAX_MSG_SIZE);
                  resp[i]->resp[PAM_MAX_MSG_SIZE - 1] = 0;
                 resp[i]->resp_retcode = 0;                 resp[i]->resp_retcode = 0;
                 break;                 break;
  
             default:             default:
                return PAM_CONV_ERR;                return PAM_CONV_ERR;
         }         }
     }     }
  
     return PAM_SUCCESS;     return PAM_SUCCESS;
 } }
  
 Boolean Cimservera::performAcctMgmt (const String& userName) Boolean Cimservera::performAcctMgmt (const String& userName)
 { {
     Boolean authenticated = false;     Boolean authenticated = false;
     struct pam_conv pconv;     struct pam_conv pconv;


Legend:
Removed from v.1.6 
changed lines
 Added in v.1.6.32.1