summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-10-06 17:50:15 +0200
committerGünther Deschner <gd@samba.org>2009-10-07 10:36:22 +0200
commit3d3134a7d6a4d49b891a446f6cc7b38fd953739a (patch)
tree1c71bdc8707e30ef36f62e3d83a53a83a766dd4a /source3
parentfea2a78beb1cb4a00f44a4b191f96602cdaa81b9 (diff)
downloadsamba-3d3134a7d6a4d49b891a446f6cc7b38fd953739a.tar.gz
samba-3d3134a7d6a4d49b891a446f6cc7b38fd953739a.tar.bz2
samba-3d3134a7d6a4d49b891a446f6cc7b38fd953739a.zip
s3-netlogon: pure cosmetic indent fixes in _netr_LogonControl2Ex().
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_netlog_nt.c140
1 files changed, 71 insertions, 69 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 2aee00581b..fd90bf82c7 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -116,103 +116,105 @@ WERROR _netr_LogonControl2Ex(pipes_struct *p,
const char *fn;
switch (p->hdr_req.opnum) {
- case NDR_NETR_LOGONCONTROL:
- fn = "_netr_LogonControl";
- break;
- case NDR_NETR_LOGONCONTROL2:
- fn = "_netr_LogonControl2";
- break;
- case NDR_NETR_LOGONCONTROL2EX:
- fn = "_netr_LogonControl2Ex";
- break;
- default:
- return WERR_INVALID_PARAM;
+ case NDR_NETR_LOGONCONTROL:
+ fn = "_netr_LogonControl";
+ break;
+ case NDR_NETR_LOGONCONTROL2:
+ fn = "_netr_LogonControl2";
+ break;
+ case NDR_NETR_LOGONCONTROL2EX:
+ fn = "_netr_LogonControl2Ex";
+ break;
+ default:
+ return WERR_INVALID_PARAM;
}
tc_status = WERR_NO_SUCH_DOMAIN;
switch (r->in.function_code) {
- case NETLOGON_CONTROL_TC_QUERY:
- domain = r->in.data->domain;
+ case NETLOGON_CONTROL_TC_QUERY:
+ domain = r->in.data->domain;
- if ( !is_trusted_domain( domain ) )
- break;
+ if (!is_trusted_domain(domain)) {
+ break;
+ }
- if ( !get_dc_name( domain, NULL, dc_name2, &dc_ss ) ) {
- tc_status = WERR_NO_LOGON_SERVERS;
- break;
- }
+ if (!get_dc_name(domain, NULL, dc_name2, &dc_ss)) {
+ tc_status = WERR_NO_LOGON_SERVERS;
+ break;
+ }
- dc_name = talloc_asprintf(p->mem_ctx, "\\\\%s", dc_name2);
- if (!dc_name) {
- return WERR_NOMEM;
- }
+ dc_name = talloc_asprintf(p->mem_ctx, "\\\\%s", dc_name2);
+ if (!dc_name) {
+ return WERR_NOMEM;
+ }
- tc_status = WERR_OK;
+ tc_status = WERR_OK;
- break;
+ break;
- case NETLOGON_CONTROL_REDISCOVER:
- domain = r->in.data->domain;
+ case NETLOGON_CONTROL_REDISCOVER:
+ domain = r->in.data->domain;
- if ( !is_trusted_domain( domain ) )
- break;
+ if (!is_trusted_domain(domain)) {
+ break;
+ }
- if ( !get_dc_name( domain, NULL, dc_name2, &dc_ss ) ) {
- tc_status = WERR_NO_LOGON_SERVERS;
- break;
- }
+ if (!get_dc_name(domain, NULL, dc_name2, &dc_ss)) {
+ tc_status = WERR_NO_LOGON_SERVERS;
+ break;
+ }
- dc_name = talloc_asprintf(p->mem_ctx, "\\\\%s", dc_name2);
- if (!dc_name) {
- return WERR_NOMEM;
- }
+ dc_name = talloc_asprintf(p->mem_ctx, "\\\\%s", dc_name2);
+ if (!dc_name) {
+ return WERR_NOMEM;
+ }
- tc_status = WERR_OK;
+ tc_status = WERR_OK;
- break;
+ break;
- default:
- /* no idea what this should be */
- DEBUG(0,("%s: unimplemented function level [%d]\n",
- fn, r->in.function_code));
- return WERR_UNKNOWN_LEVEL;
+ default:
+ /* no idea what this should be */
+ DEBUG(0,("%s: unimplemented function level [%d]\n",
+ fn, r->in.function_code));
+ return WERR_UNKNOWN_LEVEL;
}
/* prepare the response */
switch (r->in.level) {
- case 1:
- info1 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_1);
- W_ERROR_HAVE_NO_MEMORY(info1);
+ case 1:
+ info1 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_1);
+ W_ERROR_HAVE_NO_MEMORY(info1);
- info1->flags = flags;
- info1->pdc_connection_status = pdc_connection_status;
+ info1->flags = flags;
+ info1->pdc_connection_status = pdc_connection_status;
- r->out.query->info1 = info1;
- break;
- case 2:
- info2 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_2);
- W_ERROR_HAVE_NO_MEMORY(info2);
+ r->out.query->info1 = info1;
+ break;
+ case 2:
+ info2 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_2);
+ W_ERROR_HAVE_NO_MEMORY(info2);
- info2->flags = flags;
- info2->pdc_connection_status = pdc_connection_status;
- info2->trusted_dc_name = dc_name;
- info2->tc_connection_status = tc_status;
+ info2->flags = flags;
+ info2->pdc_connection_status = pdc_connection_status;
+ info2->trusted_dc_name = dc_name;
+ info2->tc_connection_status = tc_status;
- r->out.query->info2 = info2;
- break;
- case 3:
- info3 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_3);
- W_ERROR_HAVE_NO_MEMORY(info3);
+ r->out.query->info2 = info2;
+ break;
+ case 3:
+ info3 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_3);
+ W_ERROR_HAVE_NO_MEMORY(info3);
- info3->flags = flags;
- info3->logon_attempts = logon_attempts;
+ info3->flags = flags;
+ info3->logon_attempts = logon_attempts;
- r->out.query->info3 = info3;
- break;
- default:
- return WERR_UNKNOWN_LEVEL;
+ r->out.query->info3 = info3;
+ break;
+ default:
+ return WERR_UNKNOWN_LEVEL;
}
if (lp_server_role() == ROLE_DOMAIN_BDC) {