version 1.10, 2004/01/14 21:03:31
|
version 1.11, 2004/03/18 00:24:57
|
Line 243 sub update_LC {
|
Line 243 sub update_LC {
|
$authparam = $autharg; |
$authparam = $autharg; |
} |
} |
if ($auth =~ m/^krb/) { |
if ($auth =~ m/^krb/) { |
$auth .= ":".$authparam; |
$auth .= ':'.$authparam; |
} |
} |
if ( ($end eq '') || (!defined($end)) ) { |
if ( ($end eq '') || (!defined($end)) ) { |
$end = $enddate; |
$end = $enddate; |
Line 263 sub update_LC {
|
Line 263 sub update_LC {
|
my $authchk = ''; |
my $authchk = ''; |
unless ($authparam eq '') { $authchk = 'ok'; }; |
unless ($authparam eq '') { $authchk = 'ok'; }; |
# If no account exists and passwords should be generated |
# If no account exists and passwords should be generated |
if ($authtype eq "int") { |
if ($auth eq "internal") { |
if ($authparam eq '') { |
if ($authparam eq '') { |
($authparam) = &create_password(); |
($authparam) = &create_password(); |
if ($authparam eq '') { |
if ($authparam eq '') { |
$authchk = ''; |
$authchk = ''; |
} else { |
} else { |
$create_passwd = 1; |
$create_passwd = 1; |
|
$authchk = 'ok'; |
} |
} |
} |
} |
} elsif ($authtype eq "local") { |
} elsif ($auth eq "localauth") { |
($authparam,$create_passwd,$authchk) = &localenroll::create_password($authparam); |
($authparam,$create_passwd,$authchk) = &localenroll::create_password($authparam); |
} elsif ($authtype =~ m/^krb/) { |
} elsif ($auth =~ m/^krb/) { |
if ($authparam eq '') { |
if ($authparam eq '') { |
$$logmsg .= "No Kerberos domain was provided for the new user - $uname, so the new student was not enrolled in the course.".$linefeed; |
$$logmsg .= "No Kerberos domain was provided for the new user - $uname, so the new student was not enrolled in the course.".$linefeed; |
$authchk = 'invalid'; |
$authchk = 'invalid'; |
Line 344 sub update_LC {
|
Line 345 sub update_LC {
|
if ($currentauth=~/^krb(4|5):/) { |
if ($currentauth=~/^krb(4|5):/) { |
$currentauth=~/^krb(4|5):(.*)/; |
$currentauth=~/^krb(4|5):(.*)/; |
$krbdefdom=$1; |
$krbdefdom=$1; |
} |
} elsif ($currentauth=~ /^(unix|internal|localauth):/) { |
if ($currentauth=~/^krb(4|5):/ || |
$currentauth = $1; |
$currentauth=~/^unix:/ || |
|
$currentauth=~/^internal:/ || |
|
$currentauth=~/^localauth:/) { |
|
|
|
} else { |
} else { |
$$logmsg .= "Invalid authentication method $currentauth for $uname.".$linefeed; |
$$logmsg .= "Invalid authentication method $currentauth for $uname.".$linefeed; |
} |
} |
Line 539 sub process_date {
|
Line 536 sub process_date {
|
|
|
sub create_password { |
sub create_password { |
my $passwd = ''; |
my $passwd = ''; |
my @letts = "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"; |
my @letts = ("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"); |
for (my $i=0; $i<8; $i++) { |
for (my $i=0; $i<8; $i++) { |
my $lettnum = int (rand 2); |
my $lettnum = int (rand 2); |
my $item = ''; |
my $item = ''; |