Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/include/auth.h

    r740 r988  
    2222#include "../auth/common_auth.h"
    2323
     24struct gensec_security;
     25
    2426struct extra_auth_info {
    2527        struct dom_sid user_sid;
     
    3739        struct security_token *security_token;
    3840
    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.
    4747         */
    4848
    49         DATA_BLOB user_session_key;
     49        DATA_BLOB session_key;
    5050        DATA_BLOB lm_session_key;
    5151
     
    6565
    6666        char *unix_name;
     67};
    6768
    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 call
    72          * alpha_strcpy whenever we do a become_user(), potentially on every
    73          * smb request. See set_current_user_info.
    74          */
    75         char *sanitized_username;
    76 };
     69struct auth_context;
     70
     71typedef NTSTATUS (*prepare_gensec_fn)(const struct auth_context *auth_context,
     72                                      TALLOC_CTX *mem_ctx,
     73                                      struct gensec_security **gensec_context);
     74
     75typedef NTSTATUS (*make_auth4_context_fn)(const struct auth_context *auth_context,
     76                                          TALLOC_CTX *mem_ctx,
     77                                          struct auth4_context **auth4_context);
    7778
    7879struct auth_context {
     
    8283        const char *challenge_set_by;
    8384
    84         bool challenge_may_be_modified;
    85 
    86         struct auth_methods *challenge_set_method;
    8785        /* What order are the various methods in?   Try to stop it changing under us */
    8886        struct auth_methods *auth_method_list; 
    8987
    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;
    9691};
    9792
     
    107102                         struct auth_serversupplied_info **server_info);
    108103
    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;
    117107        /* Used to keep tabs on things like the cli for SMB server authentication */
    118108        void *private_data;
     109
     110        uint32_t flags;
    119111
    120112} auth_methods;
     
    131123};
    132124
    133 struct auth_ntlmssp_state;
     125extern 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 */
     128enum session_key_use_intent {
     129        KEY_USE_FULL = 0,
     130        KEY_USE_16BYTES
     131};
    134132
    135133/* Changed from 1 -> 2 to add the logon_parameters field. */
    136134/* 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
    138137
    139138#include "auth/proto.h"
Note: See TracChangeset for help on using the changeset viewer.