Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\audit.c Create Date:2022-07-28 19:33:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_get_audit - Get audit mode.*@ns: Pointer to "struct tomoyo_policy_namespace".*@profile: Profile number.*@index: Index number of functionality.*@is_granted: True if granted log, false otherwise.

Proto:static bool tomoyo_get_audit(const struct tomoyo_policy_namespace *ns, const u8 profile, const u8 index, const struct tomoyo_acl_info *matched_acl, const bool is_granted)

Type:bool

Parameter:

TypeParameterName
const struct tomoyo_policy_namespace *ns
const u8profile
const u8index
const struct tomoyo_acl_info *matched_acl
const boolis_granted
333  category = tomoyo_index2category[index] + TOMOYO_MAX_MAC_INDEX
337  If Not External variable definitions. ********* Then Return false
339  p = tomoyo_profile(ns, profile)
340  If Length of "stuct list_head tomoyo_log". >= pref[TOMOYO_PREF_MAX_AUDIT_LOG] Then Return false
342  If is_granted && matched_acl && Maybe NULL. && One of values in "enum tomoyo_grant_log". != TOMOYO_GRANTLOG_AUTO Then Return One of values in "enum tomoyo_grant_log". == TOMOYO_GRANTLOG_YES
345  mode = config[index]
346  If mode == TOMOYO_CONFIG_USE_DEFAULT Then mode = config[category]
348  If mode == TOMOYO_CONFIG_USE_DEFAULT Then mode = default_config
350  If is_granted Then Return mode & TOMOYO_CONFIG_WANT_GRANT_LOG
352  Return mode & TOMOYO_CONFIG_WANT_REJECT_LOG
Caller
NameDescribe
tomoyo_write_log2moyo_write_log2 - Write an audit log.*@r: Pointer to "struct tomoyo_request_info".*@len: Buffer size needed for @fmt and @args.*@fmt: The printf()'s format string.*@args: va_list structure for @fmt.* Returns nothing.