Whamcloud - gitweb
adjust gss upcall timeout value just be secinit timeout, service gss upcall
[fs/lustre-release.git] / lustre / sec / gss / sec_gss.c
index b11872f..33b4291 100644 (file)
@@ -80,26 +80,6 @@ struct rpc_clnt;
 
 #define GSS_CREDCACHE_EXPIRE    (30 * 60)          /* 30 minute */
 
-#define GSS_TIMEOUT_DELTA       (5)
-#define CRED_REFRESH_UPCALL_TIMEOUT                             \
-        ({                                                      \
-                int timeout = obd_timeout - GSS_TIMEOUT_DELTA;  \
-                                                                \
-                if (timeout < GSS_TIMEOUT_DELTA * 2)            \
-                        timeout = GSS_TIMEOUT_DELTA * 2;        \
-                timeout;                                        \
-        })
-#define SECINIT_RPC_TIMEOUT                                     \
-        ({                                                      \
-                int timeout = CRED_REFRESH_UPCALL_TIMEOUT -     \
-                              GSS_TIMEOUT_DELTA;                \
-                if (timeout < GSS_TIMEOUT_DELTA)                \
-                        timeout = GSS_TIMEOUT_DELTA;            \
-                timeout;                                        \
-        })
-#define SECFINI_RPC_TIMEOUT     (GSS_TIMEOUT_DELTA)
-
-
 /**********************************************
  * gss security init/fini helper              *
  **********************************************/
@@ -212,10 +192,12 @@ static int secinit_parse_reply(char *repbuf, int replen,
         p = (__u32 *) buf_to_sec_data(repbuf);
         effective = 0;
 
-        status = le32_to_cpu(*p++);
+        p += 2; /* skip the leading unused bytes */
+        seq = le32_to_cpu(*p++);
         major = le32_to_cpu(*p++);
         minor = le32_to_cpu(*p++);
-        seq = le32_to_cpu(*p++);
+        status = 0;
+
         effective += 4 * 4;
 
         if (copy_to_user(outbuf, &status, 4))
@@ -1137,7 +1119,7 @@ proc_data_out:
                  */
                 if (major == GSS_S_NO_CONTEXT ||
                     major == GSS_S_BAD_SIG) {
-                        CWARN("req %p: server report cred %p %s, expired?\n",
+                        CWARN("req %p: server report cred %p %s\n",
                                req, cred, (major == GSS_S_NO_CONTEXT) ?
                                            "NO_CONTEXT" : "BAD_SIG");