Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/include/client.h

    r429 r745  
    4747};
    4848
    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 requests
    66  * asynchronously to a server and receive replies
    67  */
    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 the
    99          * TransactNamedPipe API call: Send and receive data in one round
    100          * 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_NTLM
    162 #if defined(HAVE_GSSAPI) && defined(HAVE_KRB5)
    163                 , SMB_TRANS_ENC_GSS
    164 #endif
    165 };
    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 #endif
    173 
    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 #endif
    183         } s;
    184 };
    185 
    18649struct cli_state_seqnum {
    18750        struct cli_state_seqnum *prev, *next;
     
    20972        int privileges;
    21073
    211         fstring desthost;
     74        char *desthost;
    21275
    21376        /* The credentials used to open the cli_state connection. */
     
    22184         * the protocol > NT1.
    22285         */
    223         fstring server_type;
    224         fstring server_os;
    225         fstring server_domain;
     86        char *server_type;
     87        char *server_os;
     88        char *server_domain;
    22689
    227         fstring share;
    228         fstring dev;
     90        char *share;
     91        char *dev;
    22992        struct nmb_name called;
    23093        struct nmb_name calling;
    231         fstring full_dest_host_name;
    23294        struct sockaddr_storage dest_ss;
    23395
     
    248110        int win95;
    249111        bool is_samba;
     112        bool is_guestlogin;
    250113        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;
    252118        bool dfsroot;
    253 
    254 #if 0
    255         TALLOC_CTX *longterm_mem_ctx;
    256         TALLOC_CTX *call_mem_ctx;
    257 #endif
    258119
    259120        struct smb_signing_state *signing_state;
     
    290151};
    291152
    292 typedef struct file_info {
    293         struct cli_state *cli;
     153struct file_info {
    294154        uint64_t size;
    295155        uint16 mode;
     
    302162        char *name;
    303163        char short_name[13*3]; /* the *3 is to cope with multi-byte */
    304 } file_info;
     164};
    305165
    306166#define CLI_FULL_CONNECTION_DONT_SPNEGO 0x0001
Note: See TracChangeset for help on using the changeset viewer.