ms-nfs41-client/daemon
Olga Kornievskaia ab55e6e8c5 first stab at handling security irp
Basic handling of owner and group security query (no dacl).

Added new upcall for NFS41_ACL_QUERY (driver and daemon code).

Daemon, upon getting NFS41_ACL_QUERY first places a getattr that has
owner, group attribute request. We currently don't cache them!!!

Then, we parse nfs4name format (ie user@domain or group@domain)
into user and domain. We currently ignore domain part!!!

Then, we assume that whatever we are mapping is "known" locally
(ie LookupAccountName() api which retrieves a SID for a given name).
Mapping from name to SID can only be done in the userland. We then
copy the bytes via the upcall pipe to the kernel. If the received
user or group cant be mapped via LookupAccoundName(), we create a
well known null SID as the reply.

Kernel creates a security descriptor in the absolute-format and adds
owner and group sids to it. Important: RtlSetOwner/Group functions only
work with absolute-format security descriptor, however the reply to the
user needs to be in the self-relative format.

The way security query works is that it passes us a buffer to be filled
with the security context. However the user doesn't know how big the
buffer should be so, the user is allowed to pass a null buffer and have
the kernel return how much memory is needed. This leads to 2 security
queries => 2 NFS41_ACL_QUERY upcalls => 2 getattr rpcs... It should be
improved.

TODO:
- need to add caching of owner/group attributes for a file?
- need to add calls to LDAP for more general mapping?
- need to cache reply of the ACL if supplied length is 0?
2011-03-22 17:21:13 -04:00
..
acl.c first stab at handling security irp 2011-03-22 17:21:13 -04:00
callback_server.c define for nfs4stateid.other constant 2011-03-22 14:49:26 -04:00
callback_xdr.c define for nfs4stateid.other constant 2011-03-22 14:49:26 -04:00
daemon_debug.c first stab at handling security irp 2011-03-22 17:21:13 -04:00
daemon_debug.h adding sec flavor to upcall 2010-12-02 14:22:05 -05:00
from_kernel.h volume: daemon handles FileFsAttributeInformation 2010-10-12 10:35:51 -04:00
getattr.c ref counting for nfs41_root 2010-10-27 16:18:23 -04:00
idmap.c adding --noldap startup option 2010-12-02 17:43:12 -05:00
idmap.h idmap.c for ldap caching and configuration 2010-11-08 12:54:40 -05:00
list.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
lock.c recovery: use normal OPEN/LOCK on ERR_NO_GRACE 2010-12-06 14:29:32 -05:00
lookup.c OP_GETATTR queries OWNER and OWNER_GROUP 2011-03-08 13:34:25 -05:00
makefile fresh git tree for public release 2010-10-12 10:15:48 -04:00
mount.c mount: memory leak on path overflow 2011-01-10 15:16:17 -05:00
name_cache.c fixing rbtree patch 2010-12-07 16:50:45 -05:00
name_cache.h name cache: insert supports negative entries 2010-10-12 10:35:43 -04:00
namespace.c memory leak in nfs41_root_create 2010-12-02 14:22:06 -05:00
nfs41.h pnfs: update layout state on layoutget/return/recall 2011-03-22 14:49:24 -04:00
nfs41_callback.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_client.c send DESTROY_CLIENTID on unmount 2011-03-22 14:49:28 -04:00
nfs41_compound.c recovery: recover from BAD_STATEID errors 2011-03-08 11:04:38 -05:00
nfs41_compound.h recovery: avoid recursive state recovery 2010-12-06 14:29:01 -05:00
nfs41_const.h define for nfs4stateid.other constant 2011-03-22 14:49:26 -04:00
nfs41_daemon.c fix warnings for parse_cmdlineargs() 2010-12-10 14:51:44 -05:00
nfs41_ops.c send DESTROY_CLIENTID on unmount 2011-03-22 14:49:28 -04:00
nfs41_ops.h send DESTROY_CLIENTID on unmount 2011-03-22 14:49:28 -04:00
nfs41_rpc.c ignoring errors from BIND_CONN_TO_SESSION 2011-03-10 11:35:58 -05:00
nfs41_server.c propagate errors from nfs41_name_cache_create() 2011-01-10 15:16:17 -05:00
nfs41_session.c turning callback off for krb5p 2011-02-03 13:13:10 -05:00
nfs41_superblock.c query for aclsupport per superblock 2011-03-10 11:31:57 -05:00
nfs41_types.h define for nfs4stateid.other constant 2011-03-22 14:49:26 -04:00
nfs41_xdr.c send DESTROY_CLIENTID on unmount 2011-03-22 14:49:28 -04:00
nfs41_xdr.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
open.c pnfs: readwrite uses pnfs_layout_state 2011-03-22 14:49:24 -04:00
pnfs.h pnfs: new locking model for layouts 2011-03-22 14:49:25 -04:00
pnfs_debug.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
pnfs_device.c pnfs: readwrite uses pnfs_layout_state 2011-03-22 14:49:24 -04:00
pnfs_io.c pnfs: readwrite uses pnfs_layout_state 2011-03-22 14:49:24 -04:00
pnfs_layout.c define for nfs4stateid.other constant 2011-03-22 14:49:26 -04:00
readdir.c OP_GETATTR queries OWNER and OWNER_GROUP 2011-03-08 13:34:25 -05:00
readwrite.c pnfs: readwrite uses pnfs_layout_state 2011-03-22 14:49:24 -04:00
service.c warnings from WDK 6000 2010-10-19 11:17:29 -04:00
service.h first stab at nfsd as a service 2010-10-12 10:36:03 -04:00
setattr.c failing rename of onto an opened file 2011-03-22 14:49:28 -04:00
sources idmap.c for ldap caching and configuration 2010-11-08 12:54:40 -05:00
symlink.c ref counting for nfs41_root 2010-10-27 16:18:23 -04:00
tree.h replace rbtree implementation with tree.h from freebsd 2010-12-01 10:25:29 -05:00
upcall.c first stab at handling security irp 2011-03-22 17:21:13 -04:00
upcall.h first stab at handling security irp 2011-03-22 17:21:13 -04:00
util.c recovery: use normal OPEN/LOCK on ERR_NO_GRACE 2010-12-06 14:29:32 -05:00
util.h adding version to the upcall 2010-11-08 12:54:42 -05:00
volume.c returning acl support to driver 2011-03-22 17:21:12 -04:00