Re: [RFC][PATCH] tracefs: Set all files to the same group ownership as the mount option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 7 Dec 2021 09:04:30 -0800
Kalesh Singh <kaleshsingh@xxxxxxxxxx> 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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux