summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2008-09-08 08:18:10 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-09-08 08:18:10 +0000
commitc24b12498ab137851e4cdd4035060c54134e9c5b (patch)
tree8df10d5708fa95af7e00db4aee1baae17aee18e6
parenta382bb1dd021b20ea9991b94503bda4826316718 (diff)
configuration of rewriteOut, but so far does nothing
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@366 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 563d7e5..7bec114 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -2908,7 +2908,8 @@ void addrewrite(char *value, char **attrs, char **vattrs) {
}
void confclient_cb(struct gconffile **cf, char *block, char *opt, char *val) {
- char *type = NULL, *tls = NULL, *matchcertattr = NULL, *rewritein = NULL, *rewriteinalias = NULL, *rewriteusername = NULL;
+ char *type = NULL, *tls = NULL, *matchcertattr = NULL,
+ *rewritein = NULL, *rewriteinalias = NULL, *rewriteout = NULL, *rewriteusername = NULL;
struct clsrvconf *conf;
debug(DBG_DBG, "confclient_cb called for %s", block);
@@ -2928,6 +2929,7 @@ void confclient_cb(struct gconffile **cf, char *block, char *opt, char *val) {
"CertificateNameCheck", CONF_BLN, &conf->certnamecheck,
"rewrite", CONF_STR, &rewriteinalias,
"rewriteIn", CONF_STR, &rewritein,
+ "rewriteOut", CONF_STR, &rewriteout,
"rewriteattribute", CONF_STR, &rewriteusername,
NULL
);
@@ -2961,6 +2963,10 @@ void confclient_cb(struct gconffile **cf, char *block, char *opt, char *val) {
free(rewriteinalias);
conf->rewritein = rewritein ? getrewrite(rewritein, NULL) : getrewrite("defaultclient", "default");
free(rewritein);
+ if (rewriteout) {
+ conf->rewriteout = getrewrite(rewriteout, NULL);
+ free(rewriteout);
+ }
if (rewriteusername) {
if (!addrewriteattr(conf, rewriteusername))
@@ -2979,7 +2985,7 @@ void confclient_cb(struct gconffile **cf, char *block, char *opt, char *val) {
}
void confserver_cb(struct gconffile **cf, char *block, char *opt, char *val) {
- char *type = NULL, *tls = NULL, *matchcertattr = NULL, *rewritein = NULL, rewriteinalias = NULL;
+ char *type = NULL, *tls = NULL, *matchcertattr = NULL, *rewritein = NULL, *rewriteinalias = NULL, *rewriteout = NULL;
long int retryinterval = LONG_MIN, retrycount = LONG_MIN;
struct clsrvconf *conf;
@@ -3000,6 +3006,7 @@ void confserver_cb(struct gconffile **cf, char *block, char *opt, char *val) {
"MatchCertificateAttribute", CONF_STR, &matchcertattr,
"rewrite", CONF_STR, &rewriteinalias,
"rewriteIn", CONF_STR, &rewritein,
+ "rewriteOut", CONF_STR, &rewriteout,
"StatusServer", CONF_BLN, &conf->statusserver,
"RetryInterval", CONF_LINT, &retryinterval,
"RetryCount", CONF_LINT, &retrycount,
@@ -3052,6 +3059,10 @@ void confserver_cb(struct gconffile **cf, char *block, char *opt, char *val) {
free(rewriteinalias);
conf->rewritein = rewritein ? getrewrite(rewritein, NULL) : getrewrite("defaultserver", "default");
free(rewritein);
+ if (rewriteout) {
+ conf->rewriteout = getrewrite(rewriteout, NULL);
+ free(rewriteout);
+ }
if (!resolvepeer(conf, 0))
debugx(1, DBG_ERR, "failed to resolve host %s port %s, exiting", conf->host ? conf->host : "(null)", conf->port ? conf->port : "(null)");