diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-07 02:37:13 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:48:41 +0100 |
commit | 6c77f353d3d952b46b401ab29837ba5b75e353c2 (patch) | |
tree | c78d6030280662a3a96b5a94c677f76fa47d2ed4 /source4/rpc_server | |
parent | 4c4323009fa83f00ed319de59a3aad48fcd65994 (diff) | |
download | samba-6c77f353d3d952b46b401ab29837ba5b75e353c2.tar.gz samba-6c77f353d3d952b46b401ab29837ba5b75e353c2.tar.bz2 samba-6c77f353d3d952b46b401ab29837ba5b75e353c2.zip |
r26328: remove more uses of global_loadparm.
(This used to be commit 40ae12c08647c47a9c504d39ee6f61c32b4e5748)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 9 | ||||
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.h | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index db659ef5a3..03f3601257 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -445,6 +445,7 @@ static NTSTATUS dcesrv_samr_OpenDomain(struct dcesrv_call_state *dce_call, TALLO return NT_STATUS_NO_MEMORY; } + d_state->role = lp_server_role(dce_call->conn->dce_ctx->lp_ctx); d_state->connect_state = talloc_reference(d_state, c_state); d_state->sam_ctx = c_state->sam_ctx; d_state->domain_sid = dom_sid_dup(d_state, r->in.sid); @@ -499,8 +500,6 @@ static NTSTATUS dcesrv_samr_info_DomInfo2(struct samr_domain_state *state, struct ldb_message **dom_msgs, struct samr_DomInfo2 *info) { - enum server_role role = lp_server_role(global_loadparm); - /* This pulls the NetBIOS name from the cn=NTDS Settings,cn=<NETBIOS name of PDC>,.... string */ @@ -514,7 +513,7 @@ static NTSTATUS dcesrv_samr_info_DomInfo2(struct samr_domain_state *state, info->sequence_num = ldb_msg_find_attr_as_uint64(dom_msgs[0], "modifiedCount", 0); - switch (role) { + switch (state->role) { case ROLE_DOMAIN_CONTROLLER: /* This pulls the NetBIOS name from the cn=NTDS Settings,cn=<NETBIOS name of PDC>,.... @@ -612,9 +611,7 @@ static NTSTATUS dcesrv_samr_info_DomInfo7(struct samr_domain_state *state, struct samr_DomInfo7 *info) { - enum server_role role = lp_server_role(global_loadparm); - - switch (role) { + switch (state->role) { case ROLE_DOMAIN_CONTROLLER: /* This pulls the NetBIOS name from the cn=NTDS Settings,cn=<NETBIOS name of PDC>,.... diff --git a/source4/rpc_server/samr/dcesrv_samr.h b/source4/rpc_server/samr/dcesrv_samr.h index bc701fb932..7a6978344b 100644 --- a/source4/rpc_server/samr/dcesrv_samr.h +++ b/source4/rpc_server/samr/dcesrv_samr.h @@ -19,6 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "param/param.h" + /* this type allows us to distinguish handle types */ @@ -49,6 +51,7 @@ struct samr_domain_state { struct dom_sid *domain_sid; const char *domain_name; struct ldb_dn *domain_dn; + enum server_role role; }; /* |