mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
475d6f9880
When transferring ownership information to the client the k*ids are translated into raw *ids before they are sent over the wire. The function currently erroneously translates the k*ids according to the mount's idmapping. Instead, reporting the owning *ids to userspace the underlying k*ids need to be mapped up in the caller's user namespace. This is how stat() works. The caller in this instance is ksmbd itself and ksmbd always runs in the initial user namespace. Translate according to that. The idmapping of the mount is already taken into account by the lower filesystem and so kstat->*id will contain the mapped k*ids. Switch to from_k*id_munged() which ensures that the overflow*id is returned instead of the (*id_t)-1 when the k*id can't be translated. Cc: Steve French <stfrench@microsoft.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Namjae Jeon <namjae.jeon@samsung.com> Cc: Hyunchul Lee <hyc.lee@gmail.com> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: linux-cifs@vger.kernel.org Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> |
||
---|---|---|
.. | ||
mgmt | ||
asn1.c | ||
asn1.h | ||
auth.c | ||
auth.h | ||
connection.c | ||
connection.h | ||
crypto_ctx.c | ||
crypto_ctx.h | ||
glob.h | ||
Kconfig | ||
ksmbd_netlink.h | ||
ksmbd_spnego_negtokeninit.asn1 | ||
ksmbd_spnego_negtokentarg.asn1 | ||
ksmbd_work.c | ||
ksmbd_work.h | ||
Makefile | ||
misc.c | ||
misc.h | ||
ndr.c | ||
ndr.h | ||
nterr.h | ||
ntlmssp.h | ||
oplock.c | ||
oplock.h | ||
server.c | ||
server.h | ||
smb2misc.c | ||
smb2ops.c | ||
smb2pdu.c | ||
smb2pdu.h | ||
smb_common.c | ||
smb_common.h | ||
smbacl.c | ||
smbacl.h | ||
smbfsctl.h | ||
smbstatus.h | ||
transport_ipc.c | ||
transport_ipc.h | ||
transport_rdma.c | ||
transport_rdma.h | ||
transport_tcp.c | ||
transport_tcp.h | ||
unicode.c | ||
unicode.h | ||
uniupr.h | ||
vfs_cache.c | ||
vfs_cache.h | ||
vfs.c | ||
vfs.h | ||
xattr.h |