Maintained by: NLnet Labs

[PATCH] unable to reload globs

W.C.A. Wijngaards
Tue Sep 22 10:05:29 CEST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Dag-Erling,

On 17/09/15 18:39, Dag-Erling Smørgrav via Unbound-users wrote:
> When the configuration lexer processes an include directive and
> unbound is chrooted, it will attempt to strip the chroot directory
> from the front of the filename.  Unfortunately, this is omitted
> from the loop that handles globs.
> 
> The bug was reported to me by a 1.5.3 user and has been confirmed
> in 1.5.4.  The patch below is relative to 1.5.4 and applies to the
> latest trunk with a slight offset.

Thank you for the patch.  Fixed code base, included for the next release
.

Best regards, Wouter

> 
> Index: util/configlexer.lex 
> ===================================================================
>
> 
- --- util/configlexer.lex	(revision 3445)
> +++ util/configlexer.lex	(working copy) @@ -126,6 +126,10 @@ 
> #endif ; 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); if(r) { /* some error */
> 
> DES
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWAQvJAAoJEJ9vHC1+BF+NEl8P/1t1OKKekP9FriL11kBck2Kq
ZTlv9pV7OlR5nwge29RT5Hs3SrvvwU5Hx55tshKRE7T5jgTD7S63ExkdnxdARFAJ
z3lDT5NMc6jkXMvVouAl5qvRHr9+mzXYqKjIhDuStBbgK43xzlH28W/idiER1guI
znNJd980dumTWm2lJ1sMA44CBebqb2G4LEWTtZHbvSggpiY6vW1WlAM3e9AmxXci
ThNInOygjYjUNvehlZD5wbeSRd3Zu0R179thNdCBzvY8DmH/KNHktoO116m3viWX
esjN2F1L3XnOD+r6TASmh9uGQirIQpr7hM7gIXrZqiZVblbVchKG1itFqd6auqrs
GFIW6QH/TlNDOANZd3IbYC0gBYidpIiY2xuTDtz3v9e0GzquPsEX+YD0QOn+148K
/SgC15D1hjSRLV5qSE+fwrOeT5kwXm7dC+RsCyPlgQycfmv2qSbN6DaNZXoJRAjx
OGImwJ/o9CAH+rkde8PxDj+nmHwyhERUNXP9V0lQippkwZc0EWOXLXKQRllkOc8K
RVTgk2h7hZJvRQtjFRhD4wYWR6mIrvO9OLL1z/eCJcZKWHi1pCSjb4Y0Z3mHVO+S
P6gDRdhAWYan5rPJ6LIh0pFQ++tuLwawCNEztW+WjlwxjDHn7L80H5RqWTq3s3tV
Z3l2SNI4swAbwEYBrUUR
=h0S+
-----END PGP SIGNATURE-----