s3:loadparm: prevent infinite include nesting.
authorMichael Adam <obnox@samba.org>
Mon, 27 Apr 2009 16:10:14 +0000 (18:10 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 28 Apr 2009 13:50:25 +0000 (15:50 +0200)
commit074229796c4ca9827238e7fee7aca5a95c7ada05
tree5943dcf6c5013a445d698bc37e072fa450d4b6bd
parent43a2a26956298a0e12a79880107324784f9ec7de
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
source/param/loadparm.c