Attempt to use sessions only when they are enabled
authorSimo Sorce <simo@redhat.com>
Mon, 13 Oct 2014 20:35:57 +0000 (16:35 -0400)
committerSimo Sorce <simo@redhat.com>
Mon, 13 Oct 2014 20:35:57 +0000 (16:35 -0400)
src/mod_auth_gssapi.c

index 5ce9077..c33ea34 100644 (file)
@@ -209,7 +209,9 @@ static int mag_auth(request_rec *req)
     }
 
     /* if available, session always supersedes connection bound data */
-    mag_check_session(req, cfg, &mc);
+    if (cfg->use_sessions) {
+        mag_check_session(req, cfg, &mc);
+    }
 
     if (mc) {
         /* register the context in the memory pool, so it can be freed
@@ -335,7 +337,9 @@ static int mag_auth(request_rec *req)
             vtime = MIN_SESS_EXP_TIME;
         }
         mc->expiration = time(NULL) + vtime;
-        mag_attempt_session(req, cfg, mc);
+        if (cfg->use_sessions) {
+            mag_attempt_session(req, cfg, mc);
+        }
     }
 
     ret = OK;