| 1 | #include "idl_types.h"
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | Authentication IDL structures
|
|---|
| 5 |
|
|---|
| 6 | These are NOT public network structures, but it is helpful to define
|
|---|
| 7 | these things in IDL. They may change without ABI breakage or
|
|---|
| 8 | warning.
|
|---|
| 9 |
|
|---|
| 10 | */
|
|---|
| 11 |
|
|---|
| 12 | import "misc.idl", "security.idl", "lsa.idl", "krb5pac.idl";
|
|---|
| 13 | [
|
|---|
| 14 | pyhelper("librpc/ndr/py_auth.c"),
|
|---|
| 15 | helper("../librpc/ndr/ndr_auth.h"),
|
|---|
| 16 | helpstring("internal Samba authentication structures")
|
|---|
| 17 | ]
|
|---|
| 18 |
|
|---|
| 19 | interface auth
|
|---|
| 20 | {
|
|---|
| 21 | typedef [public] enum {
|
|---|
| 22 | SEC_AUTH_METHOD_UNAUTHENTICATED = 0,
|
|---|
| 23 | SEC_AUTH_METHOD_NTLM = 1,
|
|---|
| 24 | SEC_AUTH_METHOD_KERBEROS = 2
|
|---|
| 25 | } auth_method;
|
|---|
| 26 |
|
|---|
| 27 | /* This is the parts of the session_info that don't change
|
|---|
| 28 | * during local privilage and group manipulations */
|
|---|
| 29 | typedef [public] struct {
|
|---|
| 30 | [unique,charset(UTF8),string] char *account_name;
|
|---|
| 31 | [unique,charset(UTF8),string] char *domain_name;
|
|---|
| 32 |
|
|---|
| 33 | [unique,charset(UTF8),string] char *full_name;
|
|---|
| 34 | [unique,charset(UTF8),string] char *logon_script;
|
|---|
| 35 | [unique,charset(UTF8),string] char *profile_path;
|
|---|
| 36 | [unique,charset(UTF8),string] char *home_directory;
|
|---|
| 37 | [unique,charset(UTF8),string] char *home_drive;
|
|---|
| 38 | [unique,charset(UTF8),string] char *logon_server;
|
|---|
| 39 |
|
|---|
| 40 | NTTIME last_logon;
|
|---|
| 41 | NTTIME last_logoff;
|
|---|
| 42 | NTTIME acct_expiry;
|
|---|
| 43 | NTTIME last_password_change;
|
|---|
| 44 | NTTIME allow_password_change;
|
|---|
| 45 | NTTIME force_password_change;
|
|---|
| 46 |
|
|---|
| 47 | uint16 logon_count;
|
|---|
| 48 | uint16 bad_password_count;
|
|---|
| 49 |
|
|---|
| 50 | uint32 acct_flags;
|
|---|
| 51 |
|
|---|
| 52 | uint8 authenticated;
|
|---|
| 53 | } auth_user_info;
|
|---|
| 54 |
|
|---|
| 55 | /* This information is preserved only to assist torture tests */
|
|---|
| 56 | typedef [public] struct {
|
|---|
| 57 | /* Number SIDs from the DC netlogon validation info */
|
|---|
| 58 | uint32 num_dc_sids;
|
|---|
| 59 | [size_is(num_dc_sids)] dom_sid dc_sids[*];
|
|---|
| 60 | } auth_user_info_torture;
|
|---|
| 61 |
|
|---|
| 62 | typedef [public] struct {
|
|---|
| 63 | [unique,charset(UTF8),string] char *unix_name;
|
|---|
| 64 |
|
|---|
| 65 | /*
|
|---|
| 66 | * For performance reasons we keep an alpha_strcpy-sanitized version
|
|---|
| 67 | * of the username around as long as the global variable current_user
|
|---|
| 68 | * still exists. If we did not do keep this, we'd have to call
|
|---|
| 69 | * alpha_strcpy whenever we do a become_user(), potentially on every
|
|---|
| 70 | * smb request. See set_current_user_info in source3.
|
|---|
| 71 | */
|
|---|
| 72 | [unique,charset(UTF8),string] char *sanitized_username;
|
|---|
| 73 | } auth_user_info_unix;
|
|---|
| 74 |
|
|---|
| 75 | /* This is the interim product of the auth subsystem, before
|
|---|
| 76 | * privileges and local groups are handled */
|
|---|
| 77 | typedef [public] struct {
|
|---|
| 78 | uint32 num_sids;
|
|---|
| 79 | [size_is(num_sids)] dom_sid sids[*];
|
|---|
| 80 | auth_user_info *info;
|
|---|
| 81 | [noprint] DATA_BLOB user_session_key;
|
|---|
| 82 | [noprint] DATA_BLOB lm_session_key;
|
|---|
| 83 | } auth_user_info_dc;
|
|---|
| 84 |
|
|---|
| 85 | typedef [public] struct {
|
|---|
| 86 | security_token *security_token;
|
|---|
| 87 | security_unix_token *unix_token;
|
|---|
| 88 | auth_user_info *info;
|
|---|
| 89 | auth_user_info_unix *unix_info;
|
|---|
| 90 | [value(NULL), ignore] auth_user_info_torture *torture;
|
|---|
| 91 |
|
|---|
| 92 | /* This is the final session key, as used by SMB signing, and
|
|---|
| 93 | * (truncated to 16 bytes) encryption on the SAMR and LSA pipes
|
|---|
| 94 | * when over ncacn_np.
|
|---|
| 95 | * It is calculated by NTLMSSP from the session key in the info3,
|
|---|
| 96 | * and is set from the Kerberos session key using
|
|---|
| 97 | * krb5_auth_con_getremotesubkey().
|
|---|
| 98 | *
|
|---|
| 99 | * Bottom line, it is not the same as the session keys in info3.
|
|---|
| 100 | */
|
|---|
| 101 |
|
|---|
| 102 | [noprint] DATA_BLOB session_key;
|
|---|
| 103 |
|
|---|
| 104 | [value(NULL), ignore] cli_credentials *credentials;
|
|---|
| 105 | } auth_session_info;
|
|---|
| 106 |
|
|---|
| 107 | typedef [public] struct {
|
|---|
| 108 | auth_session_info *session_info;
|
|---|
| 109 | [noprint] DATA_BLOB exported_gssapi_credentials;
|
|---|
| 110 | } auth_session_info_transport;
|
|---|
| 111 | }
|
|---|