dsdb: don't allow a missing nTSecurityDescriptor in dsdb_get_sd_from_ldb_message()
[Samba/id10ts.git] / source4 / dsdb / kcc / kcc_service.h
blobb3ba226e7261cb7c030b6f547402d944e2870aa0
1 /*
2 Unix SMB/CIFS mplementation.
4 KCC service
6 Copyright (C) Andrew Tridgell 2009
7 based on drepl service code
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/>.
24 #ifndef _DSDB_REPL_KCC_SERVICE_H_
25 #define _DSDB_REPL_KCC_SERVICE_H_
27 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
29 struct kccsrv_partition {
30 struct kccsrv_partition *prev, *next;
31 struct kccsrv_service *service;
33 /* the dn of the partition */
34 struct ldb_dn *dn;
38 struct kccsrv_service {
39 /* the whole kcc service is in one task */
40 struct task_server *task;
42 /* the time the service was started */
43 struct timeval startup_time;
45 /* dn of our configuration partition */
46 struct ldb_dn *config_dn;
48 /*
49 * system session info
50 * with machine account credentials
52 struct auth_session_info *system_session_info;
54 /* list of local partitions */
55 struct kccsrv_partition *partitions;
58 * a connection to the local samdb
60 struct ldb_context *samdb;
62 /* the guid of our NTDS Settings object, which never changes! */
63 struct GUID ntds_guid;
65 /* some stuff for periodic processing */
66 struct {
68 * the interval between to periodic runs
70 uint32_t interval;
73 * the timestamp for the next event,
74 * this is the timstamp passed to event_add_timed()
76 struct timeval next_event;
78 /* here we have a reference to the timed event the schedules the periodic stuff */
79 struct tevent_timer *te;
81 /* samba_runcmd_send service for samba_kcc */
82 struct tevent_req *subreq;
84 /* return status of samba_kcc */
85 NTSTATUS status;
87 } periodic;
89 time_t last_deleted_check;
91 time_t last_full_scan_deleted_check;
93 bool am_rodc;
95 /* run new samba_kcc topology generator code */
96 bool samba_kcc_code;
99 struct kcc_connection_list;
101 #include "dsdb/kcc/kcc_service_proto.h"
103 #endif /* _DSDB_REPL_KCC_SERVICE_H_ */