diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-15 11:48:23 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-15 11:48:23 -0700 |
commit | dac0fb0b7c369255e0d07e47a11f6a0288019da1 (patch) | |
tree | 63b513e26972b3c5286a015b6dc110b4b20b1305 /source3/include | |
parent | efe9f952504a5a3114cada5f0caed315c4bc654d (diff) | |
parent | e44c4141fdfa07bb3bd09f28e5f093d27f170dc8 (diff) | |
download | samba-dac0fb0b7c369255e0d07e47a11f6a0288019da1.tar.gz samba-dac0fb0b7c369255e0d07e47a11f6a0288019da1.tar.bz2 samba-dac0fb0b7c369255e0d07e47a11f6a0288019da1.zip |
Merge branch 'master' of /home/tridge/samba/git/combined
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/client.h | 2 | ||||
-rw-r--r-- | source3/include/includes.h | 1 | ||||
-rw-r--r-- | source3/include/ntdomain.h | 9 | ||||
-rw-r--r-- | source3/include/proto.h | 31 | ||||
-rw-r--r-- | source3/include/rpc_dce.h | 34 |
5 files changed, 14 insertions, 63 deletions
diff --git a/source3/include/client.h b/source3/include/client.h index 5b64b9be3a..e83927cfe5 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -48,7 +48,7 @@ struct print_job_info { struct cli_pipe_auth_data { enum pipe_auth_type auth_type; /* switch for the union below. Defined in ntdomain.h */ - enum pipe_auth_level auth_level; /* defined in ntdomain.h */ + enum dcerpc_AuthLevel auth_level; /* defined in ntdomain.h */ char *domain; char *user_name; diff --git a/source3/include/includes.h b/source3/include/includes.h index 31dfc00545..d1be3b06a8 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -612,6 +612,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx); /* Lists, trees, caching, database... */ #include "../lib/util/util.h" +#include "../lib/util/util_net.h" #include "../lib/util/xfile.h" #include "../lib/util/memory.h" #include "../lib/util/attr.h" diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 53e89a8751..1d303ca64a 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -132,13 +132,6 @@ typedef struct pipe_rpc_fns { enum pipe_auth_type { PIPE_AUTH_TYPE_NONE = 0, PIPE_AUTH_TYPE_NTLMSSP, PIPE_AUTH_TYPE_SCHANNEL, PIPE_AUTH_TYPE_SPNEGO_NTLMSSP, PIPE_AUTH_TYPE_KRB5, PIPE_AUTH_TYPE_SPNEGO_KRB5 }; -/* Possible auth levels - keep these in sync with the wire values. */ -enum pipe_auth_level { PIPE_AUTH_LEVEL_NONE = 0, - PIPE_AUTH_LEVEL_CONNECT = 1, /* We treat as NONE. */ - PIPE_AUTH_LEVEL_INTEGRITY = 5, /* Sign. */ - PIPE_AUTH_LEVEL_PRIVACY = 6 /* Seal. */ -}; - /* auth state for krb5. */ struct kerberos_auth_struct { const char *service_principal; @@ -155,7 +148,7 @@ struct schannel_auth_struct { struct pipe_auth_data { enum pipe_auth_type auth_type; /* switch for union below. */ - enum pipe_auth_level auth_level; + enum dcerpc_AuthLevel auth_level; union { struct schannel_auth_struct *schannel_auth; AUTH_NTLMSSP_STATE *auth_ntlmssp_state; diff --git a/source3/include/proto.h b/source3/include/proto.h index 5da13ca0d7..35d1a9929d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1342,20 +1342,11 @@ NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx, /* The following definitions come from lib/util_sock.c */ -bool interpret_string_addr_internal(struct addrinfo **ppres, - const char *str, int flags); bool is_broadcast_addr(const struct sockaddr *pss); -bool interpret_string_addr(struct sockaddr_storage *pss, - const char *str, - int flags); -bool interpret_string_addr_prefer_ipv4(struct sockaddr_storage *pss, - const char *str, - int flags); bool is_loopback_ip_v4(struct in_addr ip); bool is_loopback_addr(const struct sockaddr *pss); bool is_zero_addr(const struct sockaddr *pss); void zero_ip_v4(struct in_addr *ip); -void zero_sockaddr(struct sockaddr_storage *pss); void in_addr_to_sockaddr_storage(struct sockaddr_storage *ss, struct in_addr ip); bool same_net(const struct sockaddr *ip1, @@ -5300,17 +5291,17 @@ NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx, struct cli_pipe_auth_data **presult); NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx, enum pipe_auth_type auth_type, - enum pipe_auth_level auth_level, + enum dcerpc_AuthLevel auth_level, const char *domain, const char *username, const char *password, struct cli_pipe_auth_data **presult); NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain, - enum pipe_auth_level auth_level, + enum dcerpc_AuthLevel auth_level, const uint8_t sess_key[16], struct cli_pipe_auth_data **presult); NTSTATUS rpccli_kerberos_bind_data(TALLOC_CTX *mem_ctx, - enum pipe_auth_level auth_level, + enum dcerpc_AuthLevel auth_level, const char *service_princ, const char *username, const char *password, @@ -5335,7 +5326,7 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli, NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli, const struct ndr_syntax_id *interface, enum dcerpc_transport_t transport, - enum pipe_auth_level auth_level, + enum dcerpc_AuthLevel auth_level, const char *domain, const char *username, const char *password, @@ -5343,7 +5334,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli, NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli, const struct ndr_syntax_id *interface, enum dcerpc_transport_t transport, - enum pipe_auth_level auth_level, + enum dcerpc_AuthLevel auth_level, const char *domain, const char *username, const char *password, @@ -5355,14 +5346,14 @@ NTSTATUS get_schannel_session_key(struct cli_state *cli, NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli, const struct ndr_syntax_id *interface, enum dcerpc_transport_t transport, - enum pipe_auth_level auth_level, + enum dcerpc_AuthLevel auth_level, const char *domain, struct netlogon_creds_CredentialState **pdc, struct rpc_pipe_client **presult); NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli, const struct ndr_syntax_id *interface, enum dcerpc_transport_t transport, - enum pipe_auth_level auth_level, + enum dcerpc_AuthLevel auth_level, const char *domain, const char *username, const char *password, @@ -5370,12 +5361,12 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli, NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli, const struct ndr_syntax_id *interface, enum dcerpc_transport_t transport, - enum pipe_auth_level auth_level, + enum dcerpc_AuthLevel auth_level, const char *domain, struct rpc_pipe_client **presult); NTSTATUS cli_rpc_pipe_open_krb5(struct cli_state *cli, const struct ndr_syntax_id *interface, - enum pipe_auth_level auth_level, + enum dcerpc_AuthLevel auth_level, const char *service_princ, const char *username, const char *password, @@ -5715,11 +5706,11 @@ bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uin bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len); bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str); bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size); -void schannel_encode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level, +void schannel_encode(struct schannel_auth_struct *a, enum dcerpc_AuthLevel auth_level, enum schannel_direction direction, struct NL_AUTH_SIGNATURE *verf, char *data, size_t data_len); -bool schannel_decode(struct schannel_auth_struct *a, enum pipe_auth_level auth_level, +bool schannel_decode(struct schannel_auth_struct *a, enum dcerpc_AuthLevel auth_level, enum schannel_direction direction, struct NL_AUTH_SIGNATURE *verf, char *data, size_t data_len); bool prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx); diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index 7992658a72..fc2d8809b9 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -53,31 +53,6 @@ enum RPC_PKT_TYPE { #define RPC_FLG_LAST 0x02 #define RPC_FLG_NOCALL 0x20 - -#define SMBD_NTLMSSP_NEG_FLAGS 0x000082b1 /* ALWAYS_SIGN|NEG_NTLM|NEG_LM|NEG_SEAL|NEG_SIGN|NEG_UNICODE */ - -/* DCE RPC auth types - extended by Microsoft. */ -#define RPC_ANONYMOUS_AUTH_TYPE 0 -#define RPC_AUTH_TYPE_KRB5_1 1 -#define RPC_SPNEGO_AUTH_TYPE 9 -#define RPC_NTLMSSP_AUTH_TYPE 10 -#define RPC_KRB5_AUTH_TYPE 16 /* Not yet implemented. */ -#define RPC_SCHANNEL_AUTH_TYPE 68 /* 0x44 */ - -/* DCE-RPC standard identifiers to indicate - signing or sealing of an RPC pipe */ -#define RPC_AUTH_LEVEL_NONE 1 -#define RPC_AUTH_LEVEL_CONNECT 2 -#define RPC_AUTH_LEVEL_CALL 3 -#define RPC_AUTH_LEVEL_PACKET 4 -#define RPC_AUTH_LEVEL_INTEGRITY 5 -#define RPC_AUTH_LEVEL_PRIVACY 6 - -#if 0 -#define RPC_PIPE_AUTH_SIGN_LEVEL 0x5 -#define RPC_PIPE_AUTH_SEAL_LEVEL 0x6 -#endif - /* Netlogon schannel auth type and level */ #define SCHANNEL_SIGN_SIGNATURE { 0x77, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 } #define SCHANNEL_SEAL_SIGNATURE { 0x77, 0x00, 0x7a, 0x00, 0xff, 0xff, 0x00, 0x00 } @@ -174,15 +149,6 @@ typedef struct rpc_hdr_auth_info { #define RPC_HDR_AUTH_LEN 8 -/* attached to the end of encrypted rpc requests and responses */ -/* RPC_AUTH_SCHANNEL_CHK */ -typedef struct rpc_auth_schannel_chk_info { - uint8 sig [8]; /* 77 00 7a 00 ff ff 00 00 */ - uint8 packet_digest[8]; /* checksum over the packet, MD5'ed with session key */ - uint8 seq_num[8]; /* verifier, seq num */ - uint8 confounder[8]; /* random 8-byte nonce */ -} RPC_AUTH_SCHANNEL_CHK; - typedef struct rpc_context { uint16 context_id; /* presentation context identifier. */ uint8 num_transfer_syntaxes; /* the number of syntaxes */ |