[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegvxb9bfbBpoa6R8UENwL9m6BSU84kr50PBSssUJYc8wFQ@mail.gmail.com>
Date: Fri, 5 Feb 2021 16:28:26 +0100
From: Miklos Szeredi <miklos@...redi.hu>
To: Vivek Goyal <vgoyal@...hat.com>
Cc: Miklos Szeredi <mszeredi@...hat.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/18] ovl: stack miscattr
On Fri, Feb 5, 2021 at 4:25 PM Miklos Szeredi <miklos@...redi.hu> wrote:
>
> On Fri, Feb 5, 2021 at 12:49 AM Vivek Goyal <vgoyal@...hat.com> wrote:
>
> > > +int ovl_miscattr_set(struct dentry *dentry, struct miscattr *ma)
> > > +{
> > > + struct inode *inode = d_inode(dentry);
> > > + struct dentry *upperdentry;
> > > + const struct cred *old_cred;
> > > + int err;
> > > +
> > > + err = ovl_want_write(dentry);
> > > + if (err)
> > > + goto out;
> > > +
> > > + err = ovl_copy_up(dentry);
> > > + if (!err) {
> > > + upperdentry = ovl_dentry_upper(dentry);
> > > +
> > > + old_cred = ovl_override_creds(inode->i_sb);
> > > + /* err = security_file_ioctl(real.file, cmd, arg); */
> >
> > Is this an comment intended?
>
> I don't remember, but I guess not. Will fix and test.
Sorry, yes, problem is that there's no file pointer available at this point.
Fix is probably to introduce security_inode_miscattr_perm() hook.
Thanks,
Miklos
Powered by blists - more mailing lists