~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/smb/server/auth.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  *   Copyright (C) 2018 Samsung Electronics Co., Ltd.
  4  */
  5 
  6 #ifndef __AUTH_H__
  7 #define __AUTH_H__
  8 
  9 #include "ntlmssp.h"
 10 
 11 #ifdef CONFIG_SMB_SERVER_KERBEROS5
 12 #define AUTH_GSS_LENGTH         96
 13 #define AUTH_GSS_PADDING        0
 14 #else
 15 #define AUTH_GSS_LENGTH         74
 16 #define AUTH_GSS_PADDING        6
 17 #endif
 18 
 19 #define CIFS_HMAC_MD5_HASH_SIZE (16)
 20 #define CIFS_NTHASH_SIZE        (16)
 21 
 22 /*
 23  * Size of the ntlm client response
 24  */
 25 #define CIFS_AUTH_RESP_SIZE             24
 26 #define CIFS_SMB1_SIGNATURE_SIZE        8
 27 #define CIFS_SMB1_SESSKEY_SIZE          16
 28 
 29 #define KSMBD_AUTH_NTLMSSP      0x0001
 30 #define KSMBD_AUTH_KRB5         0x0002
 31 #define KSMBD_AUTH_MSKRB5       0x0004
 32 #define KSMBD_AUTH_KRB5U2U      0x0008
 33 
 34 struct ksmbd_session;
 35 struct ksmbd_conn;
 36 struct ksmbd_work;
 37 struct kvec;
 38 
 39 int ksmbd_crypt_message(struct ksmbd_work *work, struct kvec *iov,
 40                         unsigned int nvec, int enc);
 41 void ksmbd_copy_gss_neg_header(void *buf);
 42 int ksmbd_auth_ntlmv2(struct ksmbd_conn *conn, struct ksmbd_session *sess,
 43                       struct ntlmv2_resp *ntlmv2, int blen, char *domain_name,
 44                       char *cryptkey);
 45 int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob,
 46                                    int blob_len, struct ksmbd_conn *conn,
 47                                    struct ksmbd_session *sess);
 48 int ksmbd_decode_ntlmssp_neg_blob(struct negotiate_message *negblob,
 49                                   int blob_len, struct ksmbd_conn *conn);
 50 unsigned int
 51 ksmbd_build_ntlmssp_challenge_blob(struct challenge_message *chgblob,
 52                                    struct ksmbd_conn *conn);
 53 int ksmbd_krb5_authenticate(struct ksmbd_session *sess, char *in_blob,
 54                             int in_len, char *out_blob, int *out_len);
 55 int ksmbd_sign_smb2_pdu(struct ksmbd_conn *conn, char *key, struct kvec *iov,
 56                         int n_vec, char *sig);
 57 int ksmbd_sign_smb3_pdu(struct ksmbd_conn *conn, char *key, struct kvec *iov,
 58                         int n_vec, char *sig);
 59 int ksmbd_gen_smb30_signingkey(struct ksmbd_session *sess,
 60                                struct ksmbd_conn *conn);
 61 int ksmbd_gen_smb311_signingkey(struct ksmbd_session *sess,
 62                                 struct ksmbd_conn *conn);
 63 int ksmbd_gen_smb30_encryptionkey(struct ksmbd_conn *conn,
 64                                   struct ksmbd_session *sess);
 65 int ksmbd_gen_smb311_encryptionkey(struct ksmbd_conn *conn,
 66                                    struct ksmbd_session *sess);
 67 int ksmbd_gen_preauth_integrity_hash(struct ksmbd_conn *conn, char *buf,
 68                                      __u8 *pi_hash);
 69 int ksmbd_gen_sd_hash(struct ksmbd_conn *conn, char *sd_buf, int len,
 70                       __u8 *pi_hash);
 71 #endif
 72 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php