s3: lib: dbwrap_ctdb: Ensure value_valid is set when creating empty record
Fixes:
PANIC: assert failed at ../../lib/dbwrap/dbwrap.c(82): rec->value_valid
PANIC (pid 902392): assert failed: rec->value_valid
BACKTRACE: 16 stack frames:
#0 bin/shared/libsamba-util.so.0(log_stack_trace+0x30) [0x7fb161f69cb0]
#1 bin/shared/libsmbconf.so.0(smb_panic_s3+0x23) [0x7fb1619f4863]
#2 bin/shared/libsamba-util.so.0(smb_panic+0x2f) [0x7fb161f69daf]
#3 bin/shared/private/libdbwrap-samba4.so(dbwrap_record_get_value+0x27) [0x7fb160a04c57]
#4 bin/shared/libsamba-passdb.so.0(+0x2d27c) [0x7fb1618e627c]
#5 bin/shared/libsamba-passdb.so.0(pdb_add_aliasmem+0x33) [0x7fb1618db663]
#6 bin/shared/libsamba-passdb.so.0(+0x1edbb) [0x7fb1618d7dbb]
#7 bin/shared/libsamba-passdb.so.0(create_builtin_administrators+0x167) [0x7fb1618d8217]
#8 bin/shared/private/libauth-samba4.so(finalize_local_nt_token+0x39d) [0x7fb16194bd5d]
#9 bin/shared/private/libauth-samba4.so(create_local_nt_token_from_info3+0x304) [0x7fb16194c3f4]
#10 bin/shared/private/libauth-samba4.so(create_local_token+0x3d6) [0x7fb161945106]
#11 bin/shared/private/libauth-samba4.so(+0x154b4) [0x7fb1619474b4]
#12 bin/shared/private/libauth-samba4.so(init_guest_session_info+0x58) [0x7fb161947798]
#13 ./bin/smbd(main+0x80f) [0x55944ef8f91f]
#14 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fb161076bbb]
#15 ./bin/smbd(_start+0x2a) [0x55944ef90f8a]
This is a similar, additional fix to commit
36ea1e188d5ea8d40c47ffc466a494c1160e471c.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jan 20 04:25:57 UTC 2020 on sn-devel-184