ms-nfs41-client/daemon
Casey Bodley cd1251758d idmap.c for ldap caching and configuration
struct idmap_context contains configuration data (struct idmap_config), a cache for users, and a cache for groups.  idmap_context is declared in idmap.c, and only available as an opaque pointer (nfs41_idmapper) elsewhere.  similarly, Winldap.h is only included by idmap.c, and not needed elsewhere

nfs41_idmap_create() allocates the idmap_context, loads the configuration from file, and calls ldap_init().  it does not call ldap_connect(); we'll still be able to start the daemon if ldap isn't configured, or the ldap server is down.  calling ldap_connect() is optional, as any ldap operation that requires a connection will establish it internally.  this behavior, along with the LDAP_OPT_AUTO_RECONNECT option (defaults to on), means that we shouldn't have to maintain a separate connection for each thread

nfs41_idmap_*() functions return windows errors codes.  LDAP_RETCODEs are mapped to windows errors with LdapMapErrorToWin32()

the user and group caches share a common generic interface in struct idmap_cache, which uses a linked list for storage, and protects access with a SRWLOCK.  expiration of cache entries can be adjusted by the config option 'cache_ttl'

struct config_option g_options[] is a table of available config options and their default values.  this patch adds a 'ms-nfs41-idmap.conf' file with all possible options set to default values, and commented out.  the daemon expects to find this file under c:\etc\, and won't start if it can't be opened or parsed

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-11-08 12:54:40 -05:00
..
callback_server.c adding refcount on nfs41_root to callback server 2010-11-02 15:54:50 -04:00
callback_xdr.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
daemon_debug.c symlink: daemon parses SYMLINK upcall 2010-10-14 12:42:33 -04:00
daemon_debug.h daemon: logging to files 2010-10-12 10:36:04 -04: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 idmap.c for ldap caching and configuration 2010-11-08 12:54:40 -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 ref counting for nfs41_root 2010-10-27 16:18:23 -04:00
lookup.c adding tags to compounds 2010-10-27 15:00:12 -04:00
makefile fresh git tree for public release 2010-10-12 10:15:48 -04:00
mount.c ref counting for nfs41_root 2010-10-27 16:18:23 -04:00
name_cache.c adding tags to compounds 2010-10-27 15:00:12 -04:00
name_cache.h name cache: insert supports negative entries 2010-10-12 10:35:43 -04:00
namespace.c storing backpointer to nfs41_root from nfs41_client 2010-11-02 15:17:22 -04:00
nfs41.h storing backpointer to nfs41_root from nfs41_client 2010-11-02 15:17:22 -04:00
nfs41_callback.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_client.c each mount has unique client_owner 2010-10-27 15:21:57 -04:00
nfs41_compound.c cosmetic: cleaning up small functions 2010-11-05 15:10:20 -04:00
nfs41_compound.h adding tags to compounds 2010-10-27 15:00:12 -04:00
nfs41_const.h symlink: limit symlink depth to avoid following cyclical links 2010-10-15 17:24:04 -04:00
nfs41_daemon.c making upcall_marshal void 2010-11-02 14:40:52 -04:00
nfs41_ops.c adding tags to compounds 2010-10-27 15:00:12 -04:00
nfs41_ops.h readdir cookie is stored with nfs41_open_state 2010-10-27 15:25:27 -04:00
nfs41_rpc.c daemon: logging to files 2010-10-12 10:36:04 -04:00
nfs41_server.c fix for warning C4204: non-constant aggregate initializer 2010-11-08 12:29:47 -05:00
nfs41_session.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
nfs41_superblock.c cosmetic: cleaning up small functions 2010-11-05 15:10:20 -04:00
nfs41_types.h setting SUPPORTS_HARD_LINKS if link_support is enabled 2010-11-04 11:51:26 -04:00
nfs41_xdr.c setting SUPPORTS_HARD_LINKS if link_support is enabled 2010-11-04 11:51:26 -04:00
nfs41_xdr.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
open.c removed unnecessary free_open_state() function 2010-11-02 14:31:12 -04:00
pnfs.h warnings from WDK 6000 2010-10-19 11:17:29 -04:00
pnfs_debug.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
pnfs_device.c cosmetic: cleaning up small functions 2010-11-05 15:10:20 -04:00
pnfs_io.c pnfs: check status of pnfs_file_device_io_unit() 2010-10-12 12:11:49 -04:00
pnfs_layout.c cosmetic: cleaning up small functions 2010-11-05 15:10:20 -04:00
rbtree.c fresh git tree for public release 2010-10-12 10:15:48 -04:00
rbtree.h fresh git tree for public release 2010-10-12 10:15:48 -04:00
readdir.c fix for warning C4204: non-constant aggregate initializer 2010-11-08 12:29:47 -05:00
readwrite.c ref counting for nfs41_root 2010-10-27 16:18:23 -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 [cosmetic] bumping debug level for remove_unsupported_attrs 2010-11-02 15:55:38 -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
upcall.c making upcall_marshal void 2010-11-02 14:40:52 -04:00
upcall.h making upcall_marshal void 2010-11-02 14:40:52 -04:00
util.c warnings from WDK 6000 2010-10-19 11:17:29 -04:00
util.h max_path: get_name() avoids copying from upcall buffer 2010-10-12 10:36:10 -04:00
volume.c setting SUPPORTS_HARD_LINKS if link_support is enabled 2010-11-04 11:51:26 -04:00