Commit graph

578 commits

Author SHA1 Message Date
Olga Kornievskaia
49580a8cfe handling hidden system archive file attributes
todo: still need to mask supported attributes while doing getattrs
2012-04-02 12:49:44 -04:00
Casey Bodley
68d97f5400 open: use suppattr_exclcreat to mask exclusive create attributes
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-29 16:17:48 -04:00
Olga Kornievskaia
6bb641e547 open and create accept pointer to attributes
allow callers of nfs41_open() and nfs41_create() to pass arbitrary attributes fo
r use with open_args.openhow.how.createattrs and create_args.createattrs
2012-03-29 16:16:55 -04:00
Olga Kornievskaia
dc9377ce58 adding arguments check functions to mrx functions
moving input argument checks into check_nfs41_X () functions
2012-03-29 15:47:21 -04:00
Olga Kornievskaia
60e1d87a86 removing unused Flags field in FCB context 2012-03-29 15:47:05 -04:00
Casey Bodley
092c39d9d6 driver: change error code for rename, link with RootDirectory
http://msdn.microsoft.com/en-us/library/cc232085%28v=prot.10%29.aspx : "STATUS_INVALID_PARAMETER: An invalid parameter was passed for FileName or FileNameLength, or the target file was open, or the RootDirectory field value was nonzero for a network operation."

as network filesystems are not expected to support this, return STATUS_INVALID_PARAMETER instead of STATUS_NOT_SUPPORTED

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-29 15:46:55 -04:00
Casey Bodley
e83d36544f symlink: handle errors from REMOVE
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-29 15:46:44 -04:00
Casey Bodley
829c05d6b5 driver: add checks for reparse points on volume
fail attempts to set/get reparse points when the filename is no longer than the vnetroot name (plus a \) to prevent these operations on a volume.  also adds checks for non-null buffers to pass Set/GetPointInvalidParamTest

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-29 15:46:32 -04:00
Olga Kornievskaia
4d18cf9ce7 changing silly rename scheme
instead of appending a fh value when creating a silly rename name,
we'll append a timestamp. using fh value was problematic because
it was creating a filename longer than 64char long which is
currently out max_filename_size.
2012-03-29 11:23:55 -04:00
Casey Bodley
61998b5968 driver: convert strings to utf8 instead of ansi
use RtlUnicodeToUTF8N() instead of RtlUnicodeStringToAnsiString() to preserve unicode filenames; passes fileio test UnicodeOnDiskTest

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-29 11:23:49 -04:00
Olga Kornievskaia
6119fba99f adding sharing violation check for supersede
rdbss usually does sharing violation checks for us but missed this one.
2012-03-29 11:23:45 -04:00
Olga Kornievskaia
b40f685286 return not_supported for windows streams 2012-03-29 11:23:38 -04:00
Olga Kornievskaia
0020104b95 fixing handling of delete_on_close
file can be opened with a delete_on_close flag set. this file can be
opened again as long as opens specify "file_share_delete" access.
after receiving the cleanup irp, the handle enters "delete-pending"
state. opens in this state must fail with status_delete_pending.
file query for standard_info.delete_pending now should return true.

calling setattr with disposition=1 puts the file in "delete-pending"
state.

calling setattr with dispositon=0 will clear delete_on_close only
if file is in "delete-pending" state. otherwise, setattr is ignored.
2012-03-29 11:23:34 -04:00
Casey Bodley
7a8861699f driver: add checks for ifs reparse point tests
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-29 11:23:28 -04:00
Olga Kornievskaia
4bfb05adac returning buffer_overflow instead of too_small 2012-03-29 11:23:23 -04:00
Olga Kornievskaia
83cab313f0 propagate attrs on dir creation 2012-03-29 11:23:18 -04:00
Olga Kornievskaia
24781aa472 checking parameters on open
based on MS-FSA document there are a few checks we should do
on open that we didn't before.
2012-03-29 11:23:13 -04:00
Olga Kornievskaia
dd611ff0cd treat OVERWRITE as open4_create unchecked4 2012-03-29 11:23:01 -04:00
Olga Kornievskaia
fae194a5b6 respect NO_INTERMIDIATE_BUFFERING for an open 2012-03-20 11:20:11 -04:00
Olga Kornievskaia
735784e85b notepad specific fixes
removing notepad opens file as a directory ifdef

for volume query notepad supplies insufficient buffer space but
doesn't like buffer_too_small error code. it seems to be fine
with partial buffer filled and buffer_overflow error.
2012-03-19 16:52:20 -04:00
Olga Kornievskaia
f89ded9bf6 [debug] add a missing DEBUG_VOLUME_QUERY 2012-03-19 16:36:42 -04:00
Olga Kornievskaia
439621a459 [driver] respect READONLY attribute
if file is created with READONLY attr then set mode to 444

if file is opened with READONLY attr but askes for WRITE access
return an error
2012-03-19 15:05:02 -04:00
Olga Kornievskaia
4418ba8b69 fixing open for FILE_SUPERSEDE
http://www.osronline.com/showThread.cfm?link=27213
clarifies that unless open for overwrite_if the old file should be
deleted and then created again.
2012-03-19 15:05:01 -04:00
Olga Kornievskaia
c6ee60b362 [driver] fixing possible app/driver/nfsd race
entry->filename points to something the app address space. if app was
started and the ctrl-ed c, then when nfsd picks up the upcall it should
check if the pointer is still valid
2012-03-19 15:04:59 -04:00
Olga Kornievskaia
863db2735b [open] fix open_if for dir when dir exists 2012-03-19 15:04:57 -04:00
Olga Kornievskaia
540ad44f21 [driver] enforcing filename component length checks
on create, check that provided name has the appropriate filename
length for each directory component.

also check on link and rename
2012-03-19 15:04:56 -04:00
Olga Kornievskaia
d1a05c810e fixing open a file as a directory
we should map this failure to STATUS_NOT_A_DIRECTORY

notepad.exe had been known to do this
2012-03-19 15:04:54 -04:00
Olga Kornievskaia
1a00a0bdce fixing opening dir as a file
open a of a directory with a NON_DIRECTORY_FILE specified should return
FILE_IS_A_DIRECTORY
2012-03-19 15:04:52 -04:00
Olga Kornievskaia
4017b235db handling creating new file for no access
windows can send a create irp with dispostion representing creation
of the file and specify DesiredAccess of 0.

we were treating no data access as lookup but in this case, we still
need to create a file. so send an open with a read access and
request no delegation to be returned.
2012-03-19 15:04:51 -04:00
Olga Kornievskaia
1ea2fb7891 calling asynch cache invalidation always 2012-03-19 15:04:49 -04:00
Olga Kornievskaia
e934484b1f [driver] check for nul reparse point buffer 2012-03-19 15:04:47 -04:00
Olga Kornievskaia
b4a1af0df6 fixing access_mask to nfs allow in open flags 2012-03-19 15:04:46 -04:00
Olga Kornievskaia
77237af0a6 fixing localdomain_name declaration in acl.c 2012-03-19 15:04:44 -04:00
Casey Bodley
d69aa27295 readdir: guarantee that entry_buf_len can fit one entry
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-19 15:04:43 -04:00
Olga Kornievskaia
2e1df56572 [readdir] using last_error to convey lack of space 2012-03-19 15:04:41 -04:00
Olga Kornievskaia
3d57b26922 [cosmetic] removed unused define 2012-03-19 15:04:39 -04:00
Olga Kornievskaia
50cdaf6d42 send bind_conn when sr_status_flag.PATH_DOWN is set 2012-03-19 15:04:38 -04:00
Olga Kornievskaia
e891fd141d in rpc_reconnect respect original needcb value 2012-03-19 15:04:36 -04:00
Olga Kornievskaia
a92dd35226 [mount] adding timeout to usage 2012-03-19 15:04:34 -04:00
Casey Bodley
bbb1ed696c license changed to LGPL: added COPYING file, changed source file comments
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-19 12:24:43 -04:00
Casey Bodley
6f8f4d8e3f readme: mention nfsd.exe options --uid, --gid
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-07 13:07:30 -05:00
Olga Kornievskaia
d62d5dee59 command line options to override default uid/gid values
as of now, not allowing anonymous uid to be 0.

no restrictions on a default gid value.
2012-03-07 11:58:59 -05:00
Olga Kornievskaia
54e17624ab reverting commit 7485d53f64
in comparing server identities, in previous commit we removed
comparison of the returned clientids.

however, running against the emc server, we ran into issues of data
servers retuning the same server major, minor, and scope identities
but different clientids. we then decided that it's the same data
server.
2012-03-06 13:36:42 -05:00
Olga Kornievskaia
b297d2bc78 [libtirpc] removing erronous * from cb_handle structure type
cb_handle was declared as HANDLE * instead of just HANDLE and then
used as HANDLE. However, ran into issues with WaitOnSingleObject(cb_handle)
never returning.
2012-03-06 13:31:32 -05:00
Olga Kornievskaia
4af8bbf362 [pnfs] allow callbacks to data servers 2012-03-05 18:52:06 -05:00
Olga Kornievskaia
f71623bc02 adding a lease-based timeout to upcalls
adding -o timeout=value (in sec) mount option to override a default
timeout value for the upcalls for non-io upcalls. Default timeout is
at least the lease_time seconds of an established mount or 20secs.

read/write upcall also take into account number of bytes for the request
and 100MB/s network speed and 100MB/s disk speed
2012-03-05 17:49:52 -05:00
Olga Kornievskaia
b2f5d3c7a7 fixing printf format values in nfs41_mount 2012-02-29 13:55:40 -05:00
Olga Kornievskaia
cba20eeff4 [cosmetic] printing process id in hex in print_error 2012-02-28 15:59:14 -05:00
Olga Kornievskaia
44df987734 updating attrs in nonpnfs file_sync4 writes
when we are doing non-pnfs and writing to a netapp filer, even though we
write UNSTABLE it returns us FILE_SYNC4. since we were doing unstable
writes we were not sending getattrs, and since the data servers we returning
stable commits we didn't send commit. in doing so, we never update our
attribute cache and had a wrong file size.
2012-02-28 14:18:51 -05:00
Olga Kornievskaia
47ff10aa57 [acl] return a write delegation on setacl
we were only returning a read delegation, when we try to do a setacl.

at cthon2012, we were getting cb_recalls when we had a write delegation.
2012-02-28 14:14:26 -05:00