summaryrefslogtreecommitdiff
path: root/fs/overlayfs/super.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2016-07-13 15:00:14 (GMT)
committerMiklos Szeredi <mszeredi@redhat.com>2016-07-29 10:05:24 (GMT)
commit500cac3ccee65526d5075da3af2674101305bf8c (patch)
treebf22531069f9cb4cce94431dc3aa28f4cbe5820d /fs/overlayfs/super.c
parente29841a0ab3d03e77313abd8fb4c16e80fb26e29 (diff)
downloadlinux-500cac3ccee65526d5075da3af2674101305bf8c.tar.xz
ovl: append MAY_READ when diluting write checks
Right now we remove MAY_WRITE/MAY_APPEND bits from mask if realfile is on lower/. This is done as files on lower will never be written and will be copied up. But to copy up a file, mounter should have MAY_READ permission otherwise copy up will fail. So set MAY_READ in mask when MAY_WRITE is reset. Dan Walsh noticed this when he did access(lowerfile, W_OK) and it returned True (context mounts) but when he tried to actually write to file, it failed as mounter did not have permission on lower file. [SzM] don't set MAY_READ if only MAY_APPEND is set without MAY_WRITE; this won't trigger a copy-up. Reported-by: Dan Walsh <dwalsh@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/super.c')
0 files changed, 0 insertions, 0 deletions