Commit graph

434 commits

Author SHA1 Message Date
U-fast\aglo
f80d7ec365 cache volume attrs with superblock 2011-06-20 10:49:53 -04:00
Casey Bodley
a4c726f92d name cache: no longer copies fh for negative entries
nfs41_name_cache_lookup() was returning FILE_NOT_FOUND on negative entries, but still copying the target filehandle

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-06-14 12:36:07 -04:00
U-fast\aglo
6a9a9bb932 [libtirpc] fixing infinite loop in autherr
refreshes if not static was causing infinite recursive calling.
2011-06-14 12:00:05 -04:00
Casey Bodley
49890fe1b1 namedattr: xdr for OPENATTR
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-06-14 11:57:52 -04:00
Casey Bodley
fd59b56add pnfs: fix for ERR_DELAY on CB_LAYOUTRECALL
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-06-13 13:37:35 -04:00
Casey Bodley
d98da23d49 lock: address differences in lock semantics
zero-length ranges: valid on windows, but nfs servers MUST return NFS4ERR_INVAL for LOCK with length=0. use MRxIsLockRealizable() to return STATUS_NOT_SUPPORTED for zero-length ranges (avoiding the lock upcall and rpc)

ranges that extend past UINT64_MAX: not valid on windows. NFS expects length=UINT64_MAX for locking to end-of-file. use length=UINT64_MAX if length >= UINT64_MAX-offset (making lock ranges consistent with linux client)

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-06-13 12:02:59 -04:00
Olga Kornievskaia
2d252266c2 [driver] fixing dereference of upcall entry after free if we fail to get security context 2011-06-08 12:54:31 -04:00
Olga Kornievskaia
25cf92a60b [driver] changing logic in volume query
previously, if the supplied buffer length was smaller than the result
of the volume query we returned SUCCESS and no data (ie. it was needed
because Notepad passes in a buffer too small but doesn't like a
buffer_too_small error.) However, it does work with buffer_overflow
error and then a partial resulted returned.
2011-06-06 18:44:59 -04:00
Olga Kornievskaia
8153733a77 [driver] fixing volume label length 2011-06-06 11:25:02 -04:00
Olga Kornievskaia
ec461ad428 [cosmetic] fixing line-endings in rpc_error_string 2011-06-02 13:20:52 -04:00
Olga Kornievskaia
faec978ad5 [dll] fixing drive enumeration
setacl tool was calling into our dll to enumerate mounted drives. the
index was not updated after we returned the results and caused an
infinite loop.
2011-06-01 12:36:46 -04:00
Olga Kornievskaia
bb8de9c266 [libtirpc] catching network errors
if during recv we received an error, then propagate that to the caller.
otherwise, do time out check. also do timeout check if the thread's xid
didn't match received xid (making sure we'll timeout if we have a starving
thread that will never receive a reply)
2011-05-27 10:38:59 -04:00
Olga Kornievskaia
54c11cd84b ensuring exactly once semantics for open
if we are doing CREATE_NEW file creation, then based on whether or not
we have a persistent session, we'll send either GUARDED4 create for
persistent session and EXCLUSIVE4_1 create otherwise.
2011-05-24 12:33:58 -04:00
Olga Kornievskaia
cb54018555 asking for persistent session from a server 2011-05-23 16:35:38 -04:00
Olga Kornievskaia
9f9401d6c8 adding WRONGSEC error to mapping function 2011-05-19 14:55:36 -04:00
Olga Kornievskaia
eb5a1d721c xdr for SECINFO and SECINFO_NO_NAME 2011-05-19 12:09:57 -04:00
Olga Kornievskaia
ee955a10b2 saving uid/gid in rpc client 2011-05-19 12:05:39 -04:00
Olga Kornievskaia
aa4c8603ee [cosmetic] adding gssauth_string for debug 2011-05-19 12:02:06 -04:00
Olga Kornievskaia
c9e507f231 fixed memory if AcquireCred fails
if mount -o sec=krb5 fails because the user doesn't have kerberos credentials,
we were not freeing memory allocated for sec context.
2011-05-18 18:07:56 -04:00
Olga Kornievskaia
d6967ea9ef reestablishing gss context on rpc_reconnect
if we receive an rpc_autherr, just recreate a new rpc client as well
as the rpc auth structure. as it ties into the recovery and handles
that only one thread recovers and reestablishes the rpc auth context.

in theory, reestablishing rpc client does not necessitate new rpc auth
context. we really need to restablish one only if we get rpc autherr. however,
it simplifies the code not to introduce a different synchronization
mechanism for rpc auth in addition to the rpc one.
2011-05-16 18:32:56 -04:00
Olga Kornievskaia
b6beb6f2a9 [libtircp] adding timeout on async recv
once libtirpc blocking recv was changed to a polling receive,
we no longer had a timeout mechanims on waiting for a reply.

solution: save a timestamp before the recv call, on each async recv return
check if the time lapsed does not exceed the timeout value. when timeout
is reach, return TIMEDOUT rpc error.
2011-05-16 15:46:45 -04:00
Olga Kornievskaia
d83fece068 [driver] fixing return value for security query
rdbss doesn't like status_buffer_too_small return and instead needs
status_buffer_overflow
2011-05-02 13:38:41 -04:00
Casey Bodley
90513f177b volume: fix for volume queries over referrals
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-05-02 11:13:23 -04:00
Olga Kornievskaia
42be031364 [mount] adding security option to PrintUsage 2011-04-29 14:48:03 -04:00
Olga Kornievskaia
ab7bdbd125 [cosmetic] adding iostatus printf to fsddispatch 2011-04-29 14:29:54 -04:00
Olga Kornievskaia
3a69a29ff6 dont call upcall_cleanup if versions were mismatched 2011-04-27 16:47:40 -04:00
Olga Kornievskaia
a173395b5a [libtirpc] fix for async rpc + krb5p
don't release the lock if this is krb5p when the receiver finds nothing in
the socket during the recv
2011-04-27 15:56:01 -04:00
Olga Kornievskaia
0d02adba8e [daemon] moving refcount after version checking
in case of daemon restart, we can't update reference count on session
and open state until we know it's a valid upcall (via version checking)
2011-04-27 11:38:40 -04:00
Olga Kornievskaia
dd6f2c1849 [driver] share any session for WILD vnetroot
when vnetroot creation of wild comes in it is always for "AUTH_SYS" but if
there exists a gss_session than use that.
2011-04-27 11:37:27 -04:00
Casey Bodley
880dbf8afc driver: fix for has_nfs_prefix()
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-04-20 12:46:29 -04:00
Olga Kornievskaia
5628175fbb [driver] handling UNC paths 2011-04-20 12:36:02 -04:00
Olga Kornievskaia
089a283a3a [driver] [cosmetic] changing printfs 2011-04-19 14:00:45 -04:00
Olga Kornievskaia
20493b9e88 turning off caching if WRITE_THROUGH or NO_BUFFERING is set 2011-04-14 20:14:59 -04:00
Olga Kornievskaia
48081b9f00 printing received nfs4 access mask 2011-04-14 20:14:48 -04:00
Olga Kornievskaia
7f5f903b0a [driver] [cosmetic] restructuring debugging output 2011-04-14 20:14:21 -04:00
Olga Kornievskaia
7a77e95bcd [driver] removed unused Lock.handle 2011-04-13 20:17:59 -04:00
Olga Kornievskaia
529d7ce6db moving session and open_state in upcall header
every upcall (except few) pass session and open_state pointer, so
add that to marshal_nfs41_header() in the driver. remove passing
of session and open_state elsewhere in marshal functions.

in the deamon, upcall.c now reads and stores pointers to session
and open_state in nfs41_upcall datastructure instead of having
each individual upcall store their own pointers. setattrl
and readdir args keeping pointer because the rest of the code
uses them a lot.

in upcall_parse() up refcounts on session and open_state if
valid handles were passed in. down refcounts upcall_cleanup() as
before. but need to be careful with count value for mount and open
upcalls. we need to take an extra ref because upcall_cleanup() now
will always decrement it.
2011-04-13 20:07:37 -04:00
Olga Kornievskaia
ea390c1d25 [driver] moving session and open_state out of upcall union
also passing session, open_state and version to upcallcreate function
2011-04-13 15:28:48 -04:00
Olga Kornievskaia
71269e293c [acls] setattr of owner and group attributes 2011-04-12 19:59:58 -04:00
Olga Kornievskaia
f78cc24925 more acl
reformated some of the old functions.

finalized mapping functions for windows to nfs4 access mask bits.

satisfying nfs41_acl_query for dacl.

when doing setacl and creating "who" field of the format user@nfs4domain,
use dns domain name of the windows client machine
2011-04-12 16:47:14 -04:00
Olga Kornievskaia
80b3d11609 changing getacl downcall
instead of passing sids for the owner and group, create a security
descriptor and pass that back. this way we can add all the security
information that was queried in the daemon and pass a fully formed
security descriptor back to the kernel.

notice: irp_mj_query_security provides a pointer to the buffer that
suppose to hold the security descriptor. that memory is valid only
in the context of the process doing the security irp. we can't use
this pointer in then upcall entry and try to write the security
descriptor directly there as we process the downcall. that leads
to kernel oops.

thus we have to first allocate memory to hold the security descriptor
then copy bytes passed to us from the daemon. then do another copy
with the context of the security irp.
2011-04-12 15:57:04 -04:00
Olga Kornievskaia
c00085bfb4 daemon portion of setacl upcall
this commit does NOT have correct windows to nfs4 acl mappings but
rather has the wrapper functions defined for mapping them.

cthon tests still work with these mappings.
2011-04-12 15:56:55 -04:00
Olga Kornievskaia
2b5e3fd64f [acls] driver portion of setacl upcall 2011-04-12 15:56:20 -04:00
Olga Kornievskaia
72c675f03b [acls] adding acl related debug print functions 2011-04-12 15:48:04 -04:00
Olga Kornievskaia
be9fb49680 [acls] adding acls related constants 2011-04-12 15:47:23 -04:00
Olga Kornievskaia
40fce431f0 adding print_hexbuf_no_asci without asci content 2011-04-12 15:40:51 -04:00
Olga Kornievskaia
d059ee1eae getdomainname stores machine's domain name
need this for acls
2011-04-12 15:40:26 -04:00
Olga Kornievskaia
e09a179f66 fattr4_word0_acl query during nfs41_acl_query upcall
querying the server for the acl attribute during the nfs41_acl_query upcall.

no mapping of the nfs41 acl to the windows dacl yet.
2011-04-12 15:37:49 -04:00
Casey Bodley
cc2efe6a96 callback: replay cache for back channel
nfs41_cb_session stores the last cb_compound reply (whether or not cachethis was set) to handle retry attempts, along with the cb_compound arguments for improved NFS4ERR_SEQ_FALSE_RETRY detection

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-04-12 15:32:47 -04:00
Casey Bodley
32be705e4d test: asio.exe for async reads and writes
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-04-12 14:49:32 -04:00