On Fri, Aug 21, 2020 at 04:53:59PM +0200, Miklos Szeredi wrote:
> On Fri, Jul 24, 2020 at 8:38 PM Vivek Goyal <[email protected]> wrote:
> >
> > With handle_killpriv_v2, server needs to kill suid/sgid on truncate 
> > (setattr)
> > but it does not know if caller has CAP_FSETID or not. So like write, send
> > killpriv information in fuse_setattr_in and add a flag 
> > FUSE_SETATTR_KILL_PRIV.
> >
> > Signed-off-by: Vivek Goyal <[email protected]>
> 
> [...]
> 
> > +/**
> > + * Setattr flags
> > + * FUSE_SETATTR_KILL_PRIV: kill suid and sgid bits. sgid should be killed
> > + * only if group execute bit (S_IXGRP) is set. Meant to be used together
> > + * with FUSE_HANDLE_KILLPRIV_V2.
> > + */
> > +#define FUSE_SETATTR_KILL_PRIV (1 << 0)
> 
> Why not a FATTR_KILL_PRIV set in fuse_setattr_in.valid?

Yes, I should be able to do that. ATTR_KILL_PRIV is already there
which can map to FATTR_KILL_PRIV. Not sure why didn't I think of it.

Vivek

_______________________________________________
Virtio-fs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virtio-fs

Reply via email to