]> git.baikalelectronics.ru Git - kernel.git/commit
ndr: fix translation in ndr_encode_posix_acl()
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 23 Aug 2021 15:13:54 +0000 (17:13 +0200)
committerSteve French <stfrench@microsoft.com>
Sat, 4 Sep 2021 04:29:45 +0000 (23:29 -0500)
commit2d77de336850c4d50b2b0123e1206db8a5112083
tree2ba6eecab7774ec3f9328c1681f5c35e63c9afd5
parenta313d636c2989260f75d9b403cc8324ca5010f80
ndr: fix translation in ndr_encode_posix_acl()

The sid_to_id() helper encodes raw ownership information suitable for
s*id handling. This is conceptually equivalent to reporting ownership
information via stat to userspace. In this case the consumer is ksmbd
instead of a regular user. So when encoding raw ownership information
suitable for s*id handling later we need to map the id up according to
the user namespace of ksmbd itself taking any idmapped mounts into
account.

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>
fs/ksmbd/ndr.c