/* * This is a userspace ABI to communicate data between ksmbd and user IPC * daemon using netlink. This is added to track and cache user account DB * and share configuration info from userspace. * * - KSMBD_EVENT_HEARTBEAT_REQUEST(ksmbd_heartbeat) * This event is to check whether user IPC daemon is alive. If user IPC * daemon is dead, ksmbd keep existing connection till disconnecting and * new connection will be denied. * * - KSMBD_EVENT_STARTING_UP(ksmbd_startup_request) * This event is to receive the information that initializes the ksmbd * server from the user IPC daemon and to start the server. The global * section parameters are given from smb.conf as initialization * information. * * - KSMBD_EVENT_SHUTTING_DOWN(ksmbd_shutdown_request) * This event is to shutdown ksmbd server. * * - KSMBD_EVENT_LOGIN_REQUEST/RESPONSE(ksmbd_login_request/response) * This event is to get user account info to user IPC daemon. * * - KSMBD_EVENT_SHARE_CONFIG_REQUEST/RESPONSE(ksmbd_share_config_request/response) * This event is to get net share configuration info. * * - KSMBD_EVENT_TREE_CONNECT_REQUEST/RESPONSE(ksmbd_tree_connect_request/response) * This event is to get session and tree connect info. * * - KSMBD_EVENT_TREE_DISCONNECT_REQUEST(ksmbd_tree_disconnect_request) * This event is to send tree disconnect info to user IPC daemon. * * - KSMBD_EVENT_LOGOUT_REQUEST(ksmbd_logout_request) * This event is to send logout request to user IPC daemon. * * - KSMBD_EVENT_RPC_REQUEST/RESPONSE(ksmbd_rpc_command) * This event is to make DCE/RPC request like srvsvc, wkssvc, lsarpc, * samr to be processed in userspace. * * - KSMBD_EVENT_SPNEGO_AUTHEN_REQUEST/RESPONSE(ksmbd_spnego_authen_request/response) * This event is to make kerberos authentication to be processed in * userspace. * * - KSMBD_EVENT_LOGIN_REQUEST_EXT/RESPONSE_EXT(ksmbd_login_request_ext/response_ext) * This event is to get user account extension info to user IPC daemon.
*/
/* * IPC request for ksmbd server startup
*/ struct ksmbd_startup_request {
__u32 flags; /* Flags for global config */
__s32 signing; /* Signing enabled */
__s8 min_prot[16]; /* The minimum SMB protocol version */
__s8 max_prot[16]; /* The maximum SMB protocol version */
__s8 netbios_name[16];
__s8 work_group[64]; /* Workgroup */
__s8 server_string[64]; /* Server string */
__u16 tcp_port; /* tcp port */
__u16 ipc_timeout; /* * specifies the number of seconds * server will wait for the userspace to * reply to heartbeat frames.
*/
__u32 deadtime; /* Number of minutes of inactivity */
__u32 file_max; /* Limits the maximum number of open files */
__u32 smb2_max_write; /* MAX write size */
__u32 smb2_max_read; /* MAX read size */
__u32 smb2_max_trans; /* MAX trans size */
__u32 share_fake_fscaps; /* * Support some special application that * makes QFSINFO calls to check whether * we set the SPARSE_FILES bit (0x40).
*/
__u32 sub_auth[3]; /* Subauth value for Security ID */
__u32 smb2_max_credits; /* MAX credits */
__u32 smbd_max_io_size; /* smbd read write size */
__u32 max_connections; /* Number of maximum simultaneous connections */
__s8 bind_interfaces_only;
__u32 max_ip_connections; /* Number of maximum connection per ip address */
__s8 reserved[499]; /* Reserved room */
__u32 ifc_list_sz; /* interfaces list size */
__s8 ____payload[];
} __packed;
/* * IPC Request structure to disconnect tree connection.
*/ struct ksmbd_tree_disconnect_request {
__u64 session_id; /* session id */
__u64 connect_id; /* tree connection id */
__u32 reserved[16]; /* Reserved room */
};
/* * IPC Response structure to logout user account.
*/ struct ksmbd_logout_request {
__s8 account[KSMBD_REQ_MAX_ACCOUNT_NAME_SZ]; /* user account name */
__u32 account_flags;
__u32 reserved[16]; /* Reserved room */
};
/* * RPC command structure to send rpc request like srvsvc or wkssvc to * IPC user daemon.
*/ struct ksmbd_rpc_command {
__u32 handle;
__u32 flags;
__u32 payload_sz;
__u8 payload[];
};
/* * IPC Request Kerberos authentication
*/ struct ksmbd_spnego_authen_request {
__u32 handle;
__u16 spnego_blob_len; /* the length of spnego_blob */
__u8 spnego_blob[]; /* * the GSS token from SecurityBuffer of * SMB2 SESSION SETUP request
*/
};
/* * Response data which includes the GSS token and the session key generated by * user daemon.
*/ struct ksmbd_spnego_authen_response {
__u32 handle; struct ksmbd_login_response login_response; /* * the login response with * a user identified by the * GSS token from a client
*/
__u16 session_key_len; /* the length of the session key */
__u16 spnego_blob_len; /* * the length of the GSS token which will be * stored in SecurityBuffer of SMB2 SESSION * SETUP response
*/
__u8 payload[]; /* session key + AP_REP */
};
/* * This also used as NETLINK attribute type value. * * NOTE: * Response message type value should be equal to * request message type value + 1.
*/ enum ksmbd_event {
KSMBD_EVENT_UNSPEC = 0,
KSMBD_EVENT_HEARTBEAT_REQUEST,
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.