1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

grumble, grumble off-by-one unicode string fixes, gonna stuff my other

tree with cvs clashes when i cvs update on the group code grumble grumble
(This used to be commit f8b229d187)
This commit is contained in:
Luke Leighton 1998-11-06 18:46:42 +00:00
parent 4bd1feb68c
commit 53abed10e7

View File

@ -78,9 +78,9 @@ static BOOL get_sampwd_entries(SAM_USER_INFO_21 *pw_buf,
}
user_name_len = strlen(pwd->smb_name);
make_unistr2(&(pw_buf[(*num_entries)].uni_user_name), pwd->smb_name, user_name_len-1);
make_uni_hdr(&(pw_buf[(*num_entries)].hdr_user_name), user_name_len-1,
user_name_len-1, 1);
make_unistr2(&(pw_buf[(*num_entries)].uni_user_name), pwd->smb_name, user_name_len);
make_uni_hdr(&(pw_buf[(*num_entries)].hdr_user_name), user_name_len,
user_name_len, 1);
pw_buf[(*num_entries)].user_rid = pwd->user_rid;
bzero( pw_buf[(*num_entries)].nt_pwd , 16);
@ -418,7 +418,7 @@ static void samr_reply_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS *q_u,
got_grps = True;
num_entries = 1;
make_unistr2(&(pass[0].uni_user_name), dummy_group, strlen(dummy_group)-1);
make_unistr2(&(pass[0].uni_user_name), dummy_group, strlen(dummy_group));
pass[0].user_rid = DOMAIN_GROUP_RID_ADMINS;
if (r_e.status == 0 && got_grps)
@ -481,7 +481,7 @@ static void samr_reply_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES *q_u,
char *name;
while (num_entries < MAX_SAM_ENTRIES && ((name = builtin_alias_rids[num_entries].name) != NULL))
{
make_unistr2(&(pass[num_entries].uni_user_name), name, strlen(name)-1);
make_unistr2(&(pass[num_entries].uni_user_name), name, strlen(name));
pass[num_entries].user_rid = builtin_alias_rids[num_entries].rid;
num_entries++;
}