r10669: reverted jelmers commit 10663 as it was causing lots of panics in 'make test'
commit194efd26e42d621b239052ed1fec8da916bd2144
authorAndrew Tridgell <tridge@samba.org>
Sat, 1 Oct 2005 01:04:34 +0000 (1 01:04 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:39:16 +0000 (10 13:39 -0500)
treef25d78ecf955ae005291cd4bd1ff3e3eb966b51c
parentfd6d895ebdb201ac6afaf5c8ec84d003765cdff6
r10669: reverted jelmers commit 10663 as it was causing lots of panics in 'make test'

I also think the method of getting rid of pstring isn't the right
one. I certainly do want to get rid of pstring/fstring, but the reason
for removing them is the use of arbitrary sized fixed length strings
on the stack and in structures. Changing to another fixed length stack
string format isn't really a win, and moving to use strncpy() is
actually worse than pstrcpy() as strncpy() has the absolutely awful
semantics of always zeroing all remaining bytes, so it ends up taking
a lot of cpu doing pointless memory writes.

I'd rather move to more use of asprintf()/talloc_asprintf() and
similar functions for dynamic string allocation.

You also have to be very careful about some of these system defined
string limits. One some systems PATH_MAX could be 64k or even larger,
which can quickly blow the stack out when you allocate a few of them.
source/auth/ntlmssp/ntlmssp_parse.c
source/auth/ntlmssp/ntlmssp_server.c