[Virtio-fs] [PATCH 3/5] fuse: Add a flag FUSE_SETATTR_KILL_PRIV

Miklos Szeredi miklos at szeredi.hu
Fri Aug 21 14:53:59 UTC 2020


On Fri, Jul 24, 2020 at 8:38 PM Vivek Goyal <vgoyal at redhat.com> 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 <vgoyal at redhat.com>

[...]

> +/**
> + * 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?

Thanks,
Miklos




More information about the Virtio-fs mailing list