linux/fs/ksmbd
Hyunchul Lee af34983e83 ksmbd: add user namespace support
For user namespace support, call vfs functions
with struct user_namespace got from struct path.

This patch have been tested mannually as below.

Create an id-mapped mount using the mount-idmapped utility
(https://github.com/brauner/mount-idmapped).
$ mount-idmapped --map-mount b:1003:1002:1 /home/foo <EXPORT DIR>/foo
(the user, "foo" is 1003, and the user "bar" is 1002).

And  mount the export directory using cifs with the user, "bar".
succeed to create/delete/stat/read/write files and directory in
the <EXPORT DIR>/foo. But fail with a bind mount for /home/foo.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2021-07-02 16:27:10 +09:00
..
mgmt ksmbd: reorder and document on-disk and netlink structures in headers 2021-06-30 14:47:24 +09:00
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: reorder and document on-disk and netlink structures in headers 2021-06-30 14:47:24 +09:00
ksmbd_spnego_negtokeninit.asn1
ksmbd_spnego_negtokentarg.asn1
ksmbd_work.c ksmbd: reorder and document on-disk and netlink structures in headers 2021-06-30 14:47:24 +09:00
ksmbd_work.h ksmbd: replace request and respone buffer macro with inline functions 2021-06-29 15:06:03 +09:00
Makefile
misc.c
misc.h
ndr.c ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
ndr.h ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
nterr.h
ntlmssp.h
oplock.c ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
oplock.h ksmbd: remove SMB1 oplock level macros 2021-06-30 14:43:51 +09:00
server.c
server.h ksmbd: change server config string index to enumeration 2021-06-30 14:44:01 +09:00
smb2misc.c ksmbd: Relax credit_charge check in smb2_validate_credit_charge() 2021-06-29 15:06:23 +09:00
smb2ops.c ksmbd: reorder and document on-disk and netlink structures in headers 2021-06-30 14:47:24 +09:00
smb2pdu.c ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
smb2pdu.h
smb_common.c ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
smb_common.h ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
smbacl.c ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
smbacl.h ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
smbfsctl.h
smbstatus.h
transport_ipc.c ksmbd: remove macros in transport_ipc.c 2021-06-29 15:05:34 +09:00
transport_ipc.h
transport_rdma.c ksmbd: replace SMB_DIRECT_TRANS macro with inline function 2021-06-29 15:05:59 +09:00
transport_rdma.h
transport_tcp.c
transport_tcp.h
unicode.c
unicode.h
uniupr.h
vfs_cache.c ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
vfs_cache.h ksmbd: opencode to remove ATTR_FP macro 2021-06-29 15:07:56 +09:00
vfs.c ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
vfs.h ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
xattr.h ksmbd: reorder and document on-disk and netlink structures in headers 2021-06-30 14:47:24 +09:00