PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » Auth » Bug #9479

Typo in _checkServer causes failure - Fix Included.

Details

Submitted2006-11-27 19:13 UTC
Fromkhanreaper at nerp dot net
Assignedaashley
StatusClosed
PackageAuth
PHP Version4.4.2
OSLinux
Roadmaps(Not assigned)

Comments

[2006-11-27 19:13 UTC] khanreaper at nerp dot net

Description:
------------
There is a typo in KADM5.php in the _checkServer function
that causes this function to fail. The documentation for
KADM5 states that the option to be passed for the Kerberos
server should be "hostname," but this function refers to
the option as "host," which consequently fails.

I searched through the remainder of KADM5.php to see
if "host" appeared, but it doesn't. Included is a patch to
remedy this situation. It appears to still affect CVS
code.

Test script:
---------------
--- KADM5.php.orig 2006-11-27 13:08:11.042770750 -0600
+++ KADM5.php 2006-11-27 13:08:13.790942500 -0600
@@ -153,13 +153,13 @@
* @access private
*/
function _checkServer() {
- $fp = @fsockopen ($this->options['host'], 88, $errno, $errstr, $this->options['timeout']);
+ $fp = @fsockopen ($this->options['hostname'], 88, $errno, $errstr, $this->options['timeout']);
if (is_resource($fp)) {
@fclose($fp);
} else {
print_r($this->options);
$message = "Error connecting to Kerberos V server "
- .$this->options['host'].":".$this->options['port'];
+ .$this->options['hostname'].":".$this->options['port'];
return PEAR::raiseError($message, 41, PEAR_ERROR_DIE);
}
}

Expected result:
----------------
_checkServer actually works.

Actual result:
--------------
_checkServer fails.

[2006-12-06 00:33 UTC] aashley at php dot net

This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.