summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-22 18:15:23 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-22 18:15:23 +0000
commitcbd0b2ccf9519bcada58567b88987e134563058d (patch)
tree4db13a458318e01a578013508ce61387690f735f /source3
parent034a12fdcb6f707b382d9da481bc012a3c49da76 (diff)
downloadsamba-cbd0b2ccf9519bcada58567b88987e134563058d.tar.gz
samba-cbd0b2ccf9519bcada58567b88987e134563058d.tar.bz2
samba-cbd0b2ccf9519bcada58567b88987e134563058d.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h3
-rw-r--r--source3/lsarpcd/srv_lsa.c4
-rw-r--r--source3/rpc_parse/parse_lsa.c4
-rw-r--r--source3/rpc_server/srv_lsa.c4
-rw-r--r--source3/rpc_server/srv_samr.c6
5 files changed, 14 insertions, 7 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index f9c3d8734b..d75832395d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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);
diff --git a/source3/lsarpcd/srv_lsa.c b/source3/lsarpcd/srv_lsa.c
index a355f0b311..b813301dda 100644
--- a/source3/lsarpcd/srv_lsa.c
+++ b/source3/lsarpcd/srv_lsa.c
@@ -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)++;
}
}
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index 49a0951554..cc60ace9fc 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -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;
}
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c
index a355f0b311..b813301dda 100644
--- a/source3/rpc_server/srv_lsa.c
+++ b/source3/rpc_server/srv_lsa.c
@@ -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)++;
}
}
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index e9204e065f..3a656b5a3b 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -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))