s4-libnet: fixed privilege handling in samsync to use the right db