#define NET_FLAGS_PDC 0x00000008 /* PDC only */
#define NET_FLAGS_ANONYMOUS 0x00000010 /* use an anonymous connection */
#define NET_FLAGS_NO_PIPE 0x00000020 /* don't open an RPC pipe */
+#define NET_FLAGS_SIGN 0x00000040 /* sign RPC connection */
+#define NET_FLAGS_SEAL 0x00000080 /* seal RPC connection */
/* net share operation modes */
#define NET_MODE_SHARE_MIGRATE 1
return -1;
}
} else {
- pipe_hnd = cli_rpc_pipe_open_noauth(cli, pipe_idx, &nt_status);
+ if (conn_flags & NET_FLAGS_SEAL) {
+ pipe_hnd = cli_rpc_pipe_open_ntlmssp(cli, pipe_idx,
+ PIPE_AUTH_LEVEL_PRIVACY,
+ lp_workgroup(),
+ c->opt_user_name,
+ c->opt_password,
+ &nt_status);
+ } else {
+ pipe_hnd = cli_rpc_pipe_open_noauth(cli, pipe_idx, &nt_status);
+ }
if (!pipe_hnd) {
DEBUG(0, ("Could not initialise pipe %s. Error was %s\n",
cli_get_pipe_name(pipe_idx),