1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00

r15859: fixed a crash bug in the ldb password_hash module. This one is quite

sublte - please have a look at the change if you are not certain you
know the semantics of constant arrays declared on the stack (they must
be static if you return them from the function)
(This used to be commit 1848078fee)
This commit is contained in:
Andrew Tridgell 2006-05-24 12:33:06 +00:00 committed by Gerald (Jerry) Carter
parent 9ff4fcab36
commit b22d15a0f8

View File

@ -1145,7 +1145,10 @@ static int get_domain_data_callback(struct ldb_context *ldb, void *context, stru
static int build_domain_data_request(struct ph_async_context *ac,
struct dom_sid *sid)
{
const char * const attrs[] = { "pwdProperties", "pwdHistoryLength", "dnsDomain", NULL };
/* attrs[] is returned from this function in
ac->dom_req->op.search.attrs, so it must be static, as
otherwise the compiler can put it on the stack */
static const char * const attrs[] = { "pwdProperties", "pwdHistoryLength", "dnsDomain", NULL };
char *filter;
ac->dom_req = talloc_zero(ac, struct ldb_request);