summaryrefslogtreecommitdiff
path: root/source3/client/ntclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/client/ntclient.c')
-rw-r--r--source3/client/ntclient.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/client/ntclient.c b/source3/client/ntclient.c
index 65d9da9d5f..59b4a7fe78 100644
--- a/source3/client/ntclient.c
+++ b/source3/client/ntclient.c
@@ -106,6 +106,13 @@ BOOL do_nt_login(char *desthost, char *myhostname,
return False;
}
+ /**************** Set Named Pipe State ***************/
+ if (!rpc_pipe_set_hnd_state(PIPE_LSARPC, fnum, 0x4300))
+ {
+ free(inbuf); free(outbuf);
+ return False;
+ }
+
/******************* bind request on \PIPE\lsarpc *****************/
/* create and send a MSRPC command with api LSA_OPENPOLICY */
@@ -132,13 +139,6 @@ BOOL do_nt_login(char *desthost, char *myhostname,
return False;
}
- /**************** Set Named Pipe State ***************/
- if (!rpc_pipe_set_hnd_state(PIPE_LSARPC, fnum, 0x4300))
- {
- free(inbuf); free(outbuf);
- return False;
- }
-
/******************* Open Policy ********************/
fstrcpy(server_name, ("\\\\"));
@@ -198,16 +198,16 @@ BOOL do_nt_login(char *desthost, char *myhostname,
return False;
}
- /******************* bind request on \PIPE\NETLOGON *****************/
-
- if (!rpc_pipe_bind(PIPE_NETLOGON, fnum, ++call_id, &abstract, &transfer))
+ /**************** Set Named Pipe State ***************/
+ if (!rpc_pipe_set_hnd_state(PIPE_NETLOGON, fnum, 0x4300))
{
free(inbuf); free(outbuf);
return False;
}
- /**************** Set Named Pipe State ***************/
- if (!rpc_pipe_set_hnd_state(PIPE_NETLOGON, fnum, 0x4300))
+ /******************* bind request on \PIPE\NETLOGON *****************/
+
+ if (!rpc_pipe_bind(PIPE_NETLOGON, fnum, ++call_id, &abstract, &transfer))
{
free(inbuf); free(outbuf);
return False;