mirror of
https://github.com/samba-team/samba.git
synced 2025-03-05 20:58:40 +03:00
bug fix in lsa_trans_names.
well-known aliases S-1-5-20 is actually S-1-5-0x20 but sid_to_string does decimal not hexadecimal oops. (This used to be commit 4d830e243650729344a2d1b238075e787802ff8b)
This commit is contained in:
parent
034a12fdcb
commit
cbd0b2ccf9
@ -1343,7 +1343,8 @@ BOOL do_wks_query_info(struct cli_state *cli,
|
||||
|
||||
/*The following definitions come from rpc_parse/parse_lsa.c */
|
||||
|
||||
void make_lsa_trans_name(LSA_TRANS_NAME *trn, uint32 sid_name_use, char *name, uint32 idx);
|
||||
void make_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name,
|
||||
uint32 sid_name_use, char *name, uint32 idx);
|
||||
void make_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff,
|
||||
uint32 unknown);
|
||||
void make_lsa_obj_attr(LSA_OBJ_ATTR *attr, uint32 attributes, LSA_SEC_QOS *qos);
|
||||
|
@ -231,7 +231,9 @@ static void make_lsa_trans_names(LSA_TRANS_NAME_ENUM *trn,
|
||||
|
||||
if (status == 0x0)
|
||||
{
|
||||
make_lsa_trans_name(&(trn->name[(*total)]), type, name, (*total));
|
||||
make_lsa_trans_name(&(trn->name [(*total)]),
|
||||
&(trn->uni_name[(*total)]),
|
||||
type, name, (*total));
|
||||
(*total)++;
|
||||
}
|
||||
}
|
||||
|
@ -31,12 +31,14 @@ static void lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct
|
||||
/*******************************************************************
|
||||
creates a LSA_TRANS_NAME structure.
|
||||
********************************************************************/
|
||||
void make_lsa_trans_name(LSA_TRANS_NAME *trn, uint32 sid_name_use, char *name, uint32 idx)
|
||||
void make_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name,
|
||||
uint32 sid_name_use, char *name, uint32 idx)
|
||||
{
|
||||
int len_name = strlen(name);
|
||||
|
||||
trn->sid_name_use = sid_name_use;
|
||||
make_uni_hdr(&(trn->hdr_name), len_name, len_name, len_name != 0);
|
||||
make_unistr2(uni_name, name, len_name);
|
||||
trn->domain_idx = idx;
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,9 @@ static void make_lsa_trans_names(LSA_TRANS_NAME_ENUM *trn,
|
||||
|
||||
if (status == 0x0)
|
||||
{
|
||||
make_lsa_trans_name(&(trn->name[(*total)]), type, name, (*total));
|
||||
make_lsa_trans_name(&(trn->name [(*total)]),
|
||||
&(trn->uni_name[(*total)]),
|
||||
type, name, (*total));
|
||||
(*total)++;
|
||||
}
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ static void samr_reply_unknown_3(SAMR_Q_UNKNOWN_3 *q_u,
|
||||
|
||||
string_to_sid(&everyone_sid, "S-1-1");
|
||||
|
||||
/* maybe need another 1 or 2 (S-1-5-20-0x220 and S-1-5-20-0x224) */
|
||||
/* maybe need another 1 or 2 (S-1-5-0x20-0x220 and S-1-5-20-0x224) */
|
||||
/* these two are DOMAIN_ADMIN and DOMAIN_ACCT_OP group RIDs */
|
||||
make_dom_sid3(&(sid[0]), 0x035b, 0x0002, &everyone_sid);
|
||||
make_dom_sid3(&(sid[1]), 0x0044, 0x0002, &user_sid);
|
||||
@ -456,7 +456,7 @@ static void samr_reply_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES *q_u,
|
||||
{
|
||||
SAMR_R_ENUM_DOM_ALIASES r_e;
|
||||
SAM_USER_INFO_21 pass[MAX_SAM_ENTRIES];
|
||||
int num_entries;
|
||||
int num_entries = 0;
|
||||
DOM_SID sid;
|
||||
fstring sid_str;
|
||||
fstring sam_sid_str;
|
||||
@ -476,7 +476,7 @@ static void samr_reply_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES *q_u,
|
||||
DEBUG(5,("samr_reply_enum_dom_aliases: sid %s\n", sid_str));
|
||||
|
||||
/* well-known aliases */
|
||||
if (strequal(sid_str, "S-1-5-20"))
|
||||
if (strequal(sid_str, "S-1-5-32"))
|
||||
{
|
||||
char *name;
|
||||
while (num_entries < MAX_SAM_ENTRIES && ((name = builtin_alias_rids[num_entries].name) != NULL))
|
||||
|
Loading…
x
Reference in New Issue
Block a user