函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\domain.c Create Date:2022-07-27 21:09:10
Last Modify:2022-05-23 20:14:46 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:moyo_assign_domain - Create a domain or a namespace.*@domainname: The name of domain.*@transit: True if transit to domain found or created.* Returns pointer to "struct tomoyo_domain_info" on success, NULL otherwise.* Caller holds tomoyo_read_lock().

函数原型:struct tomoyo_domain_info *tomoyo_assign_domain(const char *domainname, const bool transit)

返回类型:struct tomoyo_domain_info

参数:

类型参数名称
const char *domainname
const booltransit
527  struct tomoyo_domain_info e = {}
528  entry等于moyo_find_domain - Find a domain by the given name.*@domainname: The domainname to find.* Returns pointer to "struct tomoyo_domain_info" if found, NULL otherwise.* Caller holds tomoyo_read_lock().
529  bool created = false
531  如果entry
532  如果transit
543  返回:entry
547  如果strlen - Find the length of a string*@s: The string to be sized大于等于TOMOYO_EXEC_TMPSIZE减10或非tomoyo_correct_domain(domainname)则返回:NULL
555  如果transitmoyo_namespace_jump - Check for namespace jump.*@domainname: Name of domain.* Returns true if namespace differs, false otherwise.则返回:NULL
557  Namespace for this domain. Never NULL. 等于moyo_assign_namespace - Create a new namespace.*@domainname: Name of namespace to create.* Returns pointer to "struct tomoyo_policy_namespace" on success,* NULL otherwise.* Caller holds tomoyo_read_lock().
558  如果非 Namespace for this domain. Never NULL. 则返回:NULL
565  如果transit
566  domain等于moyo_domain - Get "struct tomoyo_domain_info" for current thread.* Returns pointer to "struct tomoyo_domain_info" for current thread.
568  Profile number to use. 等于 Profile number to use.
569  memcpy( Group numbers to use. , Group numbers to use. , Group numbers to use. 的长度)
571  Name of this domain. Never NULL. 等于tomoyo_get_name(domainname)
572  如果非 Name of this domain. Never NULL. 则返回:NULL
574  如果mutex_lock_interruptible( & tomoyo_policy_lock)则转到:out
576  entry等于moyo_find_domain - Find a domain by the given name.*@domainname: The domainname to find.* Returns pointer to "struct tomoyo_domain_info" if found, NULL otherwise.* Caller holds tomoyo_read_lock().
577  如果非entry
578  entry等于tomoyo_commit_ok( & e, e的长度)
579  如果entry
582  created = true
585  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
586  out :
587  moyo_put_name - Drop reference on "struct tomoyo_name".*@name: Pointer to "struct tomoyo_path_info". Maybe NULL.* Returns nothing.
588  如果entrytransit
589  如果created
595  granted = false
605  返回:entry
调用者
名称描述
tomoyo_find_next_domainmoyo_find_next_domain - Find a domain.*@bprm: Pointer to "struct linux_binprm".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_write_selfmoyo_write_self - write() for /sys/kernel/security/tomoyo/self_domain interface
tomoyo_write_domainmoyo_write_domain - Write domain policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().