lkml.org 
[lkml]   [2021]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] tracefs: Set all files to the same group ownership as the mount option
On Tue, 7 Dec 2021 09:04:30 -0800
Kalesh Singh <kaleshsingh@google.com> wrote:

> One thing that I missed before: There are files that can be generated
> after the mount, for instance when a new synthetic event is added new
> entries for that event are created under events/synthetic/ and when a
> new instance is created the new entries generated under instances/.
> These new entries don't honor the gid specified when mounting. Could
> we make it so that they also respect the specified gid?

They don't?

/me looks at code

Aw crap. I thought since I have this:

static int tracefs_parse_options(char *data, struct tracefs_mount_opts *opts)
{
[..]
case Opt_gid:
if (match_int(&args[0], &option))
return -EINVAL;
gid = make_kgid(current_user_ns(), option);
if (!gid_valid(gid))
return -EINVAL;

opts->gid = gid;

set_gid(tracefs_mount->mnt_root, gid);
[..]


That the new files would inherit the opts->gid. But I see that they do not.

I'll add that as a separate patch.

Thanks for bringing that to my attention.

-- Steve

\
 
 \ /
  Last update: 2021-12-07 18:10    [W:2.090 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site