summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2007-05-30 14:03:05 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-05-30 14:03:05 +0000
commit2a4307cfce414caf4dff48b7a3c53ffc8a5144e5 (patch)
tree76fc36d32007aa346c072a6edf2eb4b4100fa889
parentc791194cf87a3b9a0270d6dc26c6a0ea9d8db96e (diff)
allow optional trailing / after regexp
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@112 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 5abc6f7..673fe9b 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1730,7 +1730,11 @@ void addrealm(char *value, char *server, char *message) {
debugx(1, DBG_ERR, "addrealm failed, no server %s", server);
}
- if (*value != '/') {
+ if (*value == '/') {
+ /* regexp, remove optional trailing / if present */
+ if (value[strlen(value) - 1] == '/')
+ value[strlen(value) - 1] = '\0';
+ } else {
/* not a regexp, let us make it one */
if (*value == '*' && !value[1])
regex = stringcopy(".*", 0);