summaryrefslogtreecommitdiffstats
path: root/source/rpc_client/cli_netlogon.c
diff options
context:
space:
mode:
authorMatthew Chapman <matty@samba.org>2000-05-29 01:23:48 +0000
committerMatthew Chapman <matty@samba.org>2000-05-29 01:23:48 +0000
commit7710b4f48d3e8532df5e37f99a779758f750efdb (patch)
treef503157e185ac8a7df69205661fcf663959e8914 /source/rpc_client/cli_netlogon.c
parent2170d72d508ab8fb63a1da3024395f8fd6011cfa (diff)
downloadsamba-7710b4f48d3e8532df5e37f99a779758f750efdb.tar.gz
samba-7710b4f48d3e8532df5e37f99a779758f750efdb.tar.xz
samba-7710b4f48d3e8532df5e37f99a779758f750efdb.zip
Fixed LsaQueryInformationPolicy level 3 to return primary domain info.
Domain SID is saved in secrets.tdb upon joining domain. Added "Authenticated Users" and "SYSTEM" well-known SIDs (under NT Authority).
Diffstat (limited to 'source/rpc_client/cli_netlogon.c')
-rw-r--r--source/rpc_client/cli_netlogon.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/rpc_client/cli_netlogon.c b/source/rpc_client/cli_netlogon.c
index ce4468d1127..0043a1894ed 100644
--- a/source/rpc_client/cli_netlogon.c
+++ b/source/rpc_client/cli_netlogon.c
@@ -579,7 +579,14 @@ Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
* Ok - we have an anonymous connection to the IPC$ share.
* Now start the NT Domain stuff :-).
*/
-
+
+ if(cli_lsa_get_domain_sid(&cli, remote_machine) == False) {
+ DEBUG(0,("modify_trust_password: unable to obtain domain sid from %s. Error was : %s.\n", remote_machine, cli_errstr(&cli)));
+ cli_ulogoff(&cli);
+ cli_shutdown(&cli);
+ return False;
+ }
+
if(cli_nt_session_open(&cli, PIPE_NETLOGON) == False) {
DEBUG(0,("modify_trust_password: unable to open the domain client session to \
machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli)));