Date: Fri, 21 Aug 2020 16:59:37 -0400 From: Vivek Goyal Message-ID: <20200821205937.GC905782@redhat.com> References: <20200724183812.19573-1-vgoyal@redhat.com> <20200724183812.19573-5-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Virtio-fs] [PATCH 4/5] fuse: For sending setattr in case of open(O_TRUNC) List-Id: Development discussions about virtio-fs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, virtio-fs-list On Fri, Aug 21, 2020 at 05:05:16PM +0200, Miklos Szeredi wrote: > On Fri, Jul 24, 2020 at 8:38 PM Vivek Goyal wrote: > > > > open(O_TRUNC) will not kill suid/sgid on server and fuse_open_in does not > > have information if caller has CAP_FSETID or not. > > > > So force sending setattr() which is called after open(O_TRUNC) so that > > server clears setuid/setgid. > > I don't really like the fact that we lose atomicity if > handle_killpriv_v2 is enabled. > > Let's just add a new flag to open as well. If a filesystem doesn't > want to add the complexity of handling that it can still just disable > atomic_o_trunc. Ok, will look into adding flag to open. Vivek