libcli/auth: use unique key_name values in netlogon_creds_cli_context_common()
authorStefan Metzmacher <metze@samba.org>
Fri, 13 Dec 2013 16:31:45 +0000 (17:31 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 7 Jan 2014 11:47:04 +0000 (12:47 +0100)
commitdc96b1ddccfe8eb1a631355f9471ee0b620d682c
tree263a3396fcd4a7128751389db278439232dca3b2
parent6e6d9f9f12284ed06a21cc02080e436b7326065f
libcli/auth: use unique key_name values in netlogon_creds_cli_context_common()

Until all callers are fixed to pass the same 'server_computer'
value, we try to calculate a server_netbios_name and use this
as unique identifier for a specific domain controller.

Otherwise winbind would use 'hostname.example.com'
while 'net rpc testjoin' would use 'HOSTNAME',
which leads to 2 records in netlogon_creds_cli.tdb
for the same domain controller.

Once all callers are fixed we can think about reverting this
commit.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/auth/netlogon_creds_cli.c