Re: Creating a New Port: /usr/ports/security/pecl-kadm5
On Wednesday 16 September 2009 02:16:07 Tim Gustafson wrote: Ah yes, didn't test on earlier versions. It's passed midnight here, but I'll add fixes for 7 and 6.x if possible. You probably need to add -lroken to the link chain for this. If you get what's happening in files/patch-config.m4 you can try and fix it yourself. Thanks for all your help on this - I'm really getting excited about the prospect of using this library. I've been holding out for like a year now. :\ I got a bit further than before - I'm attaching the updated files/patch-config.m4 file. I added roken and also com_err. The library compiles and I can call functions in it. However, this is what I'm getting in the Apache error log now: foo/ad...@blah.local's Password: It looks like it's trying to prompt me for a password interactively over STDERR or something at the server level. The latest release is 2003 so it looks largely unmaintained :/. I don't have a kerberos server available that I can play with, without upsetting people :). There's also no docs available that specify if this module is meant to be working through a webserver. However, you did specify a password for kadm5_init_with_password in php? If you have some php testcode, I can see if I can steal a jail to setup a test kerberos server. -- Mel ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Creating a New Port: /usr/ports/security/pecl-kadm5
The latest release is 2003 so it looks largely unmaintained :/. I don't have a kerberos server available that I can play with, without upsetting people :). There's also no docs available that specify if this module is meant to be working through a webserver. However, you did specify a password for kadm5_init_with_password in php? If you have some php testcode, I can see if I can steal a jail to setup a test Kerberos server. Yeah, I noticed that the PECL module itself was unmaintained at this point, but I was hoping that it was functional. Yes, I'm specifying a password to kadm5_init_with_password. Please see attached PHP script, which runs under Apache-level authentication. If I run this from the command line, it does indeed prompt me interactively for a password. I'm wondering if that's a function of the PECL library itself, or if it's due to something internal to Kerberos that's changed since the PECL module was released. I guess I'm going to have to learn some more C if I want this to work. :( Tim Gustafson Baskin School of Engineering UC Santa Cruz t...@soe.ucsc.edu 831-459-5354 attachment: kerberos.php ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Creating a New Port: /usr/ports/security/pecl-kadm5
On Friday 11 September 2009 02:36:25 Tim Gustafson wrote: I'm trying to create a new port. To get myself started, I copied pecl-hash and then modified the Makefile and the distinfo file. When I try to make my port, it downloads the file from the PECL repository, extracts it, runs configure and then starts compiling, but in the end I get a bunch of errors from cc about undefined constants: kadm5.c: In function 'kadm5_error': kadm5.c:285: error: 'KADM5_FAILURE' undeclared (first use in this function) kadm5.c:285: error: (Each undeclared identifier is reported only once kadm5.c:285: error: for each function it appears in.) kadm5.c:288: error: 'KADM5_AUTH_GET' undeclared (first use in this function) kadm5.c:291: error: 'KADM5_AUTH_ADD' undeclared (first use in this function) So, I manually edited work/kadm5-0.2.3/kadm5.c and added: #include kadm5/kadm5_err.h That file has -most- of the needed declarations, but there are a few more that aren't there, and I'm thinking the version of Kerberos that's installed in FreeBSD 7.2 just doesn't have those declarations (the two missing declarations are for KADM5_AUTH_SETKEY and KADM5_SETKEY_DUP_ENCTYPES). So, my first question is: How can I tell my port to patch work/kadm5-0.2.3/kadm5.c with the needed line above? My second question is: Is there a proper way to hack the needed values into kadm5_err.h? Should I make a new .h file and include it as part of the port only? And last but not least: After I manually patched the kadm5.c file and hacked the missing declarations into kadm5_err.h, I get a different set of errors: kadm5.c: In function 'kadm5_error': kadm5.c:440: error: label at end of compound statement kadm5.c: In function 'zif_kadm5_get_principals': kadm5.c:1048: warning: passing argument 3 of 'kadm5_free_name_list' makes pointer from integer without a cast kadm5.c: In function 'zif_kadm5_get_policies': kadm5.c:1184: warning: passing argument 3 of 'kadm5_free_name_list' makes pointer from integer without a cast Now, I am not a C programmer. I took a C class in about 1996 and that's more or less the last I've done in C. Is there anyone out there who might be kind enough to help me get this port working? I have a real need for Kerberos administration from within PHP, and this PECL library being absent has been a stumbling block for a long time now. Could shar(1) your current work? I can likely fix the issues you're seeing, but it would be nice if you can save me some cycles finding the urls and making the distinfo. How to shar a port is I think covered in the porters handbook. In short: cd /usr/ports shar `find category/portname -type f` /tmp/portname.sh. -- Mel ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Creating a New Port: /usr/ports/security/pecl-kadm5
Could shar(1) your current work? I can likely fix the issues you're seeing, but it would be nice if you can save me some cycles finding the urls and making the distinfo. How to shar a port is I think covered in the porters handbook. In short: cd /usr/ports shar `find category/portname -type f` /tmp/portname.sh. I'm attaching the file as a ZIP (so that it doesn't get clobbered anywhere). Thanks for your help - I really appreciate it! Tim Gustafson Baskin School of Engineering UC Santa Cruz t...@soe.ucsc.edu 831-459-5354 ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Creating a New Port: /usr/ports/security/pecl-kadm5
On Tuesday 15 September 2009 18:29:13 Tim Gustafson wrote: Could shar(1) your current work? I can likely fix the issues you're seeing, but it would be nice if you can save me some cycles finding the urls and making the distinfo. How to shar a port is I think covered in the porters handbook. In short: cd /usr/ports shar `find category/portname -type f` /tmp/portname.sh. I'm attaching the file as a ZIP (so that it doesn't get clobbered anywhere). Thanks for your help - I really appreciate it! Here you go: php -i: kadm5 kadm5 support = enabled You will have to test if this works as expected. I just made it compile and link. -- Mel # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering sh file. Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # security/pecl-kadm5 # security/pecl-kadm5/Makefile # security/pecl-kadm5/distinfo # security/pecl-kadm5/pkg-descr # security/pecl-kadm5/files # security/pecl-kadm5/files/patch-config.m4 # security/pecl-kadm5/files/patch-kadm5.c # security/pecl-kadm5/out # security/pecl-kadm5/err # echo c - security/pecl-kadm5 mkdir -p security/pecl-kadm5 /dev/null 21 echo x - security/pecl-kadm5/Makefile sed 's/^X//' security/pecl-kadm5/Makefile '4bc45574b886d0973c667fac52a88143' X# Ports collection makefile for: pecl-kadm5 X# Date created: 2009-09-10 X# Whom: Tim Gustafson t...@soe.ucsc.edu X# X# $FreeBSD$ X# X XPORTNAME= kadm5 XDISTVERSION= 0.2.3 XCATEGORIES=security www XMASTER_SITES= http://pecl.php.net/get/ XPKGNAMEPREFIX= pecl- XEXTRACT_SUFX= .tgz XDIST_SUBDIR= PECL X XMAINTAINER=t...@soe.ucsc.edu XCOMMENT= Kerberos Admin Module for PHP X XUSE_PHP= yes XUSE_PHPEXT=yes XDEFAULT_PHP_VER=5 X X.include bsd.port.mk 4bc45574b886d0973c667fac52a88143 echo x - security/pecl-kadm5/distinfo sed 's/^X//' security/pecl-kadm5/distinfo 'f740f39faefa93fed072b1a5f9aff7c2' XMD5 (PECL/kadm5-0.2.3.tgz) = 2b393f22232496fb799c452dd3868227 XSHA256 (PECL/kadm5-0.2.3.tgz) = 82423432ebbf7fd827b9049e760ec5139d5661f731854256a1adc43a239f2b37 XSIZE (PECL/kadm5-0.2.3.tgz) = 23090 f740f39faefa93fed072b1a5f9aff7c2 echo x - security/pecl-kadm5/pkg-descr sed 's/^X//' security/pecl-kadm5/pkg-descr 'fb602e7c4f1a8b1c868cf521efbe635a' XThis port enabled the KADM5 module for PHP5. fb602e7c4f1a8b1c868cf521efbe635a echo c - security/pecl-kadm5/files mkdir -p security/pecl-kadm5/files /dev/null 21 echo x - security/pecl-kadm5/files/patch-config.m4 sed 's/^X//' security/pecl-kadm5/files/patch-config.m4 '9e9aa0e8f5d01d840f913b43d4c107be' X--- config.m4.orig 2003-05-09 16:28:45.0 +0200 X+++ config.m4 2009-09-15 23:41:56.0 +0200 X@@ -34,6 +34,28 @@ Xfi X done X fi X+ SEARCH_PATH=/usr/local/include /usr/include /usr/src/krb5-1.2.4/src/include X+ SEARCH_FOR=kadm5/kadm5_err.h X+ AC_MSG_CHECKING(for kadm5/kadm5_err.h) X+ for i in $SEARCH_PATH ; do X+if test -r $i/$SEARCH_FOR; then X+ AC_DEFINE(HAVE_KADM5_ERR_H, [], [Wether kadm5/kadm5_err.h is present]) X+ AC_MSG_RESULT(found in $i) X+fi X+ done X+ AC_MSG_CHECKING(various enum values) X+ ENUMS=KADM5_AUTH_SETKEY KADM5_SETKEY_DUP_ENCTYPES X+ found=0 X+ for i in $ENUMS; do X+if grep -q $i $KADM5_DIR/*; then X+ AC_DEFINE([HAVE_$i], [], [System has $i]) X+ AC_MSG_RESULT($i) X+ found=1 X+fi X+ done X+ if test $found -eq 0; then X+AC_MSG_RESULT(none) X+ fi X X if test -z $KADM5_DIR; then X AC_MSG_RESULT(not found) X@@ -56,10 +78,12 @@ X PHP_SUBST(KADM5_SHARED_LIBADD) X PHP_ADD_LIBRARY_WITH_PATH(kadm5clnt, /usr/lib, KADM5_SHARED_LIBADD) X dnl PHP_ADD_LIBRARY_WITH_PATH(kdb5, /usr/lib, KADM5_SHARED_LIBADD) X- PHP_ADD_LIBRARY_WITH_PATH(gssrpc, /usr/lib, KADM5_SHARED_LIBADD) X+ dnl not needed in FreeBSD PHP_ADD_LIBRARY_WITH_PATH(gssrpc, /usr/lib, KADM5_SHARED_LIBADD) X PHP_ADD_LIBRARY_WITH_PATH(krb5, /usr/lib, KADM5_SHARED_LIBADD) X- PHP_ADD_LIBRARY_WITH_PATH(k5crypto, /usr/lib, KADM5_SHARED_LIBADD) X- PHP_ADD_LIBRARY_WITH_PATH(dyn, /usr/lib, KADM5_SHARED_LIBADD) X+ dnl not needed in FreeBSD PHP_ADD_LIBRARY_WITH_PATH(k5crypto, /usr/lib, KADM5_SHARED_LIBADD) X+ dnl not needed in FreeBSD PHP_ADD_LIBRARY_WITH_PATH(dyn, /usr/lib, KADM5_SHARED_LIBADD) X+ dnl needed for FreeBSD: X+ PHP_ADD_LIBRARY_WITH_PATH(asn1, /usr/lib, KADM5_SHARED_LIBADD) X X PHP_EXTENSION(kadm5, $ext_shared) X fi 9e9aa0e8f5d01d840f913b43d4c107be echo x - security/pecl-kadm5/files/patch-kadm5.c sed 's/^X//' security/pecl-kadm5/files/patch-kadm5.c '3ad0cac2c6984eaf3261c558d078ba70' X--- kadm5.c.orig 2003-05-28 12:51:42.0 +0200 X+++ kadm5.c2009-09-15 23:21:35.0 +0200 X@@ -30,6 +30,9 @@ X #endif X X #include kadm5/admin.h X+#ifdef HAVE_KADM5_ERR_H
Re: Creating a New Port: /usr/ports/security/pecl-kadm5
On Tuesday 15 September 2009 23:50:50 Mel Flynn wrote: On Tuesday 15 September 2009 18:29:13 Tim Gustafson wrote: Could shar(1) your current work? I can likely fix the issues you're seeing, but it would be nice if you can save me some cycles finding the urls and making the distinfo. How to shar a port is I think covered in the porters handbook. In short: cd /usr/ports shar `find category/portname -type f` /tmp/portname.sh. I'm attaching the file as a ZIP (so that it doesn't get clobbered anywhere). Thanks for your help - I really appreciate it! Here you go: php -i: kadm5 kadm5 support = enabled You will have to test if this works as expected. I just made it compile and link. Eep, sorry for not cleaning up the test output. I was checking if make test can be run, but run-tests.php doesn't work without full source as it screws with LD_LIBRARY_PATH. -- Mel ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Creating a New Port: /usr/ports/security/pecl-kadm5
On Wednesday 16 September 2009 00:02:49 Tim Gustafson wrote: You will have to test if this works as expected. I just made it compile and link. Awesome, thanks! I've got it complied and installed. Here's what I get when I use this library now: /libexec/ld-elf.so.1: /usr/lib/libkrb5.so.9: Undefined symbol issuid Is that enough to go on, or do you need more info? Ah yes, didn't test on earlier versions. It's passed midnight here, but I'll add fixes for 7 and 6.x if possible. You probably need to add -lroken to the link chain for this. If you get what's happening in files/patch-config.m4 you can try and fix it yourself. -- Mel ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Creating a New Port: /usr/ports/security/pecl-kadm5
Ah yes, didn't test on earlier versions. It's passed midnight here, but I'll add fixes for 7 and 6.x if possible. You probably need to add -lroken to the link chain for this. If you get what's happening in files/patch-config.m4 you can try and fix it yourself. Thanks for all your help on this - I'm really getting excited about the prospect of using this library. I've been holding out for like a year now. :\ I got a bit further than before - I'm attaching the updated files/patch-config.m4 file. I added roken and also com_err. The library compiles and I can call functions in it. However, this is what I'm getting in the Apache error log now: foo/ad...@blah.local's Password: It looks like it's trying to prompt me for a password interactively over STDERR or something at the server level. Tim Gustafson Baskin School of Engineering UC Santa Cruz t...@soe.ucsc.edu 831-459-5354 patch-config.m4 Description: Binary data ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Creating a New Port: /usr/ports/security/pecl-kadm5
I'm trying to create a new port. To get myself started, I copied pecl-hash and then modified the Makefile and the distinfo file. When I try to make my port, it downloads the file from the PECL repository, extracts it, runs configure and then starts compiling, but in the end I get a bunch of errors from cc about undefined constants: kadm5.c: In function 'kadm5_error': kadm5.c:285: error: 'KADM5_FAILURE' undeclared (first use in this function) kadm5.c:285: error: (Each undeclared identifier is reported only once kadm5.c:285: error: for each function it appears in.) kadm5.c:288: error: 'KADM5_AUTH_GET' undeclared (first use in this function) kadm5.c:291: error: 'KADM5_AUTH_ADD' undeclared (first use in this function) So, I manually edited work/kadm5-0.2.3/kadm5.c and added: #include kadm5/kadm5_err.h That file has -most- of the needed declarations, but there are a few more that aren't there, and I'm thinking the version of Kerberos that's installed in FreeBSD 7.2 just doesn't have those declarations (the two missing declarations are for KADM5_AUTH_SETKEY and KADM5_SETKEY_DUP_ENCTYPES). So, my first question is: How can I tell my port to patch work/kadm5-0.2.3/kadm5.c with the needed line above? My second question is: Is there a proper way to hack the needed values into kadm5_err.h? Should I make a new .h file and include it as part of the port only? And last but not least: After I manually patched the kadm5.c file and hacked the missing declarations into kadm5_err.h, I get a different set of errors: kadm5.c: In function 'kadm5_error': kadm5.c:440: error: label at end of compound statement kadm5.c: In function 'zif_kadm5_get_principals': kadm5.c:1048: warning: passing argument 3 of 'kadm5_free_name_list' makes pointer from integer without a cast kadm5.c: In function 'zif_kadm5_get_policies': kadm5.c:1184: warning: passing argument 3 of 'kadm5_free_name_list' makes pointer from integer without a cast Now, I am not a C programmer. I took a C class in about 1996 and that's more or less the last I've done in C. Is there anyone out there who might be kind enough to help me get this port working? I have a real need for Kerberos administration from within PHP, and this PECL library being absent has been a stumbling block for a long time now. Tim Gustafson Baskin School of Engineering UC Santa Cruz t...@soe.ucsc.edu 831-459-5354 ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Creating a New Port: /usr/ports/security/pecl-kadm5
Hi. On Thu, 10 Sep 2009 20:36:25 -0400, Tim Gustafson t...@soe.ucsc.edu wrote: I'm trying to create a new port. To get myself started, I copied pecl-hash and then modified the Makefile and the distinfo file. When I try to make my port, it downloads the file from the PECL repository, extracts it, runs configure and then starts compiling, but in the end I get a bunch of errors from cc about undefined constants: [snip] So, my first question is: How can I tell my port to patch work/kadm5-0.2.3/kadm5.c with the needed line above? You will want to create a '-patch' line in the Makefile. See the following as a reference: http://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html My second question is: Is there a proper way to hack the needed values into kadm5_err.h? Should I make a new .h file and include it as part of the port only? You can create a ${PORTNAME}/files directory containing the file(s) you need, specific to your port and FreeBSD. See the following link for more information: http://www.freebsd.org/doc/en/books/porters-handbook/install.html And last but not least: After I manually patched the kadm5.c file and hacked the missing declarations into kadm5_err.h, I get a different set of errors: [snip] Sorry. There are lots of experienced folks who can help with C errors. I, unfortunately, am not one of them. You may want to bookmark this, as well: http://www.freebsd.org/doc/en/books/porters-handbook/ Cheers, -- Glen Barber ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org