Page 1 of 1
specifing policy on kadm5_create_principal()
Posted: Wed Oct 04, 2006 4:31 am
by vongodric
Anyone else has this problem? How to fix it?
Description:
Basically same code as php.net manual example gives error:
Warning: No policy specified for blaah...; assigning "default" .
Reproduce code:
Code: Select all
$attributes=KRB5_KDB_REQUIRES_PRE_AUTH|KRB5_KDB_DISALLOW_PROXIABLE;
$options = array(KADM5_PRINC_EXPIRE_TIME => 0,
KADM5_PW_EXPIRATION => 0,
KADM5_POLICY => "default",
KADM5_ATTRIBUTES => $attributes);
return kadm5_modify_principal($this->krb_con,"principal/default@EXAMPLE.COM",$options);
Expected result:
no errors
Actual result:
warning, that no policy was specified and a default policy was assigned
Posted: Wed Oct 04, 2006 6:15 am
by volka
http://pecl.php.net/bugs/bug.php?id=8334
Actual result:
warning, that no policy was specified and a default policy was assigned
is it one of those
Code: Select all
php_error(E_WARNING, "No policy specified for %s; assigning \"default\"", princstr);
...
php_error(E_WARNING, "No policy specified for %s; defaulting to no policy", princstr);
?
I find such an error message only in PHP_FUNCTION(kadm5_
create_principal),
http://viewcvs.php.net/viewvc.cgi/pecl/ ... notate=1.2
not in PHP_FUNCTION(kadm5_
modify_principal).
Posted: Wed Oct 04, 2006 6:52 am
by vongodric
Yes I know this post. The guy who made it is like two rooms away from me. But no one responded and developer of the package hasn't replyed to emails either.
I believe it's on line 621 or 626. I'v looked at the source myself too, but don't really know hot to compile it. So I thought to ask if someone else had this problem and have solved it somehow. But if someone can help me to compile it I'm sure I could figure out the problem myself with some experimenting.
There is few odd things in the source: like line nr: 619 where it checks for flags
Code: Select all
if ((! (mask & KADM5_POLICY)) && (! (mask & KADM5_POLICY_CLR))) { ...
the thing is -mask is inited to 0 prior and is not modified till this point.
Posted: Wed Oct 04, 2006 6:55 am
by vongodric
Sry my mistake there. The correct is create of course. So sick of trying to solve it...
Posted: Wed Oct 04, 2006 7:09 am
by volka
This
Code: Select all
if ((! (mask & KADM5_POLICY)) && (! (mask & KADM5_POLICY_CLR))) {
is before the
block.
Taking into account that dummybuf in modify_principle is initialized but never used I guess the code is incomplete or was in a state of flux until the developer lost interest...
Posted: Wed Oct 04, 2006 7:15 am
by vongodric
yes I noticed that too.
But I can't figure out how to compile it... I'm on linux but not a linux used and have little knowledge of autotools or php module development. So if someone could direct me in the right way so I could compile maybe I can then fix the problems too.
tnx in advance
Posted: Wed Oct 04, 2006 8:47 am
by volka
Which version of php do you use and where did you get it (shipped with distribution, compiled from php.net source, ....)?
And the KADM5 extension?
Which linux distribution?
maybe of interest:
http://livedocs.phpdoc.info/index.php?l ... stall.pecl
http://www.php.net/manual/en/install.unix.php
http://www.zend.com/php/internals/exten ... iting1.php
Posted: Wed Oct 04, 2006 9:03 am
by vongodric
I use Suse 10.1 and have the php5 (included with distribution. 5.1.2) also I have downloaded and builded the kerberos (latest)
Posted: Wed Oct 04, 2006 9:12 am
by volka
vongodric wrote:also I have downloaded and builded the kerberos (latest)
Does this relate to the keberos server or to the PECL extension for php?
anyway,
http://livedocs.phpdoc.info/index.php?l ... stall.pecl should give you a start
Posted: Thu Oct 05, 2006 1:45 am
by vongodric
I believe it's the server. It has also the header files needed by the extension.
Anyway big tnx to you volka. I'll try to dig myself through this now.