Changeset 988 for vendor/current/source3/include/auth.h
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/include/auth.h
r740 r988 22 22 #include "../auth/common_auth.h" 23 23 24 struct gensec_security; 25 24 26 struct extra_auth_info { 25 27 struct dom_sid user_sid; … … 37 39 struct security_token *security_token; 38 40 39 /* This is the final session key, as used by SMB signing, and 40 * (truncated to 16 bytes) encryption on the SAMR and LSA pipes 41 * when over ncacn_np. 42 * It is calculated by NTLMSSP from the session key in the info3, 43 * and is set from the Kerberos session key using 44 * krb5_auth_con_getremotesubkey(). 45 * 46 * Bottom line, it is not the same as the session keys in info3. 41 /* These are the intermediate session keys, as provided by a 42 * NETLOGON server and used by NTLMSSP to negotiate key 43 * exchange etc (which will provide the session_key in the 44 * auth_session_info). It is usually the same as the keys in 45 * the info3, but is a variable length structure here to allow 46 * it to be omitted if the auth module does not know it. 47 47 */ 48 48 49 DATA_BLOB user_session_key;49 DATA_BLOB session_key; 50 50 DATA_BLOB lm_session_key; 51 51 … … 65 65 66 66 char *unix_name; 67 }; 67 68 68 /* 69 * For performance reasons we keep an alpha_strcpy-sanitized version 70 * of the username around as long as the global variable current_user 71 * still exists. If we did not do keep this, we'd have to call72 * alpha_strcpy whenever we do a become_user(), potentially on every73 * smb request. See set_current_user_info. 74 */ 75 char *sanitized_username;76 };69 struct auth_context; 70 71 typedef NTSTATUS (*prepare_gensec_fn)(const struct auth_context *auth_context, 72 TALLOC_CTX *mem_ctx, 73 struct gensec_security **gensec_context); 74 75 typedef NTSTATUS (*make_auth4_context_fn)(const struct auth_context *auth_context, 76 TALLOC_CTX *mem_ctx, 77 struct auth4_context **auth4_context); 77 78 78 79 struct auth_context { … … 82 83 const char *challenge_set_by; 83 84 84 bool challenge_may_be_modified;85 86 struct auth_methods *challenge_set_method;87 85 /* What order are the various methods in? Try to stop it changing under us */ 88 86 struct auth_methods *auth_method_list; 89 87 90 NTSTATUS (*get_ntlm_challenge)(struct auth_context *auth_context, 91 uint8_t chal[8]); 92 NTSTATUS (*check_ntlm_password)(const struct auth_context *auth_context, 93 const struct auth_usersupplied_info *user_info, 94 struct auth_serversupplied_info **server_info); 95 NTSTATUS (*nt_status_squash)(NTSTATUS nt_status); 88 prepare_gensec_fn prepare_gensec; 89 make_auth4_context_fn make_auth4_context; 90 const char *forced_samba4_methods; 96 91 }; 97 92 … … 107 102 struct auth_serversupplied_info **server_info); 108 103 109 /* If you are using this interface, then you are probably 110 * getting something wrong. This interface is only for 111 * security=server, and makes a number of compromises to allow 112 * that. It is not compatible with being a PDC. */ 113 DATA_BLOB (*get_chal)(const struct auth_context *auth_context, 114 void **my_private_data, 115 TALLOC_CTX *mem_ctx); 116 104 /* Optional methods allowing this module to provide a way to get a gensec context and an auth4_context */ 105 prepare_gensec_fn prepare_gensec; 106 make_auth4_context_fn make_auth4_context; 117 107 /* Used to keep tabs on things like the cli for SMB server authentication */ 118 108 void *private_data; 109 110 uint32_t flags; 119 111 120 112 } auth_methods; … … 131 123 }; 132 124 133 struct auth_ntlmssp_state; 125 extern const struct gensec_security_ops gensec_ntlmssp3_server_ops; 126 127 /* Intent of use for session key. LSA and SAMR pipes use 16 bytes of session key when doing create/modify calls */ 128 enum session_key_use_intent { 129 KEY_USE_FULL = 0, 130 KEY_USE_16BYTES 131 }; 134 132 135 133 /* Changed from 1 -> 2 to add the logon_parameters field. */ 136 134 /* Changed from 2 -> 3 when we reworked many auth structures to use IDL or be in common with Samba4 */ 137 #define AUTH_INTERFACE_VERSION 3 135 /* Changed from 3 -> 4 when we reworked added the flags */ 136 #define AUTH_INTERFACE_VERSION 4 138 137 139 138 #include "auth/proto.h"
Note:
See TracChangeset
for help on using the changeset viewer.