From: Alan T. DeKok Date: Fri, 17 Jul 2015 01:07:14 +0000 (-0400) Subject: Globbing across directories is not supported. Fixes #1149. X-Git-Tag: release_3_0_10~324 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac2fc42b977dca2823e1e9f4700cdca42b2548cb;p=thirdparty%2Ffreeradius-server.git Globbing across directories is not supported. Fixes #1149. The rest of the "filename_work" code assumes that the detail.work file is in the same directory as the files being globbed. In order to support globbing for directories, the code will have to be updated to *not* open detail.work, but instead to do a *second* file globbing() on .../*/detail.work, in order to get the real filename of the detail.work file. In the short term it's easier to just enforce the assumptions in the rest of the code. --- diff --git a/src/main/detail.c b/src/main/detail.c index 57c5f0019ab..64625331c8d 100644 --- a/src/main/detail.c +++ b/src/main/detail.c @@ -1151,6 +1151,16 @@ int detail_parse(CONF_SECTION *cs, rad_listen_t *this) } else { buffer[0] = '\0'; } + + /* + * Globbing cannot be done across directories. + */ + if ((strchr(buffer, '*') != NULL) || + (strchr(buffer, '[') != NULL)) { + cf_log_err_cs(cs, "Wildcard directories are not supported"); + return -1; + } + strlcat(buffer, "detail.work", sizeof(buffer) - strlen(buffer));