s3: winbind: Fix crash when invoking winbind idmap scripts.
authorJeremy Allison <jra@samba.org>
Thu, 23 May 2019 20:33:21 +0000 (13:33 -0700)
committerRalph Boehme <slow@samba.org>
Mon, 27 May 2019 13:16:21 +0000 (13:16 +0000)
commita1f95ba5db6fc017fad35377fbf76c048f2dd8ab
tree10c259098b2bb0ed888cf28167d570a59c3259da
parent412afb2aef100e09eb433b8f0cae064fc2a736b7
s3: winbind: Fix crash when invoking winbind idmap scripts.

Previously the private context was caching a pointer to
a string returned from lp_XXX(). This string can change
on config file reload. Ensure the string is talloc_strup'ed
onto the owning context instead.

Reported by Heinrich Mislik <Heinrich.Mislik@univie.ac.at>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13956

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/winbindd/idmap_script.c
source3/winbindd/idmap_tdb2.c