summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_samr_nt.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-12 23:15:52 +0000
committerJeremy Allison <jra@samba.org>2002-11-12 23:15:52 +0000
commit250c9801197ea1c949bd94c1c891f81ab118b130 (patch)
tree3a0ec79c71a010961d78726e223a70e1bc75c73f /source3/rpc_server/srv_samr_nt.c
parent477025a6f628fd1a8d3bfacd30726e7a41819e50 (diff)
downloadsamba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.gz
samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.bz2
samba-250c9801197ea1c949bd94c1c891f81ab118b130.zip
Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
Diffstat (limited to 'source3/rpc_server/srv_samr_nt.c')
-rw-r--r--source3/rpc_server/srv_samr_nt.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 66556e3acb..ba5e9b70d3 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -34,8 +34,6 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
-extern fstring global_myworkgroup;
-extern pstring global_myname;
extern DOM_SID global_sid_Builtin;
extern rid_name domain_group_rids[];
@@ -2135,7 +2133,7 @@ NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SA
free_samr_db(info);
/* The time call below is to get a sequence number for the sam. FIXME !!! JRA. */
- init_unk_info2(&ctr->info.inf2, global_myworkgroup, global_myname, (uint32) time(NULL),
+ init_unk_info2(&ctr->info.inf2, lp_workgroup(), global_myname(), (uint32) time(NULL),
num_users, num_groups, num_aliases);
break;
case 0x03:
@@ -2145,7 +2143,7 @@ NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SA
init_unk_info3(&ctr->info.inf3, nt_logout);
break;
case 0x05:
- init_unk_info5(&ctr->info.inf5, global_myname);
+ init_unk_info5(&ctr->info.inf5, global_myname());
break;
case 0x06:
init_unk_info6(&ctr->info.inf6);
@@ -2576,7 +2574,7 @@ NTSTATUS _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_EN
struct samr_info *info;
uint32 num_entries = 2;
fstring dom[2];
- char *name;
+ const char *name;
r_u->status = NT_STATUS_OK;
@@ -2590,10 +2588,10 @@ NTSTATUS _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_EN
switch (lp_server_role()) {
case ROLE_DOMAIN_PDC:
case ROLE_DOMAIN_BDC:
- name = global_myworkgroup;
+ name = lp_workgroup();
break;
default:
- name = global_myname;
+ name = global_myname();
}
fstrcpy(dom[0],name);
@@ -4325,7 +4323,7 @@ NTSTATUS _samr_unknown_2e(pipes_struct *p, SAMR_Q_UNKNOWN_2E *q_u, SAMR_R_UNKNOW
free_samr_db(info);
/* The time call below is to get a sequence number for the sam. FIXME !!! JRA. */
- init_unk_info2(&ctr->info.inf2, global_myworkgroup, global_myname, (uint32) time(NULL),
+ init_unk_info2(&ctr->info.inf2, lp_workgroup(), global_myname(), (uint32) time(NULL),
num_users, num_groups, num_aliases);
break;
case 0x03:
@@ -4337,7 +4335,7 @@ NTSTATUS _samr_unknown_2e(pipes_struct *p, SAMR_Q_UNKNOWN_2E *q_u, SAMR_R_UNKNOW
init_unk_info3(&ctr->info.inf3, nt_logout);
break;
case 0x05:
- init_unk_info5(&ctr->info.inf5, global_myname);
+ init_unk_info5(&ctr->info.inf5, global_myname());
break;
case 0x06:
init_unk_info6(&ctr->info.inf6);