git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@270
e88ac4ed-0b26-0410-9574-
a7f39faa03bf
#endif
#include <sys/time.h>
#include <sys/types.h>
+#include <ctype.h>
#include <sys/wait.h>
#include <arpa/inet.h>
#include <regex.h>
void adddynamicrealmserver(struct realm *realm, struct clsrvconf *conf, char *id) {
struct clsrvconf *srvconf;
struct realm *newrealm = NULL;
- char *realmname;
+ char *realmname, *s;
+
if (!conf->dynamiclookupcommand)
return;
realmname++;
if (!*realmname)
return;
+ for (s = realmname; *s; s++)
+ if (*s != '-' && !isalnum(*s))
+ return;
pthread_mutex_lock(&realm->subrealms_mutex);
/* exit if we now already got a matching subrealm */