[LON-CAPA-cvs] cvs: loncom(krb5_added) /interface loncreateuser.pm londropadd.pm

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


albertel		Thu Aug 22 17:22:31 2002 EDT

  Modified files:              (Branch: krb5_added)
    /loncom/interface	londropadd.pm loncreateuser.pm 
  Log:
  - krb5 stuff backport to version 0.5
  
  
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.45 loncom/interface/londropadd.pm:1.45.2.1
--- loncom/interface/londropadd.pm:1.45	Thu Aug  8 15:27:35 2002
+++ loncom/interface/londropadd.pm	Thu Aug 22 17:22:30 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to drop and add students in courses 
 #
-# $Id: londropadd.pm,v 1.45 2002/08/08 19:27:35 matthew Exp $
+# $Id: londropadd.pm,v 1.45.2.1 2002/08/22 21:22:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -548,7 +548,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';
@@ -930,7 +931,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/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.39 loncom/interface/loncreateuser.pm:1.39.2.1
--- loncom/interface/loncreateuser.pm:1.39	Thu Aug  8 15:27:35 2002
+++ loncom/interface/loncreateuser.pm	Thu Aug 22 17:22:30 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.39 2002/08/08 19:27:35 matthew Exp $
+# $Id: loncreateuser.pm,v 1.39.2.1 2002/08/22 21:22:30 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.39 2002/08/08 19:27:35 matthew Exp $
+# $Id: loncreateuser.pm,v 1.39.2.1 2002/08/22 21:22:30 albertel Exp $
 ###
 
 package Apache::loncreateuser;
@@ -328,8 +328,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 
@@ -337,7 +337,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:/
@@ -375,7 +375,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>";
@@ -535,7 +535,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';