Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
radsecproxy
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
0
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security
Insights
Files
1c60433
packaging
tests
tools
.gitignore
AUTHORS
ChangeLog
INSTALL
LICENSE
Makefile.am
NEWS
README
THANKS
acinclude.m4
aclocal.m4
autogen.sh
catgconf.c
compile
config.guess
config.sub
configure.ac
debug.c
debug.h
depcomp
develdoc.txt
dtls.c
dtls.h
dynsrv.sh
fticks.c
fticks.h
fticks_hashmac.c
fticks_hashmac.h
gconfig.c
gconfig.h
gconfig.txt
hash.c
hash.h
hostport.c
hostport.h
install-sh
list.c
list.h
main.c
missing
radmsg.c
radmsg.h
radsecproxy-hash.1
radsecproxy-hash.c
radsecproxy.1
radsecproxy.c
radsecproxy.conf-example
radsecproxy.conf.5.xml
radsecproxy.h
tcp.c
tcp.h
tls.c
tls.h
tlscommon.c
tlscommon.h
tlv11.c
tlv11.h
udp.c
udp.h
util.c
util.h
Breadcrumbs
radsecproxy
/
catgconf.c
Blame
Blame
Latest commit
History
History
81 lines (69 loc) · 1.75 KB
Breadcrumbs
radsecproxy
/
catgconf.c
Top
File metadata and controls
Code
Blame
81 lines (69 loc) · 1.75 KB
Raw
/* Copyright (c) 2006-2010, UNINETT AS. * Copyright (c) 2010-2013, NORDUnet A/S. */ /* See LICENSE for licensing information. */ #include <stdio.h> #include <string.h> #include <unistd.h> #include <stdlib.h> #include "debug.h" #include "gconfig.h" int listconfig(struct gconffile **cf, char *block, int compact) { char *opt = NULL, *val = NULL; int conftype; for (;;) { free(opt); free(val); if (!getconfigline(cf, block, &opt, &val, &conftype)) return -1; if (!opt) return 0; /* Success. */ if (conftype == CONF_STR && !strcasecmp(opt, "include")) { if (!pushgconfpaths(cf, val)) debugx(1, DBG_ERR, "failed to include config file %s", val); continue; } switch (conftype) { case CONF_STR: if (block) printf(compact ? "%s=%s;" : "\t%s=%s\n", opt, val); else printf("%s=%s\n", opt, val); break; case CONF_CBK: printf("%s %s {%s", opt, val, compact ? "" : "\n"); if (listconfig(cf, val, compact)) return -1; printf("}\n"); break; default: printf("Unsupported config type\n"); return -1; } } return 0; /* Success. */ } int main(int argc, char **argv) { int c, compact = 0; struct gconffile *cfs; debug_init("radsecproxy-conf"); debug_set_level(DBG_WARN); while ((c = getopt(argc, argv, "c")) != -1) { switch (c) { case 'c': compact = 1; break; default: goto usage; } } if (argc - optind != 1) goto usage; cfs = openconfigfile(argv[optind]); return listconfig(&cfs, NULL, compact); usage: debug(DBG_ERR, "Usage:\n%s [ -c ] configfile", argv[0]); exit(1); } /* Local Variables: */ /* c-file-style: "stroustrup" */ /* End: */
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
You can’t perform that action at this time.