Revert "s4:remove "util_ldb" submodule and integrate the three gendb_* calls in ...
[Samba.git] / source4 / rpc_server / lsa / lsa.h
blob53fe1026303c34c885248072e243f8cdb1977330
1 /*
2 Unix SMB/CIFS implementation.
4 endpoint server for the lsarpc pipe
6 Copyright (C) Andrew Tridgell 2004
7 Copyright (C) Andrew Bartlett <abartlet@samba.org> 2004-2005
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "includes.h"
24 #include "rpc_server/dcerpc_server.h"
25 #include "rpc_server/common/common.h"
26 #include "auth/auth.h"
27 #include "dsdb/samdb/samdb.h"
28 #include "libcli/ldap/ldap_ndr.h"
29 #include "lib/ldb/include/ldb_errors.h"
30 #include "libcli/security/security.h"
31 #include "libcli/auth/libcli_auth.h"
32 #include "param/secrets.h"
33 #include "../lib/util/util_ldb.h"
34 #include "librpc/gen_ndr/ndr_dssetup.h"
35 #include "param/param.h"
38 state associated with a lsa_OpenPolicy() operation
40 struct lsa_policy_state {
41 struct dcesrv_handle *handle;
42 struct ldb_context *sam_ldb;
43 struct ldb_context *pdb;
44 uint32_t access_mask;
45 struct ldb_dn *domain_dn;
46 struct ldb_dn *forest_dn;
47 struct ldb_dn *builtin_dn;
48 struct ldb_dn *system_dn;
49 const char *domain_name;
50 const char *domain_dns;
51 const char *forest_dns;
52 struct dom_sid *domain_sid;
53 struct GUID domain_guid;
54 struct dom_sid *builtin_sid;
55 struct dom_sid *nt_authority_sid;
56 struct dom_sid *creator_owner_domain_sid;
57 struct dom_sid *world_domain_sid;
58 int mixed_domain;
61 enum lsa_handle {
62 LSA_HANDLE_POLICY,
63 LSA_HANDLE_ACCOUNT,
64 LSA_HANDLE_SECRET,
65 LSA_HANDLE_TRUSTED_DOMAIN
68 #include "rpc_server/lsa/proto.h"