Commit graph

20 commits

Author SHA1 Message Date
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
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
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
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
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
Olga Kornievskaia
a67636605c fixing authdestroy called twice for non-existing target names 2011-04-12 14:09:14 -04:00
Olga Kornievskaia
5482c0e51f [sspi] fixing memory leaks during sspi context establishment failure 2011-03-24 14:51:10 -04:00
Olga Kornievskaia
4222bd6f2b [sspi] passing gss seq# to sspi privacy api 2011-03-24 14:41:31 -04:00
U-ultimate\aglo
332f9331a2 [sspi] removing size constraints on contest tokens
MIT KDC don't issue tickets that are better than 1K.

Windows KDC carry authorization payloads with their service tickets
and thus much bigger than MIT's tickets.
2011-03-24 11:38:51 -04:00
Olga Kornievskaia
5e5d1d21d5 fixing compile warnings and funciton name typos 2011-03-22 14:49:27 -04:00
Olga Kornievskaia
741e8bf0bf non-blocking rpc receive
we already drop the lock between sending and receiving the rpc packets. now making it so that receive doesn't block for too long (ie 100ms) before unlocking the socket. this is needed for the callback. original rpc is sent and it triggers a callback from the server. we fork another thread to handle it, ie it needs to send a deleg_return rpc. if original rpc gets control and blocks on trying to receive its reply, it'll timeout and original rpc will return an error. instead we need to not block for long and allow the deleg_return to go thru so that the server can reply successfully to the original rpc.
2011-03-08 11:04:44 -05:00
Olga Kornievskaia
83ab0b3f86 fixing error handling in sspi context establishment 2011-03-08 11:04:43 -05:00
Olga Kornievskaia
5cf32c11c2 fixing gss destroy context 2011-03-08 11:04:41 -05:00
Olga Kornievskaia
47b0ccda9c turning callback off for krb5p
sspi requires strict ordering of messages. we can't have more than 1 outstanding rpc thus, hold the lock over send and receive and turn off callbacks.
2011-02-03 13:13:10 -05:00
Olga Kornievskaia
4411d3d807 first stab at integrity and privacy
note: privacy will not work when we have more than 1 outstanding rpcs which generates out of order replies which sspi does not allow when privacy is enabled.

adding auth_wrap() and auth_unwrap() to per-message gss token protection required adding these methods to auth_sys and auth_non.

linux server doesnt support v2 kerberos tokens that have rotated data. sspi will always produce such tokens for aes. thus thus code was only tested for v1 kerberos tokens (ie des).
2011-01-27 13:52:08 -05:00
Olga Kornievskaia
35d76cf593 fixing tirpc handle of auth_refresh
(a) auth_refresh recursively calls clnt_call() which will call
clnt_vc_call() and will try to acquire a lock on the socket which we have
already acquires. thus a change to see if the thread trying to acquire the
lock is the same holding the lock.

(b) authsspi_fresh() needed to check if we were called to refresh the
context due to the error (ie 2nd argument non-null) and if so, destroy
the old context and then reacquire a new sspi context.

it seems that InitializeSecurityContext() also requires new creds as well
so after initially calling AcquireCreds() we don't need to worry about
refreshing credentials.
2010-12-08 18:24:53 -05:00
Olga Kornievskaia
b9494c3ccc first stab at SSPI leaving gss calls in 2010-12-02 14:22:04 -05:00
Olga Kornievskaia
a66dc99c48 removed 2 compile warnings 2010-11-08 12:54:43 -05:00
Casey Bodley
575200952a tirpc: memory corruption in clnt_vc_destroy()
stop the callback thread before freeing any memory!

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-11-08 11:17:25 -05: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