Changeset 745 for trunk/server/source3/include/client.h
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/include/client.h
r429 r745 47 47 }; 48 48 49 struct cli_pipe_auth_data {50 enum pipe_auth_type auth_type; /* switch for the union below. Defined in ntdomain.h */51 enum dcerpc_AuthLevel auth_level; /* defined in ntdomain.h */52 53 char *domain;54 char *user_name;55 DATA_BLOB user_session_key;56 57 union {58 struct schannel_state *schannel_auth;59 NTLMSSP_STATE *ntlmssp_state;60 struct kerberos_auth_struct *kerberos_auth;61 } a_u;62 };63 64 /**65 * rpc_cli_transport defines a transport mechanism to ship rpc requests66 * asynchronously to a server and receive replies67 */68 69 struct rpc_cli_transport {70 71 enum dcerpc_transport_t transport;72 73 /**74 * Trigger an async read from the server. May return a short read.75 */76 struct tevent_req *(*read_send)(TALLOC_CTX *mem_ctx,77 struct event_context *ev,78 uint8_t *data, size_t size,79 void *priv);80 /**81 * Get the result from the read_send operation.82 */83 NTSTATUS (*read_recv)(struct tevent_req *req, ssize_t *preceived);84 85 /**86 * Trigger an async write to the server. May return a short write.87 */88 struct tevent_req *(*write_send)(TALLOC_CTX *mem_ctx,89 struct event_context *ev,90 const uint8_t *data, size_t size,91 void *priv);92 /**93 * Get the result from the read_send operation.94 */95 NTSTATUS (*write_recv)(struct tevent_req *req, ssize_t *psent);96 97 /**98 * This is an optimization for the SMB transport. It models the99 * TransactNamedPipe API call: Send and receive data in one round100 * trip. The transport implementation is free to set this to NULL,101 * cli_pipe.c will fall back to the explicit write/read routines.102 */103 struct tevent_req *(*trans_send)(TALLOC_CTX *mem_ctx,104 struct event_context *ev,105 uint8_t *data, size_t data_len,106 uint32_t max_rdata_len,107 void *priv);108 /**109 * Get the result from the trans_send operation.110 */111 NTSTATUS (*trans_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx,112 uint8_t **prdata, uint32_t *prdata_len);113 114 bool (*is_connected)(void *priv);115 unsigned int (*set_timeout)(void *priv, unsigned int timeout);116 117 void *priv;118 };119 120 struct rpc_pipe_client {121 struct rpc_pipe_client *prev, *next;122 123 struct rpc_cli_transport *transport;124 125 struct ndr_syntax_id abstract_syntax;126 struct ndr_syntax_id transfer_syntax;127 128 NTSTATUS (*dispatch) (struct rpc_pipe_client *cli,129 TALLOC_CTX *mem_ctx,130 const struct ndr_interface_table *table,131 uint32_t opnum, void *r);132 133 struct tevent_req *(*dispatch_send)(134 TALLOC_CTX *mem_ctx,135 struct tevent_context *ev,136 struct rpc_pipe_client *cli,137 const struct ndr_interface_table *table,138 uint32_t opnum,139 void *r);140 NTSTATUS (*dispatch_recv)(struct tevent_req *req,141 TALLOC_CTX *mem_ctx);142 143 144 char *desthost;145 char *srv_name_slash;146 147 uint16 max_xmit_frag;148 uint16 max_recv_frag;149 150 struct cli_pipe_auth_data *auth;151 152 /* The following is only non-null on a netlogon client pipe. */153 struct netlogon_creds_CredentialState *dc;154 155 /* Used by internal rpc_pipe_client */156 pipes_struct *pipes_struct;157 };158 159 /* Transport encryption state. */160 enum smb_trans_enc_type {161 SMB_TRANS_ENC_NTLM162 #if defined(HAVE_GSSAPI) && defined(HAVE_KRB5)163 , SMB_TRANS_ENC_GSS164 #endif165 };166 167 #if defined(HAVE_GSSAPI) && defined(HAVE_KRB5)168 struct smb_tran_enc_state_gss {169 gss_ctx_id_t gss_ctx;170 gss_cred_id_t creds;171 };172 #endif173 174 struct smb_trans_enc_state {175 enum smb_trans_enc_type smb_enc_type;176 uint16 enc_ctx_num;177 bool enc_on;178 union {179 NTLMSSP_STATE *ntlmssp_state;180 #if defined(HAVE_GSSAPI) && defined(HAVE_KRB5)181 struct smb_tran_enc_state_gss *gss_state;182 #endif183 } s;184 };185 186 49 struct cli_state_seqnum { 187 50 struct cli_state_seqnum *prev, *next; … … 209 72 int privileges; 210 73 211 fstringdesthost;74 char *desthost; 212 75 213 76 /* The credentials used to open the cli_state connection. */ … … 221 84 * the protocol > NT1. 222 85 */ 223 fstringserver_type;224 fstringserver_os;225 fstringserver_domain;86 char *server_type; 87 char *server_os; 88 char *server_domain; 226 89 227 fstringshare;228 fstringdev;90 char *share; 91 char *dev; 229 92 struct nmb_name called; 230 93 struct nmb_name calling; 231 fstring full_dest_host_name;232 94 struct sockaddr_storage dest_ss; 233 95 … … 248 110 int win95; 249 111 bool is_samba; 112 bool is_guestlogin; 250 113 uint32 capabilities; 251 uint32 posix_capabilities; 114 /* What the server offered. */ 115 uint32_t server_posix_capabilities; 116 /* What the client requested. */ 117 uint32_t requested_posix_capabilities; 252 118 bool dfsroot; 253 254 #if 0255 TALLOC_CTX *longterm_mem_ctx;256 TALLOC_CTX *call_mem_ctx;257 #endif258 119 259 120 struct smb_signing_state *signing_state; … … 290 151 }; 291 152 292 typedef struct file_info { 293 struct cli_state *cli; 153 struct file_info { 294 154 uint64_t size; 295 155 uint16 mode; … … 302 162 char *name; 303 163 char short_name[13*3]; /* the *3 is to cope with multi-byte */ 304 } file_info;164 }; 305 165 306 166 #define CLI_FULL_CONNECTION_DONT_SPNEGO 0x0001
Note:
See TracChangeset
for help on using the changeset viewer.