Update of /cvsroot/hcoop/domtool2/src/plugins
In directory sc8-pr-cvs17:/tmp/cvs-serv10643/src/plugins

Modified Files:
        apache.sml 
Log Message:
Disallow authType kerberos in non-SSL vhosts

Index: apache.sml
===================================================================
RCS file: /cvsroot/hcoop/domtool2/src/plugins/apache.sml,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** apache.sml  7 Oct 2007 11:01:23 -0000       1.47
--- apache.sml  11 Oct 2007 09:45:27 -0000      1.48
***************
*** 1,4 ****
  (* HCoop Domtool (http://hcoop.sourceforge.net/)
!  * Copyright (c) 2006, Adam Chlipala
   *
   * This program is free software; you can redistribute it and/or
--- 1,4 ----
  (* HCoop Domtool (http://hcoop.sourceforge.net/)
!  * Copyright (c) 2006-2007, Adam Chlipala
   *
   * This program is free software; you can redistribute it and/or
***************
*** 354,357 ****
--- 354,358 ----
  val currentVhost = ref ""
  val currentVhostId = ref ""
+ val sslEnabled = ref false
  
  val pre = ref (fn _ : {user : string, nodes : string list, id : string, 
hostname : string} => ())
***************
*** 398,401 ****
--- 399,403 ----
                 currentVhost := fullHost;
                 currentVhostId := vhostId;
+                sslEnabled := Option.isSome ssl;
  
                 rewriteEnabled := false;
***************
*** 688,701 ****
                | _ => NONE
  
  val () = Env.action_one "authType"
         ("type", authType)
         (fn ty =>
!            (write "\tAuthType ";
!             write ty;
!             write "\n";
!             case ty of
!                 "kerberos" => 
!                 write "\tKrbMethodNegotiate off\n\tKrbMethodK5Passwd 
on\n\tKrbVerifyKDC off\n\tKrbAuthRealms HCOOP.NET\n\tKrbSaveCredentials on\n"
!               | _ => ()))
  
  val () = Env.action_one "authName"
--- 690,709 ----
                | _ => NONE
  
+ fun allowAuthType "kerberos" = !sslEnabled
+   | allowAuthType _ = true
+ 
  val () = Env.action_one "authType"
         ("type", authType)
         (fn ty =>
!            if allowAuthType ty then
!                (write "\tAuthType ";
!                 write ty;
!                 write "\n";
!                 case ty of
!                     "kerberos" => 
!                     write "\tKrbMethodNegotiate off\n\tKrbMethodK5Passwd 
on\n\tKrbVerifyKDC off\n\tKrbAuthRealms HCOOP.NET\n\tKrbSaveCredentials on\n"
!                   | _ => ())
!            else
!                print "WARNING: Skipped Kerberos authType because this isn't 
an SSL vhost.\n")
  
  val () = Env.action_one "authName"


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
hcoop-cvs mailing list
hcoop-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hcoop-cvs

Reply via email to