summaryrefslogtreecommitdiff
path: root/cifskey.h
diff options
context:
space:
mode:
authorAlastair Houghton <alastair@alastairs-place.net>2020-12-29 14:02:39 +0000
committerPavel Shilovsky <pshilov@microsoft.com>2021-04-06 12:20:18 -0700
commite461afd8cfa6d0781ae0c5c10e89b6ef1ca6da32 (patch)
tree23689ac06c11e56cc0a85283cbcf367a3eb75577 /cifskey.h
parent73008e3292e4d46fde3eab5d5f618886210ec4a1 (diff)
downloadcifs-utils-e461afd8cfa6d0781ae0c5c10e89b6ef1ca6da32.tar.gz
cifs-utils-e461afd8cfa6d0781ae0c5c10e89b6ef1ca6da32.tar.bz2
cifs-utils-e461afd8cfa6d0781ae0c5c10e89b6ef1ca6da32.zip
cifs.upcall: try to use container ipc/uts/net/pid/mnt/user namespaces
In certain scenarios (e.g. kerberos multimount), when a process does syscalls, the kernel sometimes has to query information or trigger some actions in userspace. To do so it calls the cifs.upcall binary with information on the process that triggered the syscall in the first place. ls(pid=10) ====> open("foo") ====> kernel that user doesn't have an SMB session, lets create one using his kerberos credential cache call cifs.upcall and ask for krb info for whoever owns pid=10 | cifs.upcall --pid 10 <=================+ ...gather info... return binary blob used when establishing SMB session ===================> kernel open SMB session, handle open() syscall ls <=================================== return open() result to ls On a system using containers, the kernel is still calling the host cifs.upcall and using the host configuration (for network, pid, etc). This patch changes the behaviour of cifs.upcall so that it uses the calling process namespaces (ls in the example) when doing its job. Note that the kernel still calls the binary in the host, but the binary will place itself the contexts of the calling process namespaces. This code makes use of (but shouldn't require) the following kernel config options and syscall flags: approx. year | introduced | config/flags ---------------+---------------- 2008 | CONFIG_NAMESPACES=y 2007 | CONFIG_UTS_NS=y 2020 | CONFIG_TIME_NS=y 2006 | CONFIG_IPC_NS=y 2007 | CONFIG_USER_NS 2008 | CONFIG_PID_NS=y 2007 | CONFIG_NET_NS=y 2007 | CONFIG_CGROUPS 2016 | CLONE_NEWCGROUP setns() flag Signed-off-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: Alastair Houghton <alastair@alastairs-place.net>
Diffstat (limited to 'cifskey.h')
0 files changed, 0 insertions, 0 deletions