mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[USRMGR] Increase name sizes to 'UNLEN + 1'
This commit is contained in:
parent
1cf1892b14
commit
a120d67d0e
4 changed files with 28 additions and 28 deletions
|
@ -155,7 +155,7 @@ AddSelectedUsersToGroup(HWND hwndDlg,
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
INT nSelectedItems;
|
INT nSelectedItems;
|
||||||
INT nItem;
|
INT nItem;
|
||||||
TCHAR szUserName[UNLEN];
|
TCHAR szUserName[UNLEN + 1];
|
||||||
BOOL bResult = FALSE;
|
BOOL bResult = FALSE;
|
||||||
LOCALGROUP_MEMBERS_INFO_3 memberInfo;
|
LOCALGROUP_MEMBERS_INFO_3 memberInfo;
|
||||||
NET_API_STATUS status;
|
NET_API_STATUS status;
|
||||||
|
@ -172,7 +172,7 @@ AddSelectedUsersToGroup(HWND hwndDlg,
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
nItem, 0,
|
nItem, 0,
|
||||||
szUserName,
|
szUserName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
DebugPrintf(_TEXT("Selected user: %s"), szUserName);
|
DebugPrintf(_TEXT("Selected user: %s"), szUserName);
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ static VOID
|
||||||
RemoveUserFromGroup(HWND hwndDlg,
|
RemoveUserFromGroup(HWND hwndDlg,
|
||||||
PGENERAL_GROUP_DATA pGroupData)
|
PGENERAL_GROUP_DATA pGroupData)
|
||||||
{
|
{
|
||||||
TCHAR szUserName[UNLEN];
|
TCHAR szUserName[UNLEN + 1];
|
||||||
TCHAR szText[256];
|
TCHAR szText[256];
|
||||||
LOCALGROUP_MEMBERS_INFO_3 memberInfo;
|
LOCALGROUP_MEMBERS_INFO_3 memberInfo;
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
|
@ -326,7 +326,7 @@ RemoveUserFromGroup(HWND hwndDlg,
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
nItem, 0,
|
nItem, 0,
|
||||||
szUserName,
|
szUserName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
/* Display a warning message because the remove operation cannot be reverted */
|
/* Display a warning message because the remove operation cannot be reverted */
|
||||||
wsprintf(szText, TEXT("Do you really want to remove the user \"%s\" from the group \"%s\"?"),
|
wsprintf(szText, TEXT("Do you really want to remove the user \"%s\" from the group \"%s\"?"),
|
||||||
|
@ -612,7 +612,7 @@ GroupProperties(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE psp[1];
|
PROPSHEETPAGE psp[1];
|
||||||
PROPSHEETHEADER psh;
|
PROPSHEETHEADER psh;
|
||||||
TCHAR szGroupName[UNLEN];
|
TCHAR szGroupName[UNLEN + 1];
|
||||||
INT nItem;
|
INT nItem;
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
|
|
||||||
|
@ -625,7 +625,7 @@ GroupProperties(HWND hwndDlg)
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
nItem, 0,
|
nItem, 0,
|
||||||
szGroupName,
|
szGroupName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
||||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||||
|
|
|
@ -90,7 +90,7 @@ UpdateGroupsList(HWND hwndListView)
|
||||||
static VOID
|
static VOID
|
||||||
UpdateGroupProperties(HWND hwndDlg)
|
UpdateGroupProperties(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
TCHAR szGroupName[UNLEN];
|
TCHAR szGroupName[UNLEN + 1];
|
||||||
INT iItem;
|
INT iItem;
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
PLOCALGROUP_INFO_1 pGroupInfo = NULL;
|
PLOCALGROUP_INFO_1 pGroupInfo = NULL;
|
||||||
|
@ -104,7 +104,7 @@ UpdateGroupProperties(HWND hwndDlg)
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
iItem, 0,
|
iItem, 0,
|
||||||
szGroupName,
|
szGroupName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
NetLocalGroupGetInfo(NULL, szGroupName, 1, (LPBYTE*)&pGroupInfo);
|
NetLocalGroupGetInfo(NULL, szGroupName, 1, (LPBYTE*)&pGroupInfo);
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ GroupRename(HWND hwndDlg)
|
||||||
static BOOL
|
static BOOL
|
||||||
GroupDelete(HWND hwndDlg)
|
GroupDelete(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
TCHAR szGroupName[UNLEN];
|
TCHAR szGroupName[UNLEN + 1];
|
||||||
TCHAR szText[256];
|
TCHAR szText[256];
|
||||||
INT nItem;
|
INT nItem;
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
|
@ -269,7 +269,7 @@ GroupDelete(HWND hwndDlg)
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
nItem, 0,
|
nItem, 0,
|
||||||
szGroupName,
|
szGroupName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
/* Display a warning message, because the delete operation cannot be reverted */
|
/* Display a warning message, because the delete operation cannot be reverted */
|
||||||
wsprintf(szText, TEXT("Dou you really want to delete the user group \"%s\"?"), szGroupName);
|
wsprintf(szText, TEXT("Dou you really want to delete the user group \"%s\"?"), szGroupName);
|
||||||
|
@ -336,8 +336,8 @@ OnGroupsPageBeginLabelEdit(LPNMLVDISPINFO pnmv)
|
||||||
static BOOL
|
static BOOL
|
||||||
OnGroupsPageEndLabelEdit(LPNMLVDISPINFO pnmv)
|
OnGroupsPageEndLabelEdit(LPNMLVDISPINFO pnmv)
|
||||||
{
|
{
|
||||||
TCHAR szOldGroupName[UNLEN];
|
TCHAR szOldGroupName[UNLEN + 1];
|
||||||
TCHAR szNewGroupName[UNLEN];
|
TCHAR szNewGroupName[UNLEN + 1];
|
||||||
LOCALGROUP_INFO_0 lgrpi0;
|
LOCALGROUP_INFO_0 lgrpi0;
|
||||||
NET_API_STATUS status;
|
NET_API_STATUS status;
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ OnGroupsPageEndLabelEdit(LPNMLVDISPINFO pnmv)
|
||||||
ListView_GetItemText(pnmv->hdr.hwndFrom,
|
ListView_GetItemText(pnmv->hdr.hwndFrom,
|
||||||
pnmv->item.iItem, 0,
|
pnmv->item.iItem, 0,
|
||||||
szOldGroupName,
|
szOldGroupName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
/* Leave, if the user canceled the edit action */
|
/* Leave, if the user canceled the edit action */
|
||||||
if (pnmv->item.pszText == NULL)
|
if (pnmv->item.pszText == NULL)
|
||||||
|
|
|
@ -316,7 +316,7 @@ static VOID
|
||||||
RemoveGroupFromUser(HWND hwndDlg,
|
RemoveGroupFromUser(HWND hwndDlg,
|
||||||
PMEMBERSHIP_USER_DATA pUserData)
|
PMEMBERSHIP_USER_DATA pUserData)
|
||||||
{
|
{
|
||||||
TCHAR szGroupName[UNLEN];
|
TCHAR szGroupName[UNLEN + 1];
|
||||||
TCHAR szText[256];
|
TCHAR szText[256];
|
||||||
LOCALGROUP_MEMBERS_INFO_3 memberInfo;
|
LOCALGROUP_MEMBERS_INFO_3 memberInfo;
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
|
@ -332,7 +332,7 @@ RemoveGroupFromUser(HWND hwndDlg,
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
nItem, 0,
|
nItem, 0,
|
||||||
szGroupName,
|
szGroupName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
/* Display a warning message because the remove operation cannot be reverted */
|
/* Display a warning message because the remove operation cannot be reverted */
|
||||||
wsprintf(szText, TEXT("Do you really want to remove the user \"%s\" from the group \"%s\"?"),
|
wsprintf(szText, TEXT("Do you really want to remove the user \"%s\" from the group \"%s\"?"),
|
||||||
|
@ -441,7 +441,7 @@ AddSelectedGroupsToUser(HWND hwndDlg,
|
||||||
{
|
{
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
INT nItem;
|
INT nItem;
|
||||||
TCHAR szGroupName[UNLEN];
|
TCHAR szGroupName[UNLEN + 1];
|
||||||
BOOL bResult = FALSE;
|
BOOL bResult = FALSE;
|
||||||
BOOL bFound;
|
BOOL bFound;
|
||||||
DWORD i;
|
DWORD i;
|
||||||
|
@ -459,7 +459,7 @@ AddSelectedGroupsToUser(HWND hwndDlg,
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
nItem, 0,
|
nItem, 0,
|
||||||
szGroupName,
|
szGroupName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
bFound = FALSE;
|
bFound = FALSE;
|
||||||
for (i = 0; i < pUserData->dwGroupCount; i++)
|
for (i = 0; i < pUserData->dwGroupCount; i++)
|
||||||
|
@ -902,7 +902,7 @@ UserProperties(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE psp[3];
|
PROPSHEETPAGE psp[3];
|
||||||
PROPSHEETHEADER psh;
|
PROPSHEETHEADER psh;
|
||||||
TCHAR szUserName[UNLEN];
|
TCHAR szUserName[UNLEN + 1];
|
||||||
INT nItem;
|
INT nItem;
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
|
|
||||||
|
@ -915,7 +915,7 @@ UserProperties(HWND hwndDlg)
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
nItem, 0,
|
nItem, 0,
|
||||||
szUserName,
|
szUserName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
||||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||||
|
|
|
@ -109,7 +109,7 @@ ChangePasswordDlgProc(HWND hwndDlg,
|
||||||
static VOID
|
static VOID
|
||||||
UserChangePassword(HWND hwndDlg)
|
UserChangePassword(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
TCHAR szUserName[UNLEN];
|
TCHAR szUserName[UNLEN + 1];
|
||||||
USER_INFO_1003 user;
|
USER_INFO_1003 user;
|
||||||
INT nItem;
|
INT nItem;
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
|
@ -126,7 +126,7 @@ UserChangePassword(HWND hwndDlg)
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
nItem, 0,
|
nItem, 0,
|
||||||
szUserName,
|
szUserName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
if (DialogBoxParam(hApplet,
|
if (DialogBoxParam(hApplet,
|
||||||
MAKEINTRESOURCE(IDD_CHANGE_PASSWORD),
|
MAKEINTRESOURCE(IDD_CHANGE_PASSWORD),
|
||||||
|
@ -386,7 +386,7 @@ UserRename(HWND hwndDlg)
|
||||||
static BOOL
|
static BOOL
|
||||||
UserDelete(HWND hwndDlg)
|
UserDelete(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
TCHAR szUserName[UNLEN];
|
TCHAR szUserName[UNLEN + 1];
|
||||||
TCHAR szText[256];
|
TCHAR szText[256];
|
||||||
INT nItem;
|
INT nItem;
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
|
@ -401,7 +401,7 @@ UserDelete(HWND hwndDlg)
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
nItem, 0,
|
nItem, 0,
|
||||||
szUserName,
|
szUserName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
/* Display a warning message because the delete operation cannot be reverted */
|
/* Display a warning message because the delete operation cannot be reverted */
|
||||||
wsprintf(szText, TEXT("Do you really want to delete the user \"%s\"?"), szUserName);
|
wsprintf(szText, TEXT("Do you really want to delete the user \"%s\"?"), szUserName);
|
||||||
|
@ -550,8 +550,8 @@ OnBeginLabelEdit(LPNMLVDISPINFO pnmv)
|
||||||
static BOOL
|
static BOOL
|
||||||
OnEndLabelEdit(LPNMLVDISPINFO pnmv)
|
OnEndLabelEdit(LPNMLVDISPINFO pnmv)
|
||||||
{
|
{
|
||||||
TCHAR szOldUserName[UNLEN];
|
TCHAR szOldUserName[UNLEN + 1];
|
||||||
TCHAR szNewUserName[UNLEN];
|
TCHAR szNewUserName[UNLEN + 1];
|
||||||
USER_INFO_0 useri0;
|
USER_INFO_0 useri0;
|
||||||
NET_API_STATUS status;
|
NET_API_STATUS status;
|
||||||
|
|
||||||
|
@ -563,7 +563,7 @@ OnEndLabelEdit(LPNMLVDISPINFO pnmv)
|
||||||
ListView_GetItemText(pnmv->hdr.hwndFrom,
|
ListView_GetItemText(pnmv->hdr.hwndFrom,
|
||||||
pnmv->item.iItem, 0,
|
pnmv->item.iItem, 0,
|
||||||
szOldUserName,
|
szOldUserName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
/* Leave, if the user canceled the edit action */
|
/* Leave, if the user canceled the edit action */
|
||||||
if (pnmv->item.pszText == NULL)
|
if (pnmv->item.pszText == NULL)
|
||||||
|
@ -649,7 +649,7 @@ OnNotify(HWND hwndDlg, PUSER_DATA pUserData, NMHDR *phdr)
|
||||||
static VOID
|
static VOID
|
||||||
UpdateUserProperties(HWND hwndDlg)
|
UpdateUserProperties(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
TCHAR szUserName[UNLEN];
|
TCHAR szUserName[UNLEN + 1];
|
||||||
INT iItem;
|
INT iItem;
|
||||||
HWND hwndLV;
|
HWND hwndLV;
|
||||||
PUSER_INFO_2 pUserInfo = NULL;
|
PUSER_INFO_2 pUserInfo = NULL;
|
||||||
|
@ -664,7 +664,7 @@ UpdateUserProperties(HWND hwndDlg)
|
||||||
ListView_GetItemText(hwndLV,
|
ListView_GetItemText(hwndLV,
|
||||||
iItem, 0,
|
iItem, 0,
|
||||||
szUserName,
|
szUserName,
|
||||||
UNLEN);
|
UNLEN + 1);
|
||||||
|
|
||||||
NetUserGetInfo(NULL, szUserName, 2, (LPBYTE*)&pUserInfo);
|
NetUserGetInfo(NULL, szUserName, 2, (LPBYTE*)&pUserInfo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue