summaryrefslogtreecommitdiffstats
path: root/mm/frontswap.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2020-10-09 14:15:09 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2020-11-11 17:22:33 +0100
commit3179216135ec09825d7c7875580951a6e69dc5df (patch)
treedd0b2cbe15cfddb6747a1078fbd434b3b58705fa /mm/frontswap.c
parentb866739596ae3c3c60c43f1cf04a516c5aa20fd1 (diff)
downloadlinux-stable-3179216135ec09825d7c7875580951a6e69dc5df.tar.gz
linux-stable-3179216135ec09825d7c7875580951a6e69dc5df.tar.bz2
linux-stable-3179216135ec09825d7c7875580951a6e69dc5df.zip
fuse: setattr should set FATTR_KILL_SUIDGID
If fc->handle_killpriv_v2 is enabled, we expect file server to clear suid/sgid/security.capbility upon chown/truncate/write as appropriate. Upon truncate (ATTR_SIZE), suid/sgid are cleared only if caller does not have CAP_FSETID. File server does not know whether caller has CAP_FSETID or not. Hence set FATTR_KILL_SUIDGID upon truncate to let file server know that caller does not have CAP_FSETID and it should kill suid/sgid as appropriate. On chown (ATTR_UID/ATTR_GID) suid/sgid need to be cleared irrespective of capabilities of calling process, so set FATTR_KILL_SUIDGID unconditionally in that case. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'mm/frontswap.c')
0 files changed, 0 insertions, 0 deletions