version 1.53, 2005/05/20 21:09:45
|
version 1.54, 2005/06/10 18:28:45
|
|
|
// Make a copy of the specified username, it cannot be used directly because it's | // Make a copy of the specified username, it cannot be used directly because it's |
// declared as const and strchr() may modify the string. | // declared as const and strchr() may modify the string. |
strncpy(tUserName, userName, sizeof(tUserName) - 1); | strncpy(tUserName, userName, sizeof(tUserName) - 1); |
tUserName[sizeof(tUserName)] = '\0'; |
tUserName[sizeof(tUserName)- 1] = '\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(tUserName, '\\'))) | if (NULL != (pbs = strchr(tUserName, '\\'))) |