Let get_trust_pw() determine the machine_account_name to use.
authorMichael Adam <obnox@samba.org>
Tue, 11 Dec 2007 12:05:44 +0000 (13:05 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 13 Dec 2007 09:15:17 +0000 (10:15 +0100)
commit6ced4a7f88798dc449a667d63bc29bf6c569291f
tree1d8b102451fc341be62e76300ec7867e920fe2a2
parentcdc60d8ae8c0ef804206b20b451e9557f97d4439
Let get_trust_pw() determine the machine_account_name to use.

Up to now each caller used its own logic.

This eliminates code paths where there was a special treatment
of the following situation: the domain given is not our workgroup
(i.e. our own domain) and we are not a DC (i.e. it is not a typical
trusted domain situation). In situation the given domain name was
previously used as the machine account name, resulting in an account
name of DOMAIN\\DOMAIN$, which does not seem very reasonable to me.
get_trust_pw would not have obtained a password in this situation
anyways.

I hope I have not missed an important point here!

Michael
source/auth/auth_domain.c
source/passdb/passdb.c
source/rpc_client/cli_pipe.c
source/winbindd/winbindd_cm.c