aboutsummaryrefslogtreecommitdiffstats
path: root/net/tinyldap
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2008-04-26 04:23:03 +0800
committerdinoex <dinoex@FreeBSD.org>2008-04-26 04:23:03 +0800
commit97b0d2825fed2611eea85daf5cc6f35a0cc877dd (patch)
tree52e9c9f207cd55d3feef3aafa93edebd321c4bac /net/tinyldap
parent69ed49342d389cfb89246b1eae51c5cb568a463e (diff)
downloadfreebsd-ports-gnome-97b0d2825fed2611eea85daf5cc6f35a0cc877dd.tar.gz
freebsd-ports-gnome-97b0d2825fed2611eea85daf5cc6f35a0cc877dd.tar.zst
freebsd-ports-gnome-97b0d2825fed2611eea85daf5cc6f35a0cc877dd.zip
- update to 20080425
better ACL support
Diffstat (limited to 'net/tinyldap')
-rw-r--r--net/tinyldap/Makefile11
-rw-r--r--net/tinyldap/distinfo6
-rw-r--r--net/tinyldap/files/patch-Makefile36
-rw-r--r--net/tinyldap/files/patch-auth.c9
-rw-r--r--net/tinyldap/files/patch-ldif.h10
-rw-r--r--net/tinyldap/files/patch-md5password.c9
-rw-r--r--net/tinyldap/files/patch-mstorage_add.c11
-rw-r--r--net/tinyldap/files/patch-mstorage_add_bin.c11
-rw-r--r--net/tinyldap/files/patch-tinyldap.c97
-rw-r--r--net/tinyldap/pkg-plist7
10 files changed, 67 insertions, 140 deletions
diff --git a/net/tinyldap/Makefile b/net/tinyldap/Makefile
index 0ffea258fd18..2bd657a8f878 100644
--- a/net/tinyldap/Makefile
+++ b/net/tinyldap/Makefile
@@ -17,17 +17,18 @@ COMMENT= A small LDAP implementation
BUILD_DEPENDS+= ${LOCALBASE}/lib/libowfat.a:${PORTSDIR}/${LIBOWFAT_PORT}
-SNAPSHOT= 20040323
+SNAPSHOT= 20080425
USE_BZIP2= yes
USE_GMAKE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
CFLAGS+= -DATTRIBS=512
LIBOWFAT_PORT?= devel/libowfat
TINYLDAP_DATA?= ${PREFIX}/tinyldap/data
-SBINFILES= dumpidx idx2ldif addindex parse tinyldap_debug \
- tinyldap_standalone
-BINFILES= ldapclient ldapclient_str md5password
-DOCFILES= FORMAT GETTING.STARTED README RFCs THANKS TODO
+SBINFILES= acl addindex bindrequest dumpacls dumpidx idx2ldif parse \
+ tinyldap_debug tinyldap_standalone
+BINFILES= ldapclient ldapclient_str ldapdelete md5password mysql2ldif
+DOCFILES= ACL FORMAT GETTING.STARTED README README.security RFCs \
+ THANKS TODO
post-patch:
${TOUCH} ${WRKSRC}/alloca.h
diff --git a/net/tinyldap/distinfo b/net/tinyldap/distinfo
index b24ec69545b6..f6ab50912a19 100644
--- a/net/tinyldap/distinfo
+++ b/net/tinyldap/distinfo
@@ -1,3 +1,3 @@
-MD5 (tinyldap-20040323.tar.bz2) = 0153fa998499f0e21dab26f29e82eed9
-SHA256 (tinyldap-20040323.tar.bz2) = 217d5d5f8da1c44a1541eac0b1a0e618dbfed0081509edb43edc0d55471ee0cf
-SIZE (tinyldap-20040323.tar.bz2) = 33993
+MD5 (tinyldap-20080425.tar.bz2) = d6f93d93fb2db25d2681db3beb9d4e7c
+SHA256 (tinyldap-20080425.tar.bz2) = 1511d1e940fb32cc0f06e25a63841e6954d153fb1539c17e690b0dc2408d4a79
+SIZE (tinyldap-20080425.tar.bz2) = 53652
diff --git a/net/tinyldap/files/patch-Makefile b/net/tinyldap/files/patch-Makefile
index 955da1826605..87a6db679420 100644
--- a/net/tinyldap/files/patch-Makefile
+++ b/net/tinyldap/files/patch-Makefile
@@ -1,27 +1,39 @@
---- Makefile.orig Sat Mar 13 00:21:24 2004
-+++ Makefile Tue Mar 23 15:49:03 2004
-@@ -32,16 +32,19 @@
+--- Makefile.orig 2008-04-25 13:09:33.000000000 +0200
++++ Makefile 2008-04-25 21:51:06.000000000 +0200
+@@ -35,18 +35,22 @@
auth.a: auth.o
-DIET=/opt/diet/bin/diet -Os
-CC=gcc
--CFLAGS=-pipe -I. -Wall -W
+DIET=
+CC?=gcc
-+CFLAGS?=-pipe -I. -Wall -W
+ CFLAGS=-pipe -I. -Wall -W -Wextra
ifneq ($(DEBUG),)
-DIET=/opt/diet/bin/diet
--CFLAGS=-pipe -I. -Wall -W -g
+-CFLAGS=-pipe -I. -Wall -W -g -fstack-protector
+DIET=
-+CFLAGS+=-g
++CFLAGS?=-pipe -I. -Wall -W -g -fstack-protector
endif
- ifneq ($(DIET),)
- LIBS+=-llatin1
+ ifeq ($(COVERAGE),1)
+ DIET=
+-CFLAGS=-pipe -I. -g -fprofile-arcs -ftest-coverage
++CFLAGS?=-pipe -I. -g -fprofile-arcs -ftest-coverage
endif
-+CFLAGS+=-I. -I${LOCALBASE}/include/libowfat
+
++CFLAGS+=-I. -I${LOCALBASE}/include/libowfat -Os
+LDFLAGS+=-L${LOCALBASE}/lib
+LIBS+=-lmd
++
+ ifneq ($(DIET),)
+ LIBS+=-llatin1
+ else
+@@ -79,7 +83,7 @@
+ $(DIET) $(CC) $(CFLAGS) -DSTANDALONE -DDEBUG -o $@ $^ $(LDFLAGS) -lowfat $(LIBS)
+
+ acl: acl.c ldap.a asn1.a
+- $(DIET) $(CC) $(CFLAGS) -o acl acl.c -I. ldap.a asn1.a -lowfat $(LIBS)
++ $(DIET) $(CC) $(CFLAGS) -o acl acl.c -I. ldap.a asn1.a $(LDFLAGS) -lowfat $(LIBS)
+
- %.o: %.c
- $(DIET) $(CC) $(CFLAGS) -c $<
+ .PHONY: clean tar
diff --git a/net/tinyldap/files/patch-auth.c b/net/tinyldap/files/patch-auth.c
deleted file mode 100644
index f22e9eb7d111..000000000000
--- a/net/tinyldap/files/patch-auth.c
+++ /dev/null
@@ -1,9 +0,0 @@
---- auth.c.orig Tue May 14 22:26:20 2002
-+++ auth.c Thu Feb 26 16:03:58 2004
-@@ -1,3 +1,6 @@
-+#ifdef __FreeBSD__
-+#include <sys/types.h>
-+#endif
- #include <md5.h>
- #include "ldap.h"
- #include "auth.h"
diff --git a/net/tinyldap/files/patch-ldif.h b/net/tinyldap/files/patch-ldif.h
index 191873ed6fc8..22f4dcf3a6e0 100644
--- a/net/tinyldap/files/patch-ldif.h
+++ b/net/tinyldap/files/patch-ldif.h
@@ -1,12 +1,12 @@
---- ldif.h.orig Mon Jul 8 22:57:42 2002
-+++ ldif.h Mon Mar 1 12:19:54 2004
-@@ -2,7 +2,9 @@
+--- ldif.h.orig 2008-04-25 13:09:34.000000000 +0200
++++ ldif.h 2008-04-25 21:36:30.000000000 +0200
+@@ -4,7 +4,9 @@
#include <ldap.h>
/* how many attributes do we allow per record? */
+#ifndef ATTRIBS
- #define ATTRIBS 32
+ #define ATTRIBS 100
+#endif
struct attribute {
- long name, value;
+ uint32_t name, value;
diff --git a/net/tinyldap/files/patch-md5password.c b/net/tinyldap/files/patch-md5password.c
deleted file mode 100644
index 836a1e2023fe..000000000000
--- a/net/tinyldap/files/patch-md5password.c
+++ /dev/null
@@ -1,9 +0,0 @@
---- md5password.c.orig Thu Feb 5 01:08:49 2004
-+++ md5password.c Thu Feb 26 16:03:58 2004
-@@ -1,3 +1,6 @@
-+#ifdef __FreeBSD__
-+#include <sys/types.h>
-+#endif
- #include <md5.h>
- #include <string.h>
- #include "buffer.h"
diff --git a/net/tinyldap/files/patch-mstorage_add.c b/net/tinyldap/files/patch-mstorage_add.c
new file mode 100644
index 000000000000..ea5e3fd5e3ac
--- /dev/null
+++ b/net/tinyldap/files/patch-mstorage_add.c
@@ -0,0 +1,11 @@
+--- mstorage_add.c.orig 2008-04-25 13:09:34.000000000 +0200
++++ mstorage_add.c 2008-04-25 21:46:42.000000000 +0200
+@@ -19,7 +19,7 @@
+ /* Sadly, mremap is only available on Linux */
+ /* Please petition your congressman^Woperating system vendor to include it! */
+
+-long mstorage_add(mstorage_t* p,const char* s,unsigned long n) {
++long mstorage_add(mstorage_t* p,const char* s,size_t n) {
+ if (p->mapped-p->used<n) {
+ if (!p->root) {
+ /* nothing allocated. mmap /dev/zero */
diff --git a/net/tinyldap/files/patch-mstorage_add_bin.c b/net/tinyldap/files/patch-mstorage_add_bin.c
new file mode 100644
index 000000000000..0c73d05107ad
--- /dev/null
+++ b/net/tinyldap/files/patch-mstorage_add_bin.c
@@ -0,0 +1,11 @@
+--- mstorage_add_bin.c.orig 2008-04-25 13:09:34.000000000 +0200
++++ mstorage_add_bin.c 2008-04-25 21:47:27.000000000 +0200
+@@ -6,7 +6,7 @@
+ * char 0;
+ * uint32 len;
+ * char data[len] */
+-long mstorage_add_bin(mstorage_t* p,const char* s,unsigned long n) {
++long mstorage_add_bin(mstorage_t* p,const char* s,size_t n) {
+ unsigned int i;
+ static char zero;
+ long x;
diff --git a/net/tinyldap/files/patch-tinyldap.c b/net/tinyldap/files/patch-tinyldap.c
deleted file mode 100644
index 91a964a170dc..000000000000
--- a/net/tinyldap/files/patch-tinyldap.c
+++ /dev/null
@@ -1,97 +0,0 @@
---- tinyldap.c.orig Sat Mar 13 00:21:25 2004
-+++ tinyldap.c Fri Apr 2 13:15:39 2004
-@@ -448,6 +448,83 @@
- }
- }
-
-+static void answerall(uint32 ofs,long messageid,int out) {
-+ struct SearchResultEntry sre;
-+ struct PartialAttributeList** pal=&sre.attributes;
-+
-+ sre.objectName.l=bstrlen(sre.objectName.s=map+uint32_read(map+ofs+8));
-+ sre.attributes=0;
-+ /* now go through list of requested attributes */
-+ {
-+ uint32 adl=1,last=0;
-+ struct string attr_key;
-+
-+ attr_key.s = NULL;
-+ attr_key.l = 0;
-+ uint32_unpack(map+ofs,&last);
-+ while (adl < last) {
-+ const char* att=0;
-+ const char* val=0;
-+ uint32 i=adl,j=last;
-+
-+ if (adl == 1) {
-+ att="objectClass";
-+ val=map+uint32_read(map+ofs+12);
-+ } else {
-+ att=map+uint32_read(map+ofs+i*8);
-+ if (matchstring(&attr_key,att)) {
-+ val=map+uint32_read(map+ofs+i*8+4);
-+ ++i;
-+ }
-+ }
-+ if (val) {
-+ *pal=malloc(sizeof(struct PartialAttributeList));
-+ if (!*pal) {
-+nomem:
-+ buffer_putsflush(buffer_2,"out of virtual memory!\n");
-+ exit(1);
-+ }
-+ attr_key.s = att;
-+ attr_key.l = strlen(att);
-+ (*pal)->type=attr_key;
-+ {
-+ struct AttributeDescriptionList** a=&(*pal)->values;
-+add_attribute:
-+ *a=malloc(sizeof(struct AttributeDescriptionList));
-+ if (!*a) goto nomem;
-+ (*a)->a.s=bstrfirst(val);
-+ (*a)->a.l=bstrlen(val);
-+ for (;i<j; ++i)
-+ if (!matchstring(&attr_key,map+uint32_read(map+ofs+i*8))) {
-+ val=map+uint32_read(map+ofs+i*8+4);
-+ ++i;
-+ a=&(*a)->next;
-+ goto add_attribute;
-+ }
-+ (*a)->next=0;
-+ }
-+ (*pal)->next=0;
-+ pal=&(*pal)->next;
-+ }
-+ adl++;
-+ }
-+ }
-+ {
-+ long l=fmt_ldapsearchresultentry(0,&sre);
-+ char *buf=alloca(l+300); /* you never know ;) */
-+ long tmp;
-+ if (verbose) {
-+ buffer_puts(buffer_2,"sre len ");
-+ buffer_putulong(buffer_2,l);
-+ buffer_putsflush(buffer_2,".\n");
-+ }
-+ tmp=fmt_ldapmessage(buf,messageid,SearchResultEntry,l);
-+ fmt_ldapsearchresultentry(buf+tmp,&sre);
-+ write(out,buf,l+tmp);
-+ }
-+ free_ldappal(sre.attributes);
-+}
-+
- static void answerwith(uint32 ofs,struct SearchRequest* sr,long messageid,int out) {
- struct SearchResultEntry sre;
- struct PartialAttributeList** pal=&sre.attributes;
-@@ -483,6 +560,10 @@
- /* now go through list of requested attributes */
- {
- struct AttributeDescriptionList* adl=sr->attributes;
-+ if ( adl == NULL ) {
-+ answerall(ofs,messageid,out);
-+ return;
-+ }
- while (adl) {
- const char* val=0;
- uint32 i=2,j;
diff --git a/net/tinyldap/pkg-plist b/net/tinyldap/pkg-plist
index 2ad00c19bc79..2e34f0af7838 100644
--- a/net/tinyldap/pkg-plist
+++ b/net/tinyldap/pkg-plist
@@ -1,16 +1,23 @@
bin/ldapclient
bin/ldapclient_str
+bin/ldapdelete
bin/md5password
+bin/mysql2ldif
libexec/tinyldap
+sbin/acl
sbin/addindex
+sbin/bindrequest
+sbin/dumpacls
sbin/dumpidx
sbin/idx2ldif
sbin/parse
sbin/tinyldap_debug
sbin/tinyldap_standalone
+%%PORTDOCS%%%%DOCSDIR%%/ACL
%%PORTDOCS%%%%DOCSDIR%%/FORMAT
%%PORTDOCS%%%%DOCSDIR%%/GETTING.STARTED
%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.security
%%PORTDOCS%%%%DOCSDIR%%/RFCs
%%PORTDOCS%%%%DOCSDIR%%/THANKS
%%PORTDOCS%%%%DOCSDIR%%/TODO