1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s4:rpc_server: Remove trailing white spaces from lsa_init.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andreas Schneider 2023-08-30 09:24:06 +02:00 committed by Andreas Schneider
parent 028c90547e
commit 80ba5456d8

View File

@ -1,21 +1,21 @@
/* /*
Unix SMB/CIFS implementation. Unix SMB/CIFS implementation.
endpoint server for the lsarpc pipe endpoint server for the lsarpc pipe
Copyright (C) Andrew Tridgell 2004 Copyright (C) Andrew Tridgell 2004
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2004-2007 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2004-2007
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or the Free Software Foundation; either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
@ -57,8 +57,8 @@ NTSTATUS dcesrv_lsa_get_policy_state(struct dcesrv_call_state *dce_call,
struct lsa_policy_state *state; struct lsa_policy_state *state;
struct ldb_result *dom_res; struct ldb_result *dom_res;
const char *dom_attrs[] = { const char *dom_attrs[] = {
"objectSid", "objectSid",
"objectGUID", "objectGUID",
"nTMixedDomain", "nTMixedDomain",
"fSMORoleOwner", "fSMORoleOwner",
NULL NULL
@ -87,14 +87,14 @@ NTSTATUS dcesrv_lsa_get_policy_state(struct dcesrv_call_state *dce_call,
fetching here */ fetching here */
state->domain_dn = ldb_get_default_basedn(state->sam_ldb); state->domain_dn = ldb_get_default_basedn(state->sam_ldb);
if (!state->domain_dn) { if (!state->domain_dn) {
return NT_STATUS_NO_MEMORY; return NT_STATUS_NO_MEMORY;
} }
/* work out the forest root_dn - useful for so many calls its worth /* work out the forest root_dn - useful for so many calls its worth
fetching here */ fetching here */
state->forest_dn = ldb_get_root_basedn(state->sam_ldb); state->forest_dn = ldb_get_root_basedn(state->sam_ldb);
if (!state->forest_dn) { if (!state->forest_dn) {
return NT_STATUS_NO_MEMORY; return NT_STATUS_NO_MEMORY;
} }
ret = ldb_search(state->sam_ldb, mem_ctx, &dom_res, ret = ldb_search(state->sam_ldb, mem_ctx, &dom_res,
@ -103,25 +103,25 @@ NTSTATUS dcesrv_lsa_get_policy_state(struct dcesrv_call_state *dce_call,
return NT_STATUS_INVALID_SYSTEM_SERVICE; return NT_STATUS_INVALID_SYSTEM_SERVICE;
} }
if (dom_res->count != 1) { if (dom_res->count != 1) {
return NT_STATUS_NO_SUCH_DOMAIN; return NT_STATUS_NO_SUCH_DOMAIN;
} }
state->domain_sid = samdb_result_dom_sid(state, dom_res->msgs[0], "objectSid"); state->domain_sid = samdb_result_dom_sid(state, dom_res->msgs[0], "objectSid");
if (!state->domain_sid) { if (!state->domain_sid) {
return NT_STATUS_NO_SUCH_DOMAIN; return NT_STATUS_NO_SUCH_DOMAIN;
} }
state->domain_guid = samdb_result_guid(dom_res->msgs[0], "objectGUID"); state->domain_guid = samdb_result_guid(dom_res->msgs[0], "objectGUID");
state->mixed_domain = ldb_msg_find_attr_as_uint(dom_res->msgs[0], "nTMixedDomain", 0); state->mixed_domain = ldb_msg_find_attr_as_uint(dom_res->msgs[0], "nTMixedDomain", 0);
talloc_free(dom_res); talloc_free(dom_res);
state->domain_name = lpcfg_sam_name(dce_call->conn->dce_ctx->lp_ctx); state->domain_name = lpcfg_sam_name(dce_call->conn->dce_ctx->lp_ctx);
state->domain_dns = ldb_dn_canonical_string(state, state->domain_dn); state->domain_dns = ldb_dn_canonical_string(state, state->domain_dn);
if (!state->domain_dns) { if (!state->domain_dns) {
return NT_STATUS_NO_SUCH_DOMAIN; return NT_STATUS_NO_SUCH_DOMAIN;
} }
p = strchr(state->domain_dns, '/'); p = strchr(state->domain_dns, '/');
if (p) { if (p) {
@ -130,7 +130,7 @@ NTSTATUS dcesrv_lsa_get_policy_state(struct dcesrv_call_state *dce_call,
state->forest_dns = ldb_dn_canonical_string(state, state->forest_dn); state->forest_dns = ldb_dn_canonical_string(state, state->forest_dn);
if (!state->forest_dns) { if (!state->forest_dns) {
return NT_STATUS_NO_SUCH_DOMAIN; return NT_STATUS_NO_SUCH_DOMAIN;
} }
p = strchr(state->forest_dns, '/'); p = strchr(state->forest_dns, '/');
if (p) { if (p) {
@ -141,7 +141,7 @@ NTSTATUS dcesrv_lsa_get_policy_state(struct dcesrv_call_state *dce_call,
fetching here */ fetching here */
state->builtin_dn = samdb_search_dn(state->sam_ldb, state, state->domain_dn, "(objectClass=builtinDomain)"); state->builtin_dn = samdb_search_dn(state->sam_ldb, state, state->domain_dn, "(objectClass=builtinDomain)");
if (!state->builtin_dn) { if (!state->builtin_dn) {
return NT_STATUS_NO_SUCH_DOMAIN; return NT_STATUS_NO_SUCH_DOMAIN;
} }
/* work out the system_dn - useful for so many calls its worth /* work out the system_dn - useful for so many calls its worth
@ -153,22 +153,22 @@ NTSTATUS dcesrv_lsa_get_policy_state(struct dcesrv_call_state *dce_call,
state->builtin_sid = dom_sid_parse_talloc(state, SID_BUILTIN); state->builtin_sid = dom_sid_parse_talloc(state, SID_BUILTIN);
if (!state->builtin_sid) { if (!state->builtin_sid) {
return NT_STATUS_NO_SUCH_DOMAIN; return NT_STATUS_NO_SUCH_DOMAIN;
} }
state->nt_authority_sid = dom_sid_parse_talloc(state, SID_NT_AUTHORITY); state->nt_authority_sid = dom_sid_parse_talloc(state, SID_NT_AUTHORITY);
if (!state->nt_authority_sid) { if (!state->nt_authority_sid) {
return NT_STATUS_NO_SUCH_DOMAIN; return NT_STATUS_NO_SUCH_DOMAIN;
} }
state->creator_owner_domain_sid = dom_sid_parse_talloc(state, SID_CREATOR_OWNER_DOMAIN); state->creator_owner_domain_sid = dom_sid_parse_talloc(state, SID_CREATOR_OWNER_DOMAIN);
if (!state->creator_owner_domain_sid) { if (!state->creator_owner_domain_sid) {
return NT_STATUS_NO_SUCH_DOMAIN; return NT_STATUS_NO_SUCH_DOMAIN;
} }
state->world_domain_sid = dom_sid_parse_talloc(state, SID_WORLD_DOMAIN); state->world_domain_sid = dom_sid_parse_talloc(state, SID_WORLD_DOMAIN);
if (!state->world_domain_sid) { if (!state->world_domain_sid) {
return NT_STATUS_NO_SUCH_DOMAIN; return NT_STATUS_NO_SUCH_DOMAIN;
} }
state->sd = sddl_decode(state, DCESRV_LSA_POLICY_SD_SDDL, state->sd = sddl_decode(state, DCESRV_LSA_POLICY_SD_SDDL,
@ -219,7 +219,7 @@ NTSTATUS dcesrv_lsa_get_policy_state(struct dcesrv_call_state *dce_call,
return NT_STATUS_OK; return NT_STATUS_OK;
} }
/* /*
lsa_OpenPolicy2 lsa_OpenPolicy2
*/ */
NTSTATUS dcesrv_lsa_OpenPolicy2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, NTSTATUS dcesrv_lsa_OpenPolicy2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
@ -267,7 +267,7 @@ NTSTATUS dcesrv_lsa_OpenPolicy2(struct dcesrv_call_state *dce_call, TALLOC_CTX *
return NT_STATUS_OK; return NT_STATUS_OK;
} }
/* /*
lsa_OpenPolicy lsa_OpenPolicy
a wrapper around lsa_OpenPolicy2 a wrapper around lsa_OpenPolicy2
*/ */