r18984: Removing ads_gpo_get_sysvol_gpt_version() which was just doing stupid
[kai/samba.git] / source3 / libgpo / gpo_parse.c
1 /* 
2  *  Unix SMB/CIFS implementation.
3  *  Group Policy Object Support
4  *  Copyright (C) Guenther Deschner 2005
5  *  
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *  
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *  
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  */
20
21 #include "includes.h"
22
23 #ifdef HAVE_LDAP
24
25 #define GPT_INI_SECTION_GENERAL "General"
26 #define GPT_INI_PARAMETER_VERSION "Version"
27 #define GPT_INI_PARAMETER_DISPLAYNAME "displayName"
28
29 struct gpt_ini {
30         uint32 version;
31         const char *display_name;
32 };
33
34 static uint32 version;
35
36 static BOOL do_section(const char *section)
37 {
38         DEBUG(10,("do_section: %s\n", section));
39
40         return True;
41 }
42
43 static BOOL do_parameter(const char *parameter, const char *value)
44 {
45         DEBUG(10,("do_parameter: %s, %s\n", parameter, value));
46         
47         if (strequal(parameter, GPT_INI_PARAMETER_VERSION)) {
48                 version = atoi(value);
49         }
50         return True;
51 }
52
53 /*
54
55 perfectly parseable with pm_process() :))
56
57 [Unicode]
58 Unicode=yes
59 [System Access]
60 MinimumPasswordAge = 1
61 MaximumPasswordAge = 42
62 MinimumPasswordLength = 7
63 PasswordComplexity = 1
64 PasswordHistorySize = 24
65 LockoutBadCount = 0
66 RequireLogonToChangePassword = 0
67 ForceLogoffWhenHourExpire = 0
68 ClearTextPassword = 0
69 [Kerberos Policy]
70 MaxTicketAge = 10
71 MaxRenewAge = 7
72 MaxServiceAge = 600
73 MaxClockSkew = 5
74 TicketValidateClient = 1
75 [Version]
76 signature="$CHICAGO$"
77 Revision=1
78 */
79
80 #endif /* HAVE_LDAP */