summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-14 03:32:21 +0000
committerJeremy Allison <jra@samba.org>1998-05-14 03:32:21 +0000
commit05a8202b48291b46befedad345b546d1a54c29c2 (patch)
tree30684a66b4a648f0d175801aa799056ec18f8758 /source3
parentbce6d410130982af6ca58dc9a0d297b5f80e6c6c (diff)
downloadsamba-05a8202b48291b46befedad345b546d1a54c29c2.tar.gz
samba-05a8202b48291b46befedad345b546d1a54c29c2.tar.bz2
samba-05a8202b48291b46befedad345b546d1a54c29c2.zip
Fixed dce/rpc to use global_machine_sid (auto generated in server.c if
not present in smb.conf). Jeremy. (This used to be commit e7c1100390b714bf2f489a9032156b0c9272e403)
Diffstat (limited to 'source3')
-rw-r--r--source3/lsarpcd/srv_lsa.c14
-rw-r--r--source3/rpc_server/srv_lsa.c14
-rw-r--r--source3/rpc_server/srv_netlog.c5
-rw-r--r--source3/rpc_server/srv_samr.c4
4 files changed, 13 insertions, 24 deletions
diff --git a/source3/lsarpcd/srv_lsa.c b/source3/lsarpcd/srv_lsa.c
index df4b95db9e..930b607770 100644
--- a/source3/lsarpcd/srv_lsa.c
+++ b/source3/lsarpcd/srv_lsa.c
@@ -28,7 +28,7 @@
#include "nterr.h"
extern int DEBUGLEVEL;
-
+extern DOM_SID global_machine_sid;
/***************************************************************************
lsa_reply_open_policy
@@ -306,16 +306,14 @@ static void api_lsa_query_info( int uid, prs_struct *data,
{
LSA_Q_QUERY_INFO q_i;
pstring dom_name;
- DOM_SID dom_sid;
/* grab the info class and policy handle */
lsa_io_q_query("", &q_i, data, 0);
pstrcpy(dom_name, lp_workgroup());
- string_to_sid(&dom_sid, lp_domain_sid());
/* construct reply. return status is always 0x0 */
- lsa_reply_query_info(&q_i, rdata, dom_name, &dom_sid);
+ lsa_reply_query_info(&q_i, rdata, dom_name, &global_machine_sid);
}
/***************************************************************************
@@ -326,7 +324,6 @@ static void api_lsa_lookup_sids( int uid, prs_struct *data,
{
LSA_Q_LOOKUP_SIDS q_l;
pstring dom_name;
- DOM_SID dom_sid;
DOM_SID sid_S_1_1;
DOM_SID sid_S_1_3;
DOM_SID sid_S_1_5;
@@ -336,7 +333,6 @@ static void api_lsa_lookup_sids( int uid, prs_struct *data,
pstrcpy(dom_name, lp_workgroup());
- string_to_sid(&dom_sid , lp_domain_sid());
string_to_sid(&sid_S_1_1, "S-1-1");
string_to_sid(&sid_S_1_3, "S-1-3");
string_to_sid(&sid_S_1_5, "S-1-5");
@@ -344,7 +340,7 @@ static void api_lsa_lookup_sids( int uid, prs_struct *data,
/* construct reply. return status is always 0x0 */
lsa_reply_lookup_sids(rdata,
q_l.sids.num_entries, q_l.sids.sid, /* SIDs */
- dom_name, &dom_sid, /* domain name, domain SID */
+ dom_name, &global_machine_sid, /* domain name, domain SID */
&sid_S_1_1, &sid_S_1_3, &sid_S_1_5); /* the three other SIDs */
}
@@ -357,7 +353,6 @@ static void api_lsa_lookup_names( int uid, prs_struct *data,
int i;
LSA_Q_LOOKUP_RIDS q_l;
pstring dom_name;
- DOM_SID dom_sid;
DOM_SID sid_S_1_1;
DOM_SID sid_S_1_3;
DOM_SID sid_S_1_5;
@@ -369,7 +364,6 @@ static void api_lsa_lookup_names( int uid, prs_struct *data,
pstrcpy(dom_name, lp_workgroup());
- string_to_sid(&dom_sid , lp_domain_sid());
string_to_sid(&sid_S_1_1, "S-1-1");
string_to_sid(&sid_S_1_3, "S-1-3");
string_to_sid(&sid_S_1_5, "S-1-5");
@@ -388,7 +382,7 @@ static void api_lsa_lookup_names( int uid, prs_struct *data,
/* construct reply. return status is always 0x0 */
lsa_reply_lookup_rids(rdata,
q_l.num_entries, dom_rids, /* text-converted SIDs */
- dom_name, &dom_sid, /* domain name, domain SID */
+ dom_name, &global_machine_sid, /* domain name, domain SID */
&sid_S_1_1, &sid_S_1_3, &sid_S_1_5); /* the three other SIDs */
}
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c
index df4b95db9e..930b607770 100644
--- a/source3/rpc_server/srv_lsa.c
+++ b/source3/rpc_server/srv_lsa.c
@@ -28,7 +28,7 @@
#include "nterr.h"
extern int DEBUGLEVEL;
-
+extern DOM_SID global_machine_sid;
/***************************************************************************
lsa_reply_open_policy
@@ -306,16 +306,14 @@ static void api_lsa_query_info( int uid, prs_struct *data,
{
LSA_Q_QUERY_INFO q_i;
pstring dom_name;
- DOM_SID dom_sid;
/* grab the info class and policy handle */
lsa_io_q_query("", &q_i, data, 0);
pstrcpy(dom_name, lp_workgroup());
- string_to_sid(&dom_sid, lp_domain_sid());
/* construct reply. return status is always 0x0 */
- lsa_reply_query_info(&q_i, rdata, dom_name, &dom_sid);
+ lsa_reply_query_info(&q_i, rdata, dom_name, &global_machine_sid);
}
/***************************************************************************
@@ -326,7 +324,6 @@ static void api_lsa_lookup_sids( int uid, prs_struct *data,
{
LSA_Q_LOOKUP_SIDS q_l;
pstring dom_name;
- DOM_SID dom_sid;
DOM_SID sid_S_1_1;
DOM_SID sid_S_1_3;
DOM_SID sid_S_1_5;
@@ -336,7 +333,6 @@ static void api_lsa_lookup_sids( int uid, prs_struct *data,
pstrcpy(dom_name, lp_workgroup());
- string_to_sid(&dom_sid , lp_domain_sid());
string_to_sid(&sid_S_1_1, "S-1-1");
string_to_sid(&sid_S_1_3, "S-1-3");
string_to_sid(&sid_S_1_5, "S-1-5");
@@ -344,7 +340,7 @@ static void api_lsa_lookup_sids( int uid, prs_struct *data,
/* construct reply. return status is always 0x0 */
lsa_reply_lookup_sids(rdata,
q_l.sids.num_entries, q_l.sids.sid, /* SIDs */
- dom_name, &dom_sid, /* domain name, domain SID */
+ dom_name, &global_machine_sid, /* domain name, domain SID */
&sid_S_1_1, &sid_S_1_3, &sid_S_1_5); /* the three other SIDs */
}
@@ -357,7 +353,6 @@ static void api_lsa_lookup_names( int uid, prs_struct *data,
int i;
LSA_Q_LOOKUP_RIDS q_l;
pstring dom_name;
- DOM_SID dom_sid;
DOM_SID sid_S_1_1;
DOM_SID sid_S_1_3;
DOM_SID sid_S_1_5;
@@ -369,7 +364,6 @@ static void api_lsa_lookup_names( int uid, prs_struct *data,
pstrcpy(dom_name, lp_workgroup());
- string_to_sid(&dom_sid , lp_domain_sid());
string_to_sid(&sid_S_1_1, "S-1-1");
string_to_sid(&sid_S_1_3, "S-1-3");
string_to_sid(&sid_S_1_5, "S-1-5");
@@ -388,7 +382,7 @@ static void api_lsa_lookup_names( int uid, prs_struct *data,
/* construct reply. return status is always 0x0 */
lsa_reply_lookup_rids(rdata,
q_l.num_entries, dom_rids, /* text-converted SIDs */
- dom_name, &dom_sid, /* domain name, domain SID */
+ dom_name, &global_machine_sid, /* domain name, domain SID */
&sid_S_1_1, &sid_S_1_3, &sid_S_1_5); /* the three other SIDs */
}
diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c
index edc2d859df..23625b96ef 100644
--- a/source3/rpc_server/srv_netlog.c
+++ b/source3/rpc_server/srv_netlog.c
@@ -32,6 +32,7 @@ extern int DEBUGLEVEL;
extern BOOL sam_logon_in_ssb;
extern pstring samlogon_user;
extern pstring global_myname;
+extern DOM_SID global_machine_sid;
/*************************************************************************
make_net_r_req_chal:
@@ -680,7 +681,6 @@ static void api_net_sam_logon( int uid,
pstring my_name;
pstring my_workgroup;
pstring domain_groups;
- DOM_SID dom_sid;
char *other_sids;
uint32 r_uid;
uint32 r_gid;
@@ -697,7 +697,6 @@ static void api_net_sam_logon( int uid,
pstrcpy(logon_script, lp_logon_script());
pstrcpy(profile_path, lp_logon_path());
- string_to_sid(&dom_sid, lp_domain_sid());
pstrcpy(other_sids, lp_domain_other_sids());
pstrcpy(my_workgroup, lp_workgroup());
@@ -757,7 +756,7 @@ static void api_net_sam_logon( int uid,
my_name , /* char *logon_srv */
my_workgroup, /* char *logon_dom */
- &dom_sid, /* DOM_SID *dom_sid */
+ &global_machine_sid, /* DOM_SID *dom_sid */
other_sids); /* char *other_sids */
}
else
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index 8070336f87..88217f73aa 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -30,6 +30,8 @@ extern int DEBUGLEVEL;
extern BOOL sam_logon_in_ssb;
extern pstring samlogon_user;
+extern DOM_SID global_machine_sid;
+
extern rid_name domain_group_rids[];
extern rid_name domain_alias_rids[];
@@ -231,7 +233,7 @@ static void samr_reply_unknown_3(SAMR_Q_UNKNOWN_3 *q_u,
if (status == 0x0)
{
- fstrcpy(user_sid, lp_domain_sid());
+ sid_to_string(user_sid, &global_machine_sid);
slprintf(user_rid, sizeof(user_rid) - 1, "-%x", rid);
fstrcat(user_sid, user_rid);