- Update to 1.2

- Use Makefile.modules.3rd
This commit is contained in:
Clement Laforet 2004-10-14 10:11:53 +00:00
parent ac81ebb321
commit 9af82e3cae
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=119397
4 changed files with 12 additions and 91 deletions

View file

@ -6,7 +6,7 @@
#
PORTNAME= mod_cfg_ldap
PORTVERSION= 1.0
PORTVERSION= 1.2
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME:S/_//g}
@ -15,22 +15,23 @@ DIST_SUBDIR= apache2
MAINTAINER= apache@FreeBSD.org
COMMENT= Allows you to keep your virtual host configuration in a LDAP directory
USE_APACHE= YES
WITH_APACHE2= YES
WANT_APACHE= 2
USE_OPENLDAP= YES
AP_FAST_BUILD= YES
AP_GENPLIST= YES
APXS?= ${LOCALBASE}/sbin/apxs
LDAP_INC?= ${LOCALBASE}/include
LDAP_LIB?= ${LOCALBASE}/lib -lldap
AP_INC+= ${LDAP_INC}
AP_LIB+= ${LDAP_LIB}
PORTDOCS= AUTHORS cfg_ldap.conf ChangeLog COPYING INSTALL \
mod_cfg_ldap.schema README TODO
do-build:
@(cd ${WRKSRC} && ${APXS} -I ${LDAP_INC} -L ${LDAP_LIB} -c ${PORTNAME}.c)
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/www/apache2/Makefile.modules.3rd"
do-install:
@(cd ${WRKSRC} && ${APXS} -n ${PORTNAME:S/mod_//} -A -i ${PORTNAME}.la)
post-install:
.if !defined (NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
. for f in ${PORTDOCS}
@ -38,4 +39,4 @@ do-install:
. endfor
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View file

@ -1,2 +1,2 @@
MD5 (apache2/mod_cfg_ldap-1.0.tar.gz) = 8e556a9cff882cb616db322f74f20355
SIZE (apache2/mod_cfg_ldap-1.0.tar.gz) = 5023
MD5 (apache2/mod_cfg_ldap-1.2.tar.gz) = 055924d6488608f684b22e7b04cea2ea
SIZE (apache2/mod_cfg_ldap-1.2.tar.gz) = 6356

View file

@ -1,76 +0,0 @@
--- mod_cfg_ldap.c.orig Mon Nov 17 15:06:22 2003
+++ mod_cfg_ldap.c Mon Nov 17 15:08:22 2003
@@ -85,11 +85,11 @@
cfg_ldap_init_ldap (apr_pool_t * p, server_rec * s)
{
cfg_ldap_cfg *cfg;
+ int rc;
cfg =
(cfg_ldap_cfg *) ap_get_module_config (s->module_config,
&cfg_ldap_module);
- int rc;
ld = ldap_init (cfg->hostname, LDAP_PORT);
rc = ldap_simple_bind_s (ld, cfg->username, cfg->password);
@@ -154,22 +154,30 @@
cfg_ldap_read_vhost_from_ldap (apr_pool_t * p, server_rec * s, char *hostname)
{
cfg_ldap_cfg *cfg;
+ cfg_ldap_vhost *vhost;
+ char *filter;
+ int rc,count;
+ LDAPMessage *res;
+ LDAPMessage *entry;
+ char *attr;
+ BerElement *ber;
+ char **val = NULL;
+ char *vhost_name = NULL;
+ char *vhost_admin = NULL;
+ char *vhost_docroot = NULL;
+
cfg =
(cfg_ldap_cfg *) ap_get_module_config (s->module_config,
&cfg_ldap_module);
- cfg_ldap_vhost *vhost;
vhost = (cfg_ldap_vhost *) apr_pcalloc (p, sizeof (cfg_ldap_vhost));
vhost->timestamp = apr_time_now ();
vhost->name = CFG_LDAP_NO_SUCH_VHOST;
- char *filter;
filter =
apr_pstrcat (p, "(|(apacheServerName=", hostname, ")(apacheServerAlias=",
hostname, "))", NULL);
- int rc;
- LDAPMessage *res;
rc = ldap_search_s (ld, cfg->basedn, LDAP_SCOPE_SUBTREE, filter,
(char **) &attrs, 0, &res);
@@ -185,10 +193,9 @@
return vhost;
}
- LDAPMessage *entry;
entry = ldap_first_entry (ld, res);
- int count = ldap_count_entries (ld, res);
+ count = ldap_count_entries (ld, res);
if (count == 0)
{
return vhost;
@@ -199,13 +206,6 @@
"cfg_ldap: more than one entry for %s", hostname);
return vhost;
}
-
- char *attr;
- BerElement *ber;
- char **val = NULL;
- char *vhost_name = NULL;
- char *vhost_admin = NULL;
- char *vhost_docroot = NULL;
for (attr = ldap_first_attribute (ld, entry, &ber);
attr != NULL; attr = ldap_next_attribute (ld, entry, ber))

View file

@ -1,4 +0,0 @@
libexec/apache2/mod_cfg_ldap.so
@exec %D/sbin/apxs -e -A -n cfg_ldap %D/%f
@unexec %D/sbin/apxs -e -A -n cfg_ldap %D/%f
@unexec echo "===> If you do not plan on reinstalling mod_cfg_ldap, you must manually remove"; echo "===> references to it in httpd.conf."