Re: pecl-kpasswd
| From: | Derick Rethans | Date: | Fri, 18 Mar 2011 12:28:00 +0000 |
| Subject: | Re: pecl-kpasswd | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-8068@lists.php.net to get a copy of this message | ||
On Thu, 17 Mar 2011, Tim Gustafson wrote:
> Back in December, I sent a sample to the list of a module that I've
> been trying to get working that allows you to change your Kerberos
> password from within PHP. The project stagnated at that point and I
> haven't have much time to work on it since the new year, but today I
> got some time again.
>
> I'm attaching what I've got so far. Right now, you can "phpize",
> "configure" and "make" this module, but "make test" always fails
> with:
>
> PHP Warning: PHP Startup: Invalid library (maybe not a PHP library)
> 'kpasswd.so' in Unknown on line 0
>
> I think this may have something to do with linking to libasn1. If I
> comment out the linking of all the extra kerberos-related libraries in
> config.m4 except krb5 itself, then "make test" gives me a different
> error:
There is a few things you do wrong on config.m4 at least. Although you
add the libraries:
PHP_ADD_LIBRARY(crypt,, KPASSWD_SHARED_LIBADD)
PHP_ADD_LIBRARY(roken,, KPASSWD_SHARED_LIBADD)
PHP_ADD_LIBRARY(asn1,, KPASSWD_SHARED_LIBADD)
PHP_ADD_LIBRARY(crypto,, KPASSWD_SHARED_LIBADD)
PHP_ADD_LIBRARY(com_err,, KPASSWD_SHARED_LIBADD)
PHP_ADD_LIBRARY(hx509,, KPASSWD_SHARED_LIBADD)
PHP_ADD_LIBRARY(krb5,, KPASSWD_SHARED_LIBADD)
You don't actually check whether the system has those available, and the
headers.
But in the code, you can simply do this to make it work:
diff -u pecl-kpasswd/kpasswd.c pecl-kpasswd-new//kpasswd.c
--- pecl-kpasswd/kpasswd.c 2011-03-17 21:32:14.000000000 +0000
+++ pecl-kpasswd-new//kpasswd.c 2011-03-18 12:26:38.000000000 +0000
@@ -1,6 +1,10 @@
#include "php.h"
#include "php_kpasswd.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
static function_entry kpasswd_functions[] = {
PHP_FE(kpasswd_set_password, NULL)
{NULL, NULL, NULL}
cheers,
Derick
--
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug