[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm loncreateuser.pm londropadd.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 22 Aug 2002 21:05:25 -0000


albertel		Thu Aug 22 17:05:25 2002 EDT

  Modified files:              
    /loncom/interface	loncommon.pm loncreateuser.pm londropadd.pm 
  Log:
  - adding krb5 support
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.57 loncom/interface/loncommon.pm:1.58
--- loncom/interface/loncommon.pm:1.57	Thu Aug 22 17:02:49 2002
+++ loncom/interface/loncommon.pm	Thu Aug 22 17:05:25 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.57 2002/08/22 21:02:49 albertel Exp $
+# $Id: loncommon.pm,v 1.58 2002/08/22 21:05:25 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -755,6 +755,8 @@
 Kerberos authenticated with domain
 <input type="text" size="10" name="krbarg" value=""
        onchange="javascript:changed_text('krb',$in{'formname'});" />
+<input type="radio" name="krbver" value="4" checked="on" />Version 4
+<input type="radio" name="krbver" value="5" />Version 5
 END
     return $result;
 }
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.40 loncom/interface/loncreateuser.pm:1.41
--- loncom/interface/loncreateuser.pm:1.40	Wed Aug 21 13:18:08 2002
+++ loncom/interface/loncreateuser.pm	Thu Aug 22 17:05:25 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.40 2002/08/21 17:18:08 www Exp $
+# $Id: loncreateuser.pm,v 1.41 2002/08/22 21:05:25 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -47,7 +47,7 @@
 # 11/12,11/13,11/15 Scott Harrison
 # 02/11/02 Matthew Hall
 #
-# $Id: loncreateuser.pm,v 1.40 2002/08/21 17:18:08 www Exp $
+# $Id: loncreateuser.pm,v 1.41 2002/08/22 21:05:25 albertel Exp $
 ###
 
 package Apache::loncreateuser;
@@ -329,8 +329,8 @@
 	   $r->print('</table>');
         }  # End of unless
 	my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain);
-	if ($currentauth=~/^krb4:/) {
-	    $currentauth=~/^krb4:(.*)/;
+	if ($currentauth=~/^krb(4|5):/) {
+	    $currentauth=~/^krb(4|5):(.*)/;
 	    my $krbdefdom2=$1;
             my %param = ( formname => 'document.cu',
                           kerb_def_dom => $krbdefdom 
@@ -338,7 +338,7 @@
             $loginscript  = &Apache::loncommon::authform_header(%param);
 	}
 	# Check for a bad authentication type
-        unless ($currentauth=~/^krb4:/ or
+        unless ($currentauth=~/^krb(4|5):/ or
 		$currentauth=~/^unix:/ or
 		$currentauth=~/^internal:/ or
 		$currentauth=~/^localauth:/
@@ -376,7 +376,7 @@
         } else { # Authentication type is valid
 	    my $authformcurrent='';
 	    my $authform_other='';
-	    if ($currentauth=~/^krb4:/) {
+	    if ($currentauth=~/^krb(4|5):/) {
 		$authformcurrent=$authformkrb;
 		$authform_other="<p>$authformint</p>\n".
                     "<p>$authformfsys</p><p>$authformloc</p>";
@@ -541,7 +541,8 @@
     my $amode='';
     my $genpwd='';
     if ($ENV{'form.login'} eq 'krb') {
-	$amode='krb4';
+	$amode='krb';
+	$amode.=$ENV{'form.krbver'};
 	$genpwd=$ENV{'form.krbarg'};
     } elsif ($ENV{'form.login'} eq 'int') {
 	$amode='internal';
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.46 loncom/interface/londropadd.pm:1.47
--- loncom/interface/londropadd.pm:1.46	Wed Aug 21 13:18:08 2002
+++ loncom/interface/londropadd.pm	Thu Aug 22 17:05:25 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to drop and add students in courses 
 #
-# $Id: londropadd.pm,v 1.46 2002/08/21 17:18:08 www Exp $
+# $Id: londropadd.pm,v 1.47 2002/08/22 21:05:25 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -546,7 +546,8 @@
 	my $amode='';
         my $genpwd='';
         if ($ENV{'form.login'} eq 'krb') {
-           $amode='krb4';
+           $amode='krb';
+	   $amode.=$ENV{'form.krbver'};
            $genpwd=$ENV{'form.krbarg'};
         } elsif ($ENV{'form.login'} eq 'int') {
            $amode='internal';
@@ -928,7 +929,8 @@
     my $amode  = '';
     my $genpwd = '';
     if ($ENV{'form.login'} eq 'krb') {
-        $amode='krb4';
+        $amode='krb';
+	$amode.=$ENV{'form.krbver'};
         $genpwd=$ENV{'form.krbarg'};
     } elsif ($ENV{'form.login'} eq 'int') {
         $amode='internal';