]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/idmapd/cfg.h
Use 65534 for anon uid/gid rather than -2
[nfs-utils.git] / utils / idmapd / cfg.h
1 /* $OpenBSD: conf.h,v 1.30 2004/06/25 20:25:34 hshoexer Exp $    */
2 /* $EOM: conf.h,v 1.13 2000/09/18 00:01:47 ho Exp $      */
3
4 /*
5  * Copyright (c) 1998, 1999, 2001 Niklas Hallqvist.  All rights reserved.
6  * Copyright (c) 2000, 2003 HÃ¥kan Olsson.  All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28
29 /*
30  * This code was written under funding by Ericsson Radio Systems.
31  */
32
33 #ifndef _CONF_H_
34 #define _CONF_H_
35
36 #include "queue.h"
37
38 struct conf_list_node {
39         TAILQ_ENTRY(conf_list_node) link;
40         char    *field;
41 };
42
43 struct conf_list {
44         size_t  cnt;
45         TAILQ_HEAD(conf_list_fields_head, conf_list_node) fields;
46 };
47
48 extern char    *conf_path;
49
50 extern int      conf_begin(void);
51 extern int      conf_decode_base64(u_int8_t *, u_int32_t *, u_char *);
52 extern int      conf_end(int, int);
53 extern void     conf_free_list(struct conf_list *);
54 extern struct sockaddr *conf_get_address(char *, char *);
55 extern struct conf_list *conf_get_list(char *, char *);
56 extern struct conf_list *conf_get_tag_list(char *);
57 extern int      conf_get_num(char *, char *, int);
58 extern char    *conf_get_str(char *, char *);
59 extern void     conf_init(void);
60 extern int      conf_match_num(char *, char *, int);
61 extern void     conf_reinit(void);
62 extern int      conf_remove(int, char *, char *);
63 extern int      conf_remove_section(int, char *);
64 extern int      conf_set(int, char *, char *, char *, int, int);
65 extern void     conf_report(void);
66
67 #endif                          /* _CONF_H_ */