summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorvenaas <venaas>2008-04-15 13:05:18 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-04-15 13:05:18 +0000
commit3c58a54570cfcebaff16d713fcfa02426152c824 (patch)
treea539f83357d9a6888af32cf7f857d6b022b1c6b3 /radsecproxy.c
parent7ca3197e8da2add69e17437f1b8f3f2ac669990b (diff)
include argument now relative to current config file, also never try to open master config basename
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@230 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 030ffba..c5c5375 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -2581,28 +2581,12 @@ void addrealm(char *value, char **servers, char *message) {
debug(DBG_DBG, "addrealm: added realm %s", value);
}
-struct gconffile *openconfigfile(const char *filename) {
- FILE *f;
- char pathname[100], *base = NULL;
+struct gconffile *openconfigfile(const char *file) {
struct gconffile *cf = NULL;
-
- f = pushgconffile(&cf, filename);
- if (f) {
- debug(DBG_DBG, "reading config file %s", filename);
- return cf;
- }
- if (strlen(filename) + 1 <= sizeof(pathname)) {
- /* basename() might modify the string */
- strcpy(pathname, filename);
- base = basename(pathname);
- f = pushgconffile(&cf, base);
- }
-
- if (!f)
- debugx(1, DBG_ERR, "could not read config file %s nor %s\n%s", filename, base, strerror(errno));
-
- debug(DBG_DBG, "reading config file %s", base);
+ if (!pushgconffile(&cf, file))
+ debugx(1, DBG_ERR, "could not read config file %s\n%s", file, strerror(errno));
+ debug(DBG_DBG, "reading config file %s", file);
return cf;
}
@@ -3020,7 +3004,6 @@ void getmainconfig(const char *configfile) {
"Rewrite", CONF_CBK, confrewrite_cb,
NULL
);
- popgconffile(&cfs);
tlsfree();
rewritefree();