Created net gpo and new libgpo for samba 4. This adds the init function which finds...
[Samba.git] / source4 / libgpo / gpo.h
blob808718ea49206be74a30883f1739e445bbf5c3ed
1 /*
2 * Unix SMB/CIFS implementation.
3 * Group Policy Object Support
4 * Copyright (C) Guenther Deschner 2005-2008 (from samba 3 gpo.h)
5 * Copyright (C) Wilco Baan Hofman 2010
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef __GPO_H__
22 #define __GPO_H__
25 /* GPO_OPTIONS */
26 #define GPO_FLAG_DISABLE 0x00000001
27 #define GPO_FLAG_FORCE 0x00000002
29 struct gp_context {
30 struct ldb_context *ldb_ctx;
31 struct loadparm_context *lp_ctx;
32 struct cli_credentials *credentials;
33 struct tevent_context *ev_ctx;
36 struct gp_object {
37 uint32_t version;
38 uint32_t flags;
39 const char *display_name;
40 const char *name;
41 const char *dn;
42 const char *file_sys_path;
43 struct security_descriptor *security_descriptor;
46 NTSTATUS gp_fetch_gpo(TALLOC_CTX *mem_ctx, struct ldb_context *ldb);
47 NTSTATUS gp_apply_gpo(TALLOC_CTX *mem_ctx, struct ldb_context *ldb);
48 NTSTATUS gp_check_refresh_gpo(TALLOC_CTX *mem_ctx, struct ldb_context *ldb);
50 NTSTATUS gp_init(TALLOC_CTX *mem_ctx,
51 struct loadparm_context *lp_ctx,
52 struct cli_credentials *creds,
53 struct tevent_context *ev_ctx,
54 struct gp_context **gp_ctx);
55 NTSTATUS gp_list_all_gpos(struct gp_context *gp_ctx, struct gp_object ***ret);
56 #endif