lkml.org 
[lkml]   [2022]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v10 24/27] ima: Introduce securityfs file to activate an IMA namespace
From

On 2/23/22 12:12, Mimi Zohar wrote:
> On Wed, 2022-02-23 at 12:08 -0500, Stefan Berger wrote:
>> On 2/23/22 08:54, Mimi Zohar wrote:
>>> On Tue, 2022-02-01 at 15:37 -0500, Stefan Berger wrote:
>>>
>>>> int ima_fs_ns_init(struct user_namespace *user_ns, struct dentry *root)
>>>> {
>>>> struct ima_namespace *ns = ima_ns_from_user_ns(user_ns);
>>>> @@ -531,6 +596,12 @@ int ima_fs_ns_init(struct user_namespace *user_ns, struct dentry *root)
>>>> }
>>>> }
>>>>
>>>> + if (ns != &init_ima_ns) {
>>>> + ret = ima_fs_add_ns_files(ima_dir);
>>>> + if (ret)
>>>> + goto out;
>>>> + }
>>>> +
>>> In all other cases, the securityfs files are directly created in
>>> ima_fs_ns_init(). What is different about "active" that a new
>>> function is defined?
>>
>> It was meant as a function to create namespace-specific files, if more
>> were to come along. I can move the code from ima_fs_add_ns_files() into
>> this function if you want.
> Perhaps defer defining a new function until that happens.

I moved the code out of this function into ima_fs_ns_init() now.



\
 
 \ /
  Last update: 2022-02-23 23:31    [W:0.144 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site