Function report |
Source Code:security\apparmor\policy_ns.c |
Create Date:2022-07-28 19:54:11 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alloc_ns - allocate, initialize and return a new namespace*@prefix: parent namespace name (MAYBE NULL)*@name: a preallocated name (NOT NULL)* Returns: refcounted namespace or NULL on failure.
Proto:static struct aa_ns *alloc_ns(const char *prefix, const char *name)
Type:struct aa_ns
Parameter:
| Type | Parameter | Name |
|---|---|---|
| const char * | prefix | |
| const char * | name |
| 91 | ns = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 93 | If Not ns Then Return NULL |
| 95 | If Not aa_policy_init - initialize a policy structure*@policy: policy to initialize (NOT NULL)*@prefix: prefix name if any is required Then Go to fail_ns |
| 100 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & lock) |
| 101 | init_waitqueue_head( & wait) |
| 104 | unconfined = aa_alloc_profile - allocate, initialize and return a new profile*@hname: name of the profile (NOT NULL)*@gfp: allocation type* Returns: refcount profile or NULL on failure |
| 105 | If Not unconfined Then Go to fail_unconfined |
| 108 | flags |= fallback to ix on name lookup fail | don't allow changes/replacement | carries NS ref count | label unconfined only if all |
| 111 | dfa = aa_get_dfa - increment refcount on dfa @p*@dfa: dfa (MAYBE NULL)* Returns: pointer to @dfa if @dfa is NULL will return NULL* Requires: @dfa must be held with valid refcount when called |
| 117 | atomic_set( & uniq_null, 0) |
| 119 | aa_labelset_init( & labels) |
| 121 | Return ns |
| 123 | fail_unconfined : |
| 125 | fail_ns : |
| 127 | Return NULL |
| Name | Describe |
|---|---|
| __aa_create_ns | |
| aa_alloc_root_ns | aa_alloc_root_ns - allocate the root profile namespace* Returns: %0 on success else error |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |