vhost_user_fs: Add the WRITE_KILL_PRIV write flag.

Add the WRITE_KILL_PRIV write flag, corresponding to
FUSE_WRITE_KILL_PRIV introduced in 7.31, and use to only remove the
setuid and setgid bits (by switching credentials) conditionally.

Signed-off-by: Sergio Lopez <slp@redhat.com>
This commit is contained in:
Sergio Lopez
2020-04-16 13:40:04 +02:00
committed by Rob Bradford
parent 0870028fde
commit b7faf4fdc1
4 changed files with 16 additions and 6 deletions
+2
View File
@@ -636,6 +636,7 @@ impl<F: FileSystem + Sync> Server<F> {
};
let delayed_write = write_flags & WRITE_CACHE != 0;
let kill_priv = write_flags & WRITE_KILL_PRIV != 0;
let data_reader = ZCReader(r);
@@ -648,6 +649,7 @@ impl<F: FileSystem + Sync> Server<F> {
offset,
owner,
delayed_write,
kill_priv,
flags,
) {
Ok(count) => {