Changeset 988 for vendor/current/auth/common_auth.h
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/auth/common_auth.h
r740 r988 18 18 */ 19 19 20 #ifndef AUTH_COMMON_AUTH_H 21 #define AUTH_COMMON_AUTH_H 22 23 #include "librpc/gen_ndr/auth.h" 24 20 25 #define USER_INFO_CASE_INSENSITIVE_USERNAME 0x01 /* username may be in any case */ 21 26 #define USER_INFO_CASE_INSENSITIVE_PASSWORD 0x02 /* password may be in any case */ 22 27 #define USER_INFO_DONT_CHECK_UNIX_ACCOUNT 0x04 /* don't check unix account status */ 23 #define USER_INFO_INTERACTIVE_LOGON 0x08 /* don't check unix account status */ 28 #define USER_INFO_INTERACTIVE_LOGON 0x08 /* Interactive logon */ 29 #define USER_INFO_LOCAL_SAM_ONLY 0x10 /* Only authenticate against the local SAM, do not map missing passwords to NO_SUCH_USER */ 30 #define USER_INFO_INFO3_AND_NO_AUTHZ 0x20 /* Only fill in server_info->info3 and do not do any authorization steps */ 24 31 25 32 enum auth_password_state { … … 28 35 AUTH_PASSWORD_RESPONSE = 3 29 36 }; 37 38 #define AUTH_SESSION_INFO_DEFAULT_GROUPS 0x01 /* Add the user to the default world and network groups */ 39 #define AUTH_SESSION_INFO_AUTHENTICATED 0x02 /* Add the user to the 'authenticated users' group */ 40 #define AUTH_SESSION_INFO_SIMPLE_PRIVILEGES 0x04 /* Use a trivial map between users and privilages, rather than a DB */ 41 #define AUTH_SESSION_INFO_UNIX_TOKEN 0x08 /* The returned token must have the unix_token and unix_info elements provided */ 30 42 31 43 struct auth_usersupplied_info … … 60 72 uint32_t flags; 61 73 }; 74 75 struct auth_method_context; 76 struct tevent_context; 77 struct imessaging_context; 78 struct loadparm_context; 79 struct ldb_context; 80 struct smb_krb5_context; 81 82 #define AUTH_METHOD_LOCAL_SAM 0x01 83 84 struct auth4_context { 85 struct { 86 /* Who set this up in the first place? */ 87 const char *set_by; 88 89 DATA_BLOB data; 90 } challenge; 91 92 /* methods, in the order they should be called */ 93 struct auth_method_context *methods; 94 95 /* the event context to use for calls that can block */ 96 struct tevent_context *event_ctx; 97 98 /* the messaging context which can be used by backends */ 99 struct imessaging_context *msg_ctx; 100 101 /* loadparm context */ 102 struct loadparm_context *lp_ctx; 103 104 /* SAM database for this local machine - to fill in local groups, or to authenticate local NTLM users */ 105 struct ldb_context *sam_ctx; 106 107 /* Private data for the callbacks on this auth context */ 108 void *private_data; 109 110 NTSTATUS (*check_ntlm_password)(struct auth4_context *auth_ctx, 111 TALLOC_CTX *mem_ctx, 112 const struct auth_usersupplied_info *user_info, 113 void **server_returned_info, 114 DATA_BLOB *nt_session_key, DATA_BLOB *lm_session_key); 115 116 NTSTATUS (*get_ntlm_challenge)(struct auth4_context *auth_ctx, uint8_t chal[8]); 117 118 NTSTATUS (*set_ntlm_challenge)(struct auth4_context *auth_ctx, const uint8_t chal[8], const char *set_by); 119 120 NTSTATUS (*generate_session_info)(struct auth4_context *auth_context, 121 TALLOC_CTX *mem_ctx, 122 void *server_returned_info, 123 const char *original_user_name, 124 uint32_t session_info_flags, 125 struct auth_session_info **session_info); 126 127 NTSTATUS (*generate_session_info_pac)(struct auth4_context *auth_ctx, 128 TALLOC_CTX *mem_ctx, 129 struct smb_krb5_context *smb_krb5_context, 130 DATA_BLOB *pac_blob, 131 const char *principal_name, 132 const struct tsocket_address *remote_address, 133 uint32_t session_info_flags, 134 struct auth_session_info **session_info); 135 }; 136 137 #endif
Note:
See TracChangeset
for help on using the changeset viewer.