When chrooted, we need to strip the chroot directory from the front of
included paths. Don't forget to do it for globs as well.
This commit is contained in:
parent
09a3aaf3e0
commit
e4c53d3bf0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287918
@ -128,6 +128,10 @@ static void config_start_include_glob(const char* filename)
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
memset(&g, 0, sizeof(g));
|
memset(&g, 0, sizeof(g));
|
||||||
|
if(cfg_parser->chroot && strncmp(filename, cfg_parser->chroot,
|
||||||
|
strlen(cfg_parser->chroot)) == 0) {
|
||||||
|
filename += strlen(cfg_parser->chroot);
|
||||||
|
}
|
||||||
r = glob(filename, flags, NULL, &g);
|
r = glob(filename, flags, NULL, &g);
|
||||||
if(r) {
|
if(r) {
|
||||||
/* some error */
|
/* some error */
|
||||||
|
Loading…
Reference in New Issue
Block a user