s3:loadparm: prevent infinite include nesting.
commitfa9acc0605f60964ebdd8156a0f51b5b5719b9f3
authorMichael Adam <obnox@samba.org>
Mon, 27 Apr 2009 16:10:14 +0000 (27 18:10 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 10 Jun 2009 14:17:48 +0000 (10 16:17 +0200)
treed98c6460f82000acd14c8639019d79ce7289c5f7
parent73b7d7a9f513d4521b8f0b652eedd235f11a00d3
s3:loadparm: prevent infinite include nesting.

This introduces a hard coded MAX_INCLUDE_DEPTH of 100.
When this is exceeded, handle_include (and hence lp_load) fails.

One could of course implement a more intelligent loop detection
in the include-tree, but this would require some restructuring
of the internal loadparm housekeeping. Maybe as a second improvement
step.

Michael
(cherry picked from commit a100a9c48d73df69851099e15253a65f2dbc9f65)
source/param/loadparm.c