Commit graph

121 commits

Author SHA1 Message Date
Olga Kornievskaia
d42f769bff changing many printouts 2012-02-13 16:08:21 -05:00
Olga Kornievskaia
48d6775211 [driver] fixing wrong upcall size for setattr 2012-02-09 10:36:07 -05:00
Olga Kornievskaia
43424fc653 first stab at time-based data coherency 2012-02-08 18:24:19 -05:00
Olga Kornievskaia
13c3723191 propagating file change attr for setacl 2012-02-08 16:32:04 -05:00
Olga Kornievskaia
cdf31d3ee0 propagating file change attr on setattr 2012-02-08 16:31:17 -05:00
Olga Kornievskaia
aa7a680a40 propagating file change attr on writes 2012-02-08 16:29:25 -05:00
Olga Kornievskaia
ec034e7fd9 propagating file change attr on open 2012-02-08 11:11:09 -05:00
Olga Kornievskaia
3def6f5e24 propagating file change attr on getattr 2012-02-08 11:02:29 -05:00
Olga Kornievskaia
fb87e417fc enforcing data consistency
given a delegation type received on open, set buffering flags accordingly.

however, provide -o nocoherence mount options that will enable read/write
buffering regardless
2012-01-20 15:01:11 -05:00
Olga Kornievskaia
c22c2b6080 data cache invalidation on delegation recalls
when we receive a delegation recall, we need to make a downcall
to the kernel and change a buffering/caching policy on this file.

on each open and close we pass an srv_open pointer to the nfsd to
keep in case it receives a cb_recall. we store srv_open in the
delegation state if we got a delegation.
2012-01-19 19:46:03 -05:00
Olga Kornievskaia
39e90a7299 bug fix in nfs41_FinalizeVNetRoot
when we didn't create a mount, we don't have a security context to
destroy. in vnetroot creation, initialize session to invalid_handle.
if we fail to mount, then before deleting security context in
nfs41_FinalizeVNetRoot check that session is not invalid_handle.
2012-01-19 15:25:43 -05:00
Olga Kornievskaia
03bc4d4c2e adding back unimplemented functions
just in case some of them are required and will cause a kernel crash
if function pointer is dereferenced.
2012-01-18 18:21:28 -05:00
Olga Kornievskaia
a132b8b79c [driver] storing volinfo in devext
instaed of assembling FILE_FS_VOLUME_INFORMATION on every volume
query, story it in device extensions and just copy bytes.
2011-12-22 14:50:53 -05:00
Olga Kornievskaia
c61849fd14 [driver] fail if fail to impersonate client in nfsd thread 2011-12-22 12:06:44 -05:00
Olga Kornievskaia
790e6239d4 [driver] creating individual unmarshal functions 2011-12-22 11:59:45 -05:00
Olga Kornievskaia
62dfd87bda [driver] using InterlockedIncrement for open_owner_id 2011-12-21 17:42:04 -05:00
Olga Kornievskaia
9efa410e5a [driver] using InterlockedIncrement64 for xid 2011-12-21 17:19:38 -05:00
Olga Kornievskaia
4511dec4b7 [driver] properly release upcall entry lock in downcall
if we fail to allocate memory while processing acl downcall, dont
forget to release the lock on the entry before leaving the function.
2011-12-21 16:50:54 -05:00
Olga Kornievskaia
517db12d34 [driver] properly unlock mdls
when nobody is waiting for the upcall. if it was read/write upcall
unlock readwrite mdl. if it was a readdir upcall, unlock readdir
mdl and also free it.
2011-12-21 16:43:55 -05:00
Olga Kornievskaia
8d52181a3e [driver] delete sec context even if upcall fails 2011-12-21 16:36:39 -05:00
Olga Kornievskaia
fd21e7fbfd [driver] stop impersonating client even if it's a lost upcall 2011-12-21 16:15:26 -05:00
Olga Kornievskaia
0e272630a3 [driver] cosmetic changes
none (or all) functions should be static. making all function non-static.

consistent format of function args (ie each argument on its own line).

adding __notnull for our fcb, fobx, vnetroot, netroot context pointers.

removed some non-implemented function from our redirector functions table.
left some no-op functions that are just required: flush, isvaliddir,
deallocatefcb. not sure about completebufferingstate function.

80char lines corrections
2011-12-21 15:53:17 -05:00
Olga Kornievskaia
24ca1023bf [driver] bugfix: only free context for valid vnetroot 2011-12-20 15:19:01 -05:00
Olga Kornievskaia
6292181f8d adding nocache mount options 2011-12-08 17:47:34 -05:00
Olga Kornievskaia
aed1493e90 adding writethru mount option
for large writes it is beneficial to turnoff write buffering and allow
large write buffer sizes than 1M (for win 7).
2011-12-08 17:07:12 -05:00
Olga Kornievskaia
37f3fa0862 saving security context in vnetroot
windows calls into our driver from processes that have restricted access.

save security context during mount and use that for all other irps.
2011-12-08 17:07:05 -05:00
Olga Kornievskaia
33a5f24f1f [cosmetic] print processid instead of pointer to peprocess 2011-12-05 13:27:53 -05:00
Olga Kornievskaia
6b05d84e93 [driver] dont set NetRootStatus on failure
Setting it was cause exiting mounts to go away.
2011-11-08 14:35:17 -05:00
Olga Kornievskaia
572c69e3d0 need to close vnetroot handle in create_connection 2011-11-02 12:00:21 -04:00
Casey Bodley
3d053740c3 mount: propagate errors back to nfs_mount
nfs41_np.c:
NPAddConnection3() was overwriting status=WN_BAD_NETNAME on any errors from DeviceIoControl()

nfs41_driver.c:
GetConnectionHandle() was only returning the handle, and throwing away the return value from ZwCreateFile()
map_mount_errors() was missing a mapping from ERROR_BAD_NET_NAME to STATUS_BAD_NETWORK_NAME

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-10-25 11:44:37 -04:00
Olga Kornievskaia
a2375b78ac [cosmetic] [driver] modify printouts in getsecurity
print function names where SeCreateClientSecurityFromSubjectContext fails
2011-10-24 12:14:03 -04:00
Olga Kornievskaia
4c52473527 hooking up rsize-wsize mount options
after parsing read and write rpc size from the mount command,
add the values to mount upcall, then pass these values when creating
a CLIENT structure.
2011-10-11 16:03:59 -04:00
Olga Kornievskaia
d646e5c58c [driver] verifier raised issue with lists
first element in the lists (head) doesn't store any entries so
we should skip it when we traverse the list.
2011-10-06 12:38:55 -04:00
Olga Kornievskaia
65c6091f69 [driver] verifier raised issues with mdls
it complained that mdls had to have a certain (undocumented) flag set.
also, it seemed to imply that in readdir, the locking of pages needed
to be done by the thread creating the mdl. so i moved the locking/unlocking
there.
2011-10-06 12:32:50 -04:00
Olga Kornievskaia
b3e4953890 [driver] fixing printing a unicode string in setattr 2011-10-04 14:33:18 -04:00
Olga Kornievskaia
981e73dc61 [driver] read-only mount option
if the nfs_mount passes us a read-only mount option. then return
access_denied if:
1. requests for open with desired access of write or append,
2. we get a write irp,
3. requests for setattr, setattrex, setacl
4. ignore the delete_on_open flag passed to open
2011-10-04 10:57:06 -04:00
Olga Kornievskaia
52081e3175 support for multiuser environment
on a mount request, search a list of existing mounts for a given netroot
based on LUID entries (login ids). if an entry is found, then check the
current request rpcsec flavor against existing sessions/mounts. If no
match found, do another upcall for a mount and store a session of this
flavor for this LUID. if no entry found for this LUID, then do a mount
upcall, create a new entry and add it to the list.
2011-09-29 18:45:21 -04:00
Olga Kornievskaia
27030b1764 removing copies from readdir path 2011-09-27 12:21:26 -04:00
Olga Kornievskaia
7e52f53097 [acls] removing unneeded safety checks 2011-09-23 12:12:45 -04:00
Olga Kornievskaia
3295a9da05 [timings] counting avg acl reply size in cached case 2011-09-22 17:07:44 -04:00
Olga Kornievskaia
6eea9faa2e first draft of named attributes 2011-09-22 14:56:11 -04:00
Olga Kornievskaia
eae8988d6e [driver] minor fix store pointer not pointer to pointer 2011-09-07 13:45:09 -04:00
Olga Kornievskaia
0474d3afbe [driver] adding timing stats to upcalls 2011-09-06 18:01:17 -04:00
Olga Kornievskaia
e3cbc70f14 removing unnecessary copy in readdir 2011-09-06 17:55:02 -04:00
Olga Kornievskaia
27bc5b862e [driver] ignore label_security queries 2011-08-24 13:22:51 -04:00
Olga Kornievskaia
28992406a7 [driver] caching acl buffer between query security irps
windows api frequently sends a query security with a buffer len of 0
to figure out how big of buffer is needed for a security descriptor.

we send a getattr for acl attribute on the 1st irp, then cache the
returned security descriptor in fobx. on the 2nd query, if the buffer
is cached and it's not "stale", we return that buffer.
2011-08-24 12:23:04 -04:00
Olga Kornievskaia
04ab888492 [cosmetic] minor license changes
added 2011 year to the copyright line
added authors info to the license
added UofM license to libtirpc files that we modified
(but i probably missed some)
2011-08-12 13:20:12 -04:00
Olga Kornievskaia
c722076d09 [driver] removing mrxsetinfoatcleanup
this function was called before writes and was setting time and size
attributes of the file. we were translating it into a setattr. reads
were also followed by a setattr of timestamp (unnecessarily)
2011-07-18 15:24:19 -04:00
Olga Kornievskaia
2db91a3001 deny setattr for size if not opened for write
proposes an alternate solution for attempts to set file size without an open sta
teid.  instead of acquiring one by sending OPEN, fail the request with ACCESS_DE
NIED

according the MS File System Algorithms documentation for setting FileAllocation
Information and FileEndOfFileInformation [http://msdn.microsoft.com/en-us/librar
y/ff469355%28v=PROT.10%29.aspx]:
"If Open.GrantedAccess does not contain FILE_WRITE_DATA, the operation MUST be f
ailed with STATUS_ACCESS_DENIED"

-removes open_owner_id, access_mask, access_mode from setattr upcall arguments
-moves map_access_2_allowdeny() back to open.c as a static function, since handl
e_setattr() was its only other call site
2011-06-27 14:51:15 -04:00
Olga Kornievskaia
9f2587c3b3 [driver] abandoned upcalls dont delete security context
Deleting client's security context was causing kernel crashes.

During upcall, we remember a pointer to the client's security context,
then on close we delete the security context. Previously we would also
delete the context if the upcall was abandoned.

Apparently, windows will always send a close for the fcb that was used
for the abandoned upcall. Close deletes the context. Then when upcall
was done, it would try to delete the context again (oops).
2011-06-22 11:42:30 -04:00