(file) Return to SystemWindows.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/SystemWindows.cpp between version 1.50 and 1.51

version 1.50, 2005/03/27 20:14:29 version 1.51, 2005/05/09 17:21:03
Line 406 
Line 406 
  
     char mUserName[UNLEN+1];     char mUserName[UNLEN+1];
     char mDomainName[UNLEN+1];     char mDomainName[UNLEN+1];
       char tUserName[UNLEN+1];
     wchar_t wUserName[UNLEN+1];     wchar_t wUserName[UNLEN+1];
     wchar_t wDomainName[UNLEN+1];     wchar_t wDomainName[UNLEN+1];
     char* pbs;     char* pbs;
Line 416 
Line 417 
     LPUSER_INFO_1 pUserInfo = NULL;     LPUSER_INFO_1 pUserInfo = NULL;
     NET_API_STATUS nStatus = NULL;     NET_API_STATUS nStatus = NULL;
  
       // Make a copy of the specified username, it cannot be used directly because it's
       // declared as const and strchr() may modify the string.
       strncpy(tUserName, userName, sizeof(tUserName) - 1);
       tUserName[sizeof(tUserName)] = '\0';
   
     //separate the domain and user name if both are present.     //separate the domain and user name if both are present.
     if (NULL != (pbs = strchr(userName, '\\')))      if (NULL != (pbs = strchr(tUserName, '\\')))
     {     {
         *pbs = '\0';         *pbs = '\0';
         strcpy(mDomainName, userName);          strcpy(mDomainName, tUserName);
         strcpy(mUserName, pbs+1);         strcpy(mUserName, pbs+1);
         usingDomain = true;         usingDomain = true;
  
     } else if ((NULL != (pbs = (strchr(userName, '@')))) ||      } else if ((NULL != (pbs = (strchr(tUserName, '@')))) ||
                (NULL != (pbs = (strchr(userName, '.')))))                 (NULL != (pbs = (strchr(tUserName, '.')))))
     {     {
         *pbs = '\0';         *pbs = '\0';
         strcpy(mDomainName, pbs+1);         strcpy(mDomainName, pbs+1);
         strcpy(mUserName, userName);          strcpy(mUserName, tUserName);
         usingDomain = true;         usingDomain = true;
  
     } else     } else
     {     {
         strcpy(mDomainName, ".");         strcpy(mDomainName, ".");
         strcpy(mUserName, userName);          strcpy(mUserName, tUserName);
     }     }
  
     //convert domain name to unicode     //convert domain name to unicode


Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2