Re: [PATCH v4 4/6] add statmount(2) syscall

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

 



> > +static int do_statmount(struct stmt_state *s)
> > +{
> > +	struct statmnt *sm = &s->sm;
> > +	struct mount *m = real_mount(s->mnt);
> > +	size_t copysize = min_t(size_t, s->bufsize, sizeof(*sm));
> > +	int err;
> > +
> > +	err = security_sb_statfs(s->mnt->mnt_root);
> > +	if (err)
> > +		return err;
> > +
> > +	if (!capable(CAP_SYS_ADMIN) &&
> > +	    !is_path_reachable(m, m->mnt.mnt_root, &s->root))
> > +		return -EPERM;
> 
> In order to be consistent with our typical access control ordering,
> please move the security_sb_statfs() call down to here, after the
> capability checks.

I've moved the security_sb_statfs() calls accordingly.




[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