[LON-CAPA-cvs] cvs: loncom / lond /auth localauth.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 19 Jan 2007 02:58:18 -0000
albertel Thu Jan 18 21:58:18 2007 EDT
Modified files:
/loncom/auth localauth.pm
/loncom lond
Log:
- allow for and log negative values from localauth
Index: loncom/auth/localauth.pm
diff -u loncom/auth/localauth.pm:1.4 loncom/auth/localauth.pm:1.5
--- loncom/auth/localauth.pm:1.4 Mon Jan 8 11:24:26 2007
+++ loncom/auth/localauth.pm Thu Jan 18 21:57:33 2007
@@ -1,6 +1,6 @@
# The LON-CAPA dummy localauthentication mechnism
#
-# $Id: localauth.pm,v 1.4 2007/01/08 16:24:26 albertel Exp $
+# $Id: localauth.pm,v 1.5 2007/01/19 02:57:33 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -34,7 +34,10 @@
# - the typed in password
# - the optional information that was stored when the authentication
# mechanism was specified
+# - the domain that was typed in
# It is expected to return a 1 if the user is authenticated and a 0 otherwise
+# it can optionally return a negative value for an error condition. This
+# negative value will get logged along with the user that caused it
# ----START LOCAL CHANGES HERE ----- DON'T DELETE THIS LINE
sub localauth {
my ($username,$password,$optional_argument,$domain) = @_;
Index: loncom/lond
diff -u loncom/lond:1.356 loncom/lond:1.357
--- loncom/lond:1.356 Sun Jan 14 20:08:28 2007
+++ loncom/lond Thu Jan 18 21:58:17 2007
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.356 2007/01/15 01:08:28 raeburn Exp $
+# $Id: lond,v 1.357 2007/01/19 02:58:17 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,7 +44,6 @@
use GDBM_File;
use Authen::Krb4;
use Authen::Krb5;
-use lib '/home/httpd/lib/perl/';
use localauth;
use localenroll;
use localstudentphoto;
@@ -60,7 +59,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.356 $'; #' stupid emacs
+my $VERSION='$Revision: 1.357 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -5896,6 +5895,10 @@
$password,
$contentpwd,
$domain);
+ if ($validate < 0) {
+ &logthis("localauth for $contentpwd $user:$domain returned a $validated");
+ $validated = 0;
+ }
} else { # Unrecognized auth is also bad.
$validated = 0;
}