]> git.ipfire.org Git - thirdparty/sarg.git/blob - documentation/getconf.txt
Protect the reading of the configuration file against buffer overflows.
[thirdparty/sarg.git] / documentation / getconf.txt
1 /*! \file getconf.c
2 \brief Configure sarg.
3 */
4
5
6 /*! \fn static int getparam_string(const char *param,char *buf,char *value,int value_size)
7 Extract a string value from a line if it it the right parameter.
8
9 \param param The name of the parameter to find.
10 \param buf The string read from the input file.
11 \param value The buffer to store the value.
12 \param value_size The size of the output buffer.
13
14 \retval 1 Parameter match.
15 \retval 0 The line is not for that parameter.
16 */
17
18
19
20
21
22 /*! \fn static int getparam_quoted(const char *param,char *buf,char *value,int value_size)
23 Extract a quoted string value from a line if it it the right parameter.
24
25 \param param The name of the parameter to find.
26 \param buf The string read from the input file.
27 \param value The buffer to store the value.
28 \param value_size The size of the output buffer.
29
30 \retval 1 Parameter match.
31 \retval 0 The line is not for that parameter.
32 */
33
34
35
36
37
38 /*! \fn static int getparam_int(const char *param,char *buf,int *value)
39 Extract an integer value from a line if it it the right parameter.
40
41 \param param The name of the parameter to find.
42 \param buf The string read from the input file.
43 \param value The variable to store the value.
44
45 \retval 1 Parameter match.
46 \retval 0 The line is not for that parameter.
47 */
48
49
50
51
52
53 /*! \fn static void parmtest(char *buf)
54 Find what parameter is passed in the input buffer and store the value in memory.
55
56 \param buf One line of text from the configuration file.
57 */
58
59
60
61
62
63 /*! \fn void getconf(void)
64 Read the configuration file whose name is in ::ConfigFile.
65 */
66