s4:lib/messaging: use correct path for names.tdb
commit2d39d049a902b4c7eb7cfef7224a5493c92f2e90
authorRalph Boehme <slow@samba.org>
Wed, 14 Oct 2015 10:40:03 +0000 (14 12:40 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 28 Oct 2015 09:56:22 +0000 (28 10:56 +0100)
tree2cceb6b211de6f61d8b8b98dadba3d7b2cfbc3ae
parent05e381f4225e18b82f7dc5985b13b8850ddbfded
s4:lib/messaging: use correct path for names.tdb

source3 messaging_init() calls server_id_db_init() (where names.tdb is
created) with lock_path. source4 imessaging_init() otoh wrongly used the
special lock_path subdirectory "msg.lock":

> find /opt/samba/ -name names.tdb
/opt/samba/var/lock/msg.lock/names.tdb
/opt/samba/var/lock/names.tdb

> tdbdump /opt/samba/var/lock/names.tdb
{
key(14) = "notify-daemon\00"
data(27) = "28609/12756565486113779780\00"
}

> tdbdump /opt/samba/var/lock/msg.lock/names.tdb
{
key(15) = "winbind_server\00"
data(8) = "28593/0\00"
}

With this patch both source3 and source4 messaging now use the same
names.tdb which is what we want:

> find /opt/samba/ -name names.tdb
/opt/samba/var/lock/names.tdb

> tdbdump /opt/samba/var/lock/names.tdb
{
key(15) = "winbind_server\00"
data(8) = "26434/0\00"
}
{
key(14) = "notify-daemon\00"
data(26) = "26452/3454520012124001687\00"
}

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11562

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 79ec9cbff9b8b84ac80c6d2a8220b37561415271)
source4/lib/messaging/messaging.c