1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/*
SSSD
sss_ini.c
Authors:
Ondrej Kos <okos@redhat.com>
Copyright (C) 2013 Red Hat
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
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SSS_INI_H__
#define __SSS_INI_H__
/* Structure declarations */
/* INI data structure */
struct sss_ini_initdata;
/* Function declarations */
/* Initialize data structure */
struct sss_ini_initdata* sss_ini_initdata_init(TALLOC_CTX *tmp_ctx);
/* Close file descriptor */
void sss_ini_close_file(struct sss_ini_initdata *init_data);
/* Open config file */
int sss_ini_config_file_open(struct sss_ini_initdata *init_data,
const char *config_file);
/* Check file permissions */
int sss_ini_config_access_check(struct sss_ini_initdata *init_data);
/* Cstat */
int sss_ini_get_stat(struct sss_ini_initdata *init_data);
/* Get mtime */
int sss_ini_get_mtime(struct sss_ini_initdata *init_data,
size_t timestr_len,
char *timestr);
/* Load configuration */
int sss_ini_get_config(struct sss_ini_initdata *init_data,
const char *config_file);
/* Get configuration object */
int sss_ini_get_cfgobj(struct sss_ini_initdata *init_data,
const char *section, const char *name);
/* Check configuration object */
int sss_ini_check_config_obj(struct sss_ini_initdata *init_data);
/* Get int value */
int sss_ini_get_int_config_value(struct sss_ini_initdata *init_data,
int strict, int def, int *error);
/* Destroy ini config */
void sss_ini_config_destroy(struct sss_ini_initdata *init_data);
/* Create LDIF */
int sss_confdb_create_ldif(TALLOC_CTX *mem_ctx,
struct sss_ini_initdata *init_data,
const char **config_ldif);
#endif /* __SSS_INI_H__ */
|