Commit graph

119 commits

Author SHA1 Message Date
Casey Bodley
62fa6176be symlink: FSCTL_SET_REPARSE_POINT
driver handles FSCTL_SET_REPARSE_POINT by sending a symlink set upcall
daemon handles symlink set upcall by calling nfs41_create()

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-14 12:42:36 -04:00
Casey Bodley
08c2618551 symlink: FSCTL_GET_REPARSE_POINT
driver handles FSCTL_GET_REPARSE_POINT by sending a symlink query upcall
daemon handles symlink query upcall by calling nfs41_readlink()

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-14 12:42:34 -04:00
Casey Bodley
80d979ace6 symlink: driver marshalls new SYMLINK upcall
new NFS41_SYMLINK upcall and associated data in nfs41_updowncall_entry.u.Symlink
supports both setting and querying the symlink target.  if Symlink.set is TRUE, Symlink.target is marshalled into the upcall.  if Symlink.set is FALSE, Symlink.target is read from the downcall

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-14 12:42:32 -04:00
Casey Bodley
66d4ea8e0b max_path: static buffer for symlink path
added nfs41_abs_path symlink to struct open_upcall_args. we can't write the symlink target back to args->path anymore, since it's a pointer into the upcall buffer

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 10:36:11 -04:00
Casey Bodley
feb441ab4d path: driver marshalls upcall strings as ansi
marshall_unicode_as_ansi() calls RtlUnicodeStringToAnsiString() to convert the string directly into the upcall buffer

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 10:36:09 -04:00
Casey Bodley
a0cda354be first stab at impersonation 2010-10-12 10:36:08 -04:00
Casey Bodley
d136756272 symlink: driver calls RxPrepareToReparseSymbolicLink
on ERROR_REPARSE, nfs41_Create() generates an absolute path for the symlink target using the format "DeviceName+NetRootName+symlink", and calls RxPrepareToReparseSymbolicLink()

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 10:36:07 -04:00
Casey Bodley
45a14a17ff symlink: open downcall passes symlink target
on last_error == ERROR_REPARSE, the daemon converts args->path back to wchar and passes it down to the driver

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 10:36:06 -04:00
Casey Bodley
5dc1b43191 rmdir: use normal delete upcall instead of close
caused memory leaks of nfs41_open_state.  we have the FileDispositionInformation upcall for exactly this, so there's no need to complicate the close code path

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 10:36:04 -04:00
Casey Bodley
86c16a7197 adding SID to upcall 2010-10-12 10:36:02 -04:00
Casey Bodley
3b7c04e136 driver: turning write-only caching on
let's try write-only caching again but only because of the next patch that will use a special stateid for reads when file is opened write-only.
2010-10-12 10:36:00 -04:00
Casey Bodley
827a1b7368 volume: cache volume attr results with vnetroot
moved the FileSystemName definition back down to the kernel, so the daemon is no longer responsible for setting it.  the driver uses the string length to calculate the buffer size needed for NFS41_V_NET_ROOT_EXTENSION.FsAttrs, and copies in the FileSystemName after the first successful volume attributes upcall

Signed-off-by: Casey Bodley <cbodley@umich.edu>
2010-10-12 10:35:58 -04:00
Casey Bodley
4731a97973 mount: use empty mount path when no EAs are present
adds support for mounting with 'net use' and 'Map Network Drive'
if we don't have extended attributes on mount (i.e. not using nfs_mount), don't fail!  instead, use SrvName=SrvCallName and MntPt=""
updated nfs41_MountConfig_InitDefaults() to initialize SrvName and MntPt with Length=0

Signed-off-by: Casey Bodley <cbodley@umich.edu>
2010-10-12 10:35:56 -04:00
Casey Bodley
81f05b1cb8 mount: mount config as a local variable
removed the Config field from NFS41_NETROOT_EXTENSION and NFS41_V_NET_ROOT_EXTENSION and made it local to CreateVNetRoot(), as that's the only place it's accessed and we no longer rely on storing Config.Initialized with the NET_ROOT

Signed-off-by: Casey Bodley <cbodley@umich.edu>
2010-10-12 10:35:55 -04:00
Casey Bodley
5861659162 mount: check for existing session instead of config.initialized
removed NFS41_MOUNT_CONFIG.Initialized field, and replaced checks for Config.Initialized with session != NULL

Signed-off-by: Casey Bodley <cbodley@umich.edu>
2010-10-12 10:35:55 -04:00
Casey Bodley
f612321571 mount: use NULL to indicate no existing session
was previously setting pNetRootContext->session to INVALID_HANDLE_VALUE on error, and required checking for both that and NULL.  since it starts initialized to NULL, keep it that way

Signed-off-by: Casey Bodley <cbodley@umich.edu>
2010-10-12 10:35:54 -04:00
Casey Bodley
b9e8c7f8b2 driver: generalized volume query into buf, len
Signed-off-by: Casey Bodley <cbodley@umich.edu>
2010-10-12 10:35:50 -04:00
Casey Bodley
d6d8aea013 driver: eliminating extra copy in QueryFileInfo
was doing a memcpy from entry->u.QueryFile.buf to RxContext->Info.Buffer, even though we set entry->u.QueryFile.buf = RxContext->Info.Buffer

Signed-off-by: Casey Bodley <cbodley@umich.edu>
2010-10-12 10:35:49 -04:00
Casey Bodley
0ad4db4fad fresh git tree for public release
we regretfully had to remove our git history for licensing reasons

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 10:15:48 -04:00