summaryrefslogtreecommitdiff
path: root/crypto/drbg.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-06-15 15:18:59 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2016-06-15 15:18:59 +0300
commitd0e13f5bbe4be7c8f27736fc40503dcec04b7de0 (patch)
treec63531a963fbe14bb83641c22185e8c5f72812c9 /crypto/drbg.c
parent30402c8949934fbaca07d9c20074d0d7a5a8385f (diff)
downloadlinux-d0e13f5bbe4be7c8f27736fc40503dcec04b7de0.tar.xz
ovl: fix uid/gid when creating over whiteout
Fix a regression when creating a file over a whiteout. The new file/directory needs to use the current fsuid/fsgid, not the ones from the mounter's credentials. The refcounting is a bit tricky: prepare_creds() sets an original refcount, override_creds() gets one more, which revert_cred() drops. So 1) we need to expicitly put the mounter's credentials when overriding with the updated one 2) we need to put the original ref to the updated creds (and this can safely be done before revert_creds(), since we'll still have the ref from override_creds()). Reported-by: Stephen Smalley <sds@tycho.nsa.gov> Fixes: 3fe6e52f0626 ("ovl: override creds with the ones from the superblock mounter") Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'crypto/drbg.c')
0 files changed, 0 insertions, 0 deletions