channel:
- If the domain name passed to create_rpc_bind_req() is empty, use
lp_workgroup()
- Correctly set the auth_padding field when the send_size is a multiple
of 8 bytes
I've tested with nt4sp6 and win2ksp0 and it seems to work, although
there are no password hashes transferred from win2k. The empty
passwords are being protected by the secure channel encryption though.
(This used to be commit
a8c11e855611c91e94787387c62ac629232cacfa)
init_rpc_hdr_auth(&hdr_auth, NETSEC_AUTH_TYPE, NETSEC_AUTH_LEVEL,
0x00, 1);
+
+ /* Use lp_workgroup() if domain not specified */
+
+ if (!domain || !domain[0])
+ domain = lp_workgroup();
+
init_rpc_auth_netsec_neg(&netsec_neg, domain, my_name);
/*
* be stored in the auth header.
*/
- if (auth_schannel)
- auth_padding = 8 - (send_size & 7);
+ if (auth_schannel) {
+ if (send_size % 8)
+ auth_padding = 8 - (send_size % 8);
+ }
data_len = RPC_HEADER_LEN + RPC_HDR_REQ_LEN + send_size +
((auth_verify|auth_schannel) ? RPC_HDR_AUTH_LEN : 0) +