[LON-CAPA-cvs] cvs: loncom / lond
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 11 Feb 2008 18:51:43 -0000
raeburn Mon Feb 11 13:51:43 2008 EDT
Modified files:
/loncom lond
Log:
- Starting with version 1.7, a perl module for Authen::Krb5 has begun to be included in standard repositories for Fedora 7 and 8 (previously rpms have come from the LON-CAPA repositories).
- The get_in_tkt_with_password() function seg faults in Authen::Krb rev 1.7 (the corresponding interface is deprecated in the Kerberos C libraries, but the Perl module docs indicate that it should continue to work.
- The function get_init_creds_password() is now used, where it exists, as it does not seg fault in 1.7.
Index: loncom/lond
diff -u loncom/lond:1.393 loncom/lond:1.394
--- loncom/lond:1.393 Sun Jan 6 21:21:35 2008
+++ loncom/lond Mon Feb 11 13:51:41 2008
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.393 2008/01/07 02:21:35 raeburn Exp $
+# $Id: lond,v 1.394 2008/02/11 18:51:41 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -59,7 +59,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.393 $'; #' stupid emacs
+my $VERSION='$Revision: 1.394 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -6046,11 +6046,18 @@
my $credentials= &Authen::Krb5::cc_default();
$credentials->initialize(&Authen::Krb5::parse_name($user.'@'
.$contentpwd));
- my $krbreturn = &Authen::Krb5::get_in_tkt_with_password($krbclient,
- $krbserver,
- $password,
- $credentials);
- $validated = ($krbreturn == 1);
+ my $krbreturn;
+ if (exists(&Authen::Krb5::get_init_creds_password)) {
+ $krbreturn =
+ &Authen::Krb5::get_init_creds_password($krbclient,$password,
+ $krbservice);
+ $validated = (ref($krbreturn) eq 'Authen::Krb5::Creds');
+ } else {
+ $krbreturn =
+ &Authen::Krb5::get_in_tkt_with_password($krbclient,$krbserver,
+ $password,$credentials);
+ $validated = ($krbreturn == 1);
+ }
if (!$validated) {
&logthis('krb5: '.$user.', '.$contentpwd.', '.
&Authen::Krb5::error());