summaryrefslogtreecommitdiff
path: root/net/netatalk
diff options
context:
space:
mode:
authorDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-09-04 17:48:22 +0000
committerDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-09-04 17:48:22 +0000
commita1e9a6453837a467a0fd9d54c5184099fb87ed70 (patch)
treea47a351794472485a4e7af79cde9e0c0a5856eb7 /net/netatalk
parentUpdate to 1.1.5 (diff)
Update to 1.5pre7
PR: 30319 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=47428
Diffstat (limited to 'net/netatalk')
-rw-r--r--net/netatalk/Makefile48
-rw-r--r--net/netatalk/distinfo2
-rw-r--r--net/netatalk/files/patch-Makefile.in62
-rw-r--r--net/netatalk/files/patch-aa177
-rw-r--r--net/netatalk/files/patch-ab16
-rw-r--r--net/netatalk/files/patch-ac16
-rw-r--r--net/netatalk/files/patch-ad16
-rw-r--r--net/netatalk/files/patch-ae16
-rw-r--r--net/netatalk/files/patch-af30
-rw-r--r--net/netatalk/files/patch-ag50
-rw-r--r--net/netatalk/files/patch-ah16
-rw-r--r--net/netatalk/files/patch-ai15
-rw-r--r--net/netatalk/files/patch-config.h.in11
-rw-r--r--net/netatalk/files/patch-configure20
-rw-r--r--net/netatalk/files/patch-configure.in25
-rw-r--r--net/netatalk/files/patch-macusers132
-rw-r--r--net/netatalk/files/patch-netatalk.pamd13
-rw-r--r--net/netatalk/pkg-plist21
18 files changed, 452 insertions, 234 deletions
diff --git a/net/netatalk/Makefile b/net/netatalk/Makefile
index 1215201f32fb..4482ae110581 100644
--- a/net/netatalk/Makefile
+++ b/net/netatalk/Makefile
@@ -6,40 +6,54 @@
#
PORTNAME= netatalk
-PORTVERSION= 1.5p6
-PORTREVISION= 1
+PORTVERSION= 1.5p7
CATEGORIES= net print
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= netatalk
-DISTNAME= netatalk-1.5pre6
+DISTNAME= netatalk-1.5pre7
MAINTAINER= marcus@marcuscom.com
+.if defined(WITH_CNID)
+LIB_DEPENDS= db3.2:${PORTSDIR}/databases/db3
+.endif
.if !exists(/usr/include/tcpd.h)
-LIB_DEPENDS= wrap.7:${PORTSDIR}/security/tcp_wrapper
+LIB_DEPENDS+= wrap.7:${PORTSDIR}/security/tcp_wrapper
.endif
CONFIGURE_ARGS+= --with-tcp-wrappers \
- --enable-lastdid
-# CONFIGURE_ARGS+= --disable-admin-group
-# CONFIGURE_ARGS+= --disable-ddp
-# CONFIGURE_ARGS+= --with-shadow
-.if defined(NETATALK_WITH_PAM)
-CONFIGURE_ARGS+= --with-pam # broken
+ --with-pkgconfdir=${PREFIX}/etc
+.if defined(WITH_PAM)
PLIST_SUB+= NETATALKPAM=""
.else
+CONFIGURE_ARGS+= --without-pam
PLIST_SUB+= NETATALKPAM="@comment "
.endif
-GNU_CONFIGURE= yes
+.if defined(WITH_CNID)
+# Configure EXPERIMENTAL CNID DID support. This is an attmept to make
+# DIDs more persistent by using a Berkeley database to store the DID values.
+# This should hopefully allow aliases to work between restarts of afpd.
+# This has been tested on MacOS 9.2.1. I have not gotten working on OS X.
+CONFIGURE_ARGS+= --enable-cnid-db \
+ --with-db3=/usr/local
+.else
+# This method of DID calculation is not persistent, but has been tested to
+# work with MacOS X (10.0.4) as well as MacOS 7-9.2.1.
+CONFIGURE_ARGS+= --with-did=last
+.endif
+USE_AUTOCONF= yes
+USE_LIBTOOL= yes
+LIBTOOLFILES= configure
USE_GMAKE= yes
FILES= AppleVolumes.default AppleVolumes.system afpd.conf \
- atalkd.conf netatalk.conf netatalk.pamd papd.conf
+ atalkd.conf papd.conf
LINKS= unbin unhex unsingle hqx2bin single2bin macbinary \
binheader nadheader
MAN1= achfile.1 aecho.1 afile.1 afppasswd.1 getzones.1 \
megatron.1 nbp.1 pap.1 psorder.1 hqx2bin.1 macbinary.1 \
nbplkup.1 nbprgstr.1 nbpunrgstr.1 papstatus.1 \
- single2bin.1 unbin.1 unhex.1 unsingle.1
+ single2bin.1 unbin.1 unhex.1 unsingle.1 acleandir.1 \
+ netatalk-config.1 timeout.1
MAN3= atalk_aton.3 nbp_name.3
MAN4= atalk.4
MAN5= AppleVolumes.default.5 afpd.conf.5 atalkd.conf.5 \
@@ -51,7 +65,9 @@ post-extract:
> ${WRKSRC}/netatalk.sh
post-install:
- @${RM} -f ${PREFIX}/bin/nu ${PREFIX}/bin/lp2pap.sh
+ @${RM} -f ${PREFIX}/bin/nu ${PREFIX}/bin/lp2pap.sh \
+ ${PREFIX}/etc/netatalk.pamd.dist ${PREFIX}/bin/test_parse_mtab \
+ ${PREFIX}/bin/afpd-mtab.pl ${PREFIX}/etc/netatalk.conf.dist
${INSTALL_SCRIPT} ${WRKSRC}/netatalk.sh ${PREFIX}/etc/rc.d/netatalk.sh
${INSTALL_SCRIPT} ${WRKSRC}/contrib/macusers/macusers \
${PREFIX}/bin/macusers
@@ -63,4 +79,8 @@ post-install:
( cd ${PREFIX}/bin && ${LN} -sf megatron ${i} )
.endfor
+.if defined(WITH_PAM)
+ @${CAT} ${PKGMESSAGE}
+.endif
+
.include <bsd.port.mk>
diff --git a/net/netatalk/distinfo b/net/netatalk/distinfo
index 9d24bfc3866f..640f609c812d 100644
--- a/net/netatalk/distinfo
+++ b/net/netatalk/distinfo
@@ -1 +1 @@
-MD5 (netatalk-1.5pre6.tar.gz) = fdeb528ba0bbe4c2083a06ea2fffb773
+MD5 (netatalk-1.5pre7.tar.gz) = d8f93cd5a634497e1cdbe9f78c4f7240
diff --git a/net/netatalk/files/patch-Makefile.in b/net/netatalk/files/patch-Makefile.in
index 05dd7dd19c17..15d4d58e6a76 100644
--- a/net/netatalk/files/patch-Makefile.in
+++ b/net/netatalk/files/patch-Makefile.in
@@ -1,54 +1,18 @@
---- config/Makefile.in.orig Thu Apr 12 15:27:32 2001
-+++ config/Makefile.in Fri May 11 07:01:47 2001
-@@ -129,11 +129,11 @@
- $(mkinstalldirs) $(DESTDIR)$(configdir)
- @list='$(config_DATA)'; for p in $$list; do \
+--- config/Makefile.in.orig Thu Aug 30 12:02:31 2001
++++ config/Makefile.in Thu Aug 30 12:03:21 2001
+@@ -136,11 +136,11 @@
+ $(mkinstalldirs) $(DESTDIR)$(pkgconfdir)
+ @list='$(pkgconf_DATA)'; for p in $$list; do \
if test -f $(srcdir)/$$p; then \
-- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(configdir)/$$p"; \
-- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(configdir)/$$p; \
-+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(configdir)/$$p.dist"; \
-+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(configdir)/$$p.dist; \
+- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfdir)/$$p"; \
+- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfdir)/$$p; \
++ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfdir)/$$p.dist"; \
++ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfdir)/$$p.dist; \
else if test -f $$p; then \
-- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(configdir)/$$p"; \
-- $(INSTALL_DATA) $$p $(DESTDIR)$(configdir)/$$p; \
-+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(configdir)/$$p.dist"; \
-+ $(INSTALL_DATA) $$p $(DESTDIR)$(configdir)/$$p.dist; \
+- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfdir)/$$p"; \
+- $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfdir)/$$p; \
++ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfdir)/$$p.dist"; \
++ $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfdir)/$$p.dist; \
fi; fi; \
done
-@@ -145,16 +145,6 @@
-
- install-pamDATA: $(pam_DATA)
- @$(NORMAL_INSTALL)
-- $(mkinstalldirs) $(DESTDIR)$(pamdir)
-- @list='$(pam_DATA)'; for p in $$list; do \
-- if test -f $(srcdir)/$$p; then \
-- echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pamdir)/$$p"; \
-- $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pamdir)/$$p; \
-- else if test -f $$p; then \
-- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pamdir)/$$p"; \
-- $(INSTALL_DATA) $$p $(DESTDIR)$(pamdir)/$$p; \
-- fi; fi; \
-- done
-
- uninstall-pamDATA:
- @$(NORMAL_UNINSTALL)
-@@ -209,7 +199,7 @@
- install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
- installdirs:
-- $(mkinstalldirs) $(DESTDIR)$(configdir) $(DESTDIR)$(pamdir)
-+ $(mkinstalldirs) $(DESTDIR)$(configdir)
-
-
- mostlyclean-generic:
-@@ -258,9 +248,6 @@
-
- @USE_PAM_TRUE@netatalk:
- @USE_PAM_TRUE@ cp -f $(PAMD) netatalk
--
--@USE_PAM_TRUE@install-data-local: netatalk
--@USE_PAM_TRUE@ $(INSTALL) netatalk $(DESTDIR)$(pamdir)/
-
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/net/netatalk/files/patch-aa b/net/netatalk/files/patch-aa
new file mode 100644
index 000000000000..c440f1393054
--- /dev/null
+++ b/net/netatalk/files/patch-aa
@@ -0,0 +1,177 @@
+--- libatalk/cnid/cnid_add.c.orig Thu Aug 16 10:30:29 2001
++++ libatalk/cnid/cnid_add.c Sun Sep 2 03:15:54 2001
+@@ -13,6 +13,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
+@@ -41,23 +42,27 @@
+ {
+ DBT altkey, altdata;
+ DB_TXN *tid;
++ /* We create rc here because using rc is bad. Why? Well, if you
++ * use rc once, then call another function which resets it, you're
++ * screwed. */
++ int rc = 0;
+
+ memset(&altkey, 0, sizeof(altkey));
+ memset(&altdata, 0, sizeof(altdata));
+
+ retry:
+- if ((errno = txn_begin(db->dbenv, ptid, &tid,0))) {
+- return errno;
++ if ((rc = txn_begin(db->dbenv, ptid, &tid,0))) {
++ return rc;
+ }
+
+ /* main database */
+- if ((errno = db->db_cnid->put(db->db_cnid, tid,
++ if ((rc = db->db_cnid->put(db->db_cnid, tid,
+ key, data, DB_NOOVERWRITE))) {
+ txn_abort(tid);
+- if (errno == DB_LOCK_DEADLOCK)
++ if (rc == DB_LOCK_DEADLOCK)
+ goto retry;
+
+- return errno;
++ return rc;
+ }
+
+ /* dev/ino database */
+@@ -65,25 +70,25 @@
+ altkey.size = CNID_DEVINO_LEN;
+ altdata.data = key->data;
+ altdata.size = key->size;
+- if ((errno = db->db_devino->put(db->db_devino, tid,
++ if ((rc = db->db_devino->put(db->db_devino, tid,
+ &altkey, &altdata, 0))) {
+ txn_abort(tid);
+- if (errno == DB_LOCK_DEADLOCK)
++ if (rc == DB_LOCK_DEADLOCK)
+ goto retry;
+
+- return errno;
++ return rc;
+ }
+
+ /* did/name database */
+ altkey.data = (char *) data->data + CNID_DEVINO_LEN;
+ altkey.size = data->size - CNID_DEVINO_LEN;
+- if ((errno = db->db_didname->put(db->db_didname, tid,
++ if ((rc = db->db_didname->put(db->db_didname, tid,
+ &altkey, &altdata, 0))) {
+ txn_abort(tid);
+- if (errno == DB_LOCK_DEADLOCK)
++ if (rc == DB_LOCK_DEADLOCK)
+ goto retry;
+
+- return errno;
++ return rc;
+ }
+
+ return txn_commit(tid, 0);
+@@ -100,6 +105,7 @@
+ DBT rootinfo_key, rootinfo_data;
+ DB_TXN *tid;
+ cnid_t id, save;
++ int rc = 0;
+
+ int debug = 0;
+
+@@ -137,8 +143,8 @@
+ * cnid's to the database. */
+ if (ntohl(hint) >= CNID_START) {
+ /* if the key doesn't exist, add it in. don't fiddle with nextID. */
+- errno = add_cnid(db, NULL, &key, &data);
+- switch (errno) {
++ rc = add_cnid(db, NULL, &key, &data);
++ switch (rc) {
+ case DB_KEYEXIST: /* need to use RootInfo after all. */
+ break;
+ default:
+@@ -153,14 +159,14 @@
+
+ /* Abort and retry the modification. */
+ if (0) {
+-retry: if ((errno = txn_abort(tid)) != 0)
+- syslog(LOG_ERR, "cnid_add: txn_begin failed (%d)", errno);
++retry: if ((rc = txn_abort(tid)) != 0)
++ syslog(LOG_ERR, "cnid_add: txn_begin failed (%d)", rc);
+ /* FALLTHROUGH */
+ }
+
+ /* Begin the transaction. */
+- if ((errno = txn_begin(db->dbenv, NULL, &tid, 0)) != 0) {
+- syslog(LOG_ERR, "cnid_add: txn_begin failed (%d)", errno);
++ if ((rc = txn_begin(db->dbenv, NULL, &tid, 0)) != 0) {
++ syslog(LOG_ERR, "cnid_add: txn_begin failed (%d)", rc);
+ goto cleanup_err;
+ }
+
+@@ -172,7 +178,7 @@
+ rootinfo_key.size = ROOTINFO_KEYLEN;
+
+ /* Get the key. */
+- switch (errno = db->db_didname->get(db->db_didname, tid, &rootinfo_key, &rootinfo_data, 0)) {
++ switch (rc = db->db_didname->get(db->db_didname, tid, &rootinfo_key, &rootinfo_data, 0)) {
+ case DB_LOCK_DEADLOCK:
+ goto retry;
+ case 0:
+@@ -186,7 +192,7 @@
+ syslog(LOG_ERR, "cnid_add: using CNID_START for did %d, name %s as %d", did, name, hint);
+ break;
+ default:
+- syslog(LOG_ERR, "cnid_add: unable to lookup rootinfo (%d)", errno);
++ syslog(LOG_ERR, "cnid_add: unable to lookup rootinfo (%d)", rc);
+ goto cleanup_abort;
+ }
+
+@@ -194,12 +200,12 @@
+ * wrap-around. NOTE: i do it this way so that we can go back and
+ * fill in holes. */
+ save = id = ntohl(hint);
+- while ((errno = add_cnid(db, tid, &key, &data))) {
++ while ((rc = add_cnid(db, tid, &key, &data))) {
+ /* don't use any of the special CNIDs */
+ if (++id < CNID_START)
+ id = CNID_START;
+
+- if ((errno != DB_KEYEXIST) || (save == id)) {
++ if ((rc != DB_KEYEXIST) || (save == id)) {
+ syslog(LOG_ERR, "cnid_add: unable to add CNID(%x)", hint);
+ hint = 0;
+ goto cleanup_abort;
+@@ -211,21 +217,21 @@
+ rootinfo_data.data = &hint;
+ rootinfo_data.size = sizeof(hint);
+
+- switch (errno = db->db_didname->put(db->db_didname, tid, &rootinfo_key, &rootinfo_data, 0)) {
++ switch (rc = db->db_didname->put(db->db_didname, tid, &rootinfo_key, &rootinfo_data, 0)) {
+ case DB_LOCK_DEADLOCK:
+ goto retry;
+ case 0:
+ break;
+ default:
+- syslog(LOG_ERR, "cnid_add: unable to update rootinfo (%d)", errno);
++ syslog(LOG_ERR, "cnid_add: unable to update rootinfo (%d)", rc);
+ goto cleanup_abort;
+ }
+
+
+ cleanup_commit:
+ /* The transaction finished, commit it. */
+- if ((errno = txn_commit(tid, 0)) != 0) {
+- syslog(LOG_ERR, "cnid_add: txn_commit failed (%d)", errno);
++ if ((rc = txn_commit(tid, 0)) != 0) {
++ syslog(LOG_ERR, "cnid_add: txn_commit failed (%d)", rc);
+ goto cleanup_err;
+ }
+
+@@ -239,3 +245,4 @@
+ cleanup_err:
+ return 0;
+ }
++#endif /* CNID_DB */
diff --git a/net/netatalk/files/patch-ab b/net/netatalk/files/patch-ab
new file mode 100644
index 000000000000..b21dfca602c7
--- /dev/null
+++ b/net/netatalk/files/patch-ab
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_close.c.orig Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_close.c Wed Aug 29 15:48:45 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++#ifdef CNID_DB
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
+@@ -69,3 +70,4 @@
+
+ free(db);
+ }
++#endif /* CNID_DB */
+
diff --git a/net/netatalk/files/patch-ac b/net/netatalk/files/patch-ac
new file mode 100644
index 000000000000..ac1c15feacd6
--- /dev/null
+++ b/net/netatalk/files/patch-ac
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_delete.c.orig Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_delete.c Wed Aug 29 15:49:49 2001
+@@ -11,6 +11,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
+@@ -111,3 +112,4 @@
+ syslog(LOG_ERR, "cnid_del: unable to delete CNID(%x)", id);
+ return errno;
+ }
++#endif /* CNID_DB */
+
diff --git a/net/netatalk/files/patch-ad b/net/netatalk/files/patch-ad
new file mode 100644
index 000000000000..7a77d36d9e30
--- /dev/null
+++ b/net/netatalk/files/patch-ad
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_get.c.orig Wed Aug 15 12:16:25 2001
++++ libatalk/cnid/cnid_get.c Wed Aug 29 15:49:52 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/param.h>
+@@ -57,3 +58,4 @@
+ memcpy(&id, data.data, sizeof(id));
+ return id;
+ }
++#endif /* CNID_DB */
+
diff --git a/net/netatalk/files/patch-ae b/net/netatalk/files/patch-ae
new file mode 100644
index 000000000000..7042d6670e6d
--- /dev/null
+++ b/net/netatalk/files/patch-ae
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_lookup.c.orig Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_lookup.c Wed Aug 29 15:49:55 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/param.h>
+@@ -115,3 +116,4 @@
+ syslog(LOG_ERR, "cnid_lookup: looked up did %d, name %s as %d (needed update)", did, name, id);
+ return id;
+ }
++#endif /* CNID_DB */
+
diff --git a/net/netatalk/files/patch-af b/net/netatalk/files/patch-af
index 9aabbf3a0648..01cf664f2bdd 100644
--- a/net/netatalk/files/patch-af
+++ b/net/netatalk/files/patch-af
@@ -1,12 +1,18 @@
-*** etc/atalkd/rtmp.c.orig Wed Feb 25 18:28:16 1998
---- etc/atalkd/rtmp.c Wed Feb 25 18:28:29 1998
-***************
-*** 7,12 ****
---- 7,13 ----
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/ioctl.h>
-+ #include <sys/time.h>
- #include <net/if.h>
- #include <net/route.h>
- #include <netatalk/endian.h>
+--- libatalk/cnid/cnid_nextid.c.orig Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_nextid.c Wed Aug 29 15:50:04 2001
+@@ -7,6 +7,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++#ifdef CNID_DB
+ #include <db.h>
+
+ #include <atalk/adouble.h>
+@@ -29,5 +30,6 @@
+ memcpy(&id, ad_entry(&db->rootinfo, ADEID_DID), sizeof(id));
+ return id;
+ }
++#endif /* CNID_DB */
+ #endif
+
+
diff --git a/net/netatalk/files/patch-ag b/net/netatalk/files/patch-ag
new file mode 100644
index 000000000000..39d8d3cdbd7a
--- /dev/null
+++ b/net/netatalk/files/patch-ag
@@ -0,0 +1,50 @@
+--- libatalk/cnid/cnid_open.c.orig Thu Aug 16 10:30:29 2001
++++ libatalk/cnid/cnid_open.c Sun Sep 2 03:13:49 2001
+@@ -37,6 +37,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++#ifdef CNID_DB
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -83,7 +84,7 @@
+ #define DBVERSION DBVERSION1
+
+ #define DBOPTIONS (DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK | \
+-DB_INIT_LOG | DB_INIT_TXN | DB_TXN_NOSYNC | DB_RECOVER)
++DB_INIT_LOG | DB_INIT_TXN | DB_RECOVER)
+
+ #define MAXITER 0xFFFF /* maximum number of simultaneously open CNID
+ * databases. */
+@@ -100,7 +101,7 @@
+
+ /* sort did's and then names. this is for unix paths.
+ * i.e., did/unixname lookups. */
+-static int compare_unix(const DBT *a, const DBT *b)
++static int compare_unix(DB* db, const DBT *a, const DBT *b)
+ {
+ u_int8_t *sa, *sb;
+ int len, ret;
+@@ -214,6 +215,8 @@
+ goto fail_lock;
+ }
+
++ /* Check to see if a DBENV already exists. If it does, join it. */
++ if (db->dbenv->open(db->dbenv, path, DB_JOINENV, 0666)) {
+ if (db->dbenv->open(db->dbenv, path, DBOPTIONS, 0666)) {
+
+ /* try with a shared memory pool */
+@@ -229,6 +232,7 @@
+ open_flag = DB_RDONLY;
+ syslog(LOG_INFO, "cnid_open: read-only CNID database");
+ }
++ }
+
+ /* did/name reverse mapping. we use a btree for this one. */
+ if (db_create(&db->db_didname, db->dbenv, 0))
+@@ -358,3 +362,4 @@
+ free(db);
+ return NULL;
+ }
++#endif /* CNID_DB */
diff --git a/net/netatalk/files/patch-ah b/net/netatalk/files/patch-ah
new file mode 100644
index 000000000000..445128d39fc5
--- /dev/null
+++ b/net/netatalk/files/patch-ah
@@ -0,0 +1,16 @@
+--- libatalk/cnid/cnid_resolve.c.orig Fri Aug 17 00:30:29 2001
++++ libatalk/cnid/cnid_resolve.c Wed Aug 29 15:50:34 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/param.h>
+@@ -48,3 +49,4 @@
+ memcpy(id, (char *) data.data + CNID_DEVINO_LEN, sizeof(*id));
+ return (char *) data.data + CNID_HEADER_LEN;
+ }
++#endif /* CNID_DB */
+
diff --git a/net/netatalk/files/patch-ai b/net/netatalk/files/patch-ai
new file mode 100644
index 000000000000..bcf728a4193a
--- /dev/null
+++ b/net/netatalk/files/patch-ai
@@ -0,0 +1,15 @@
+--- libatalk/cnid/cnid_update.c.orig Fri Aug 17 00:30:30 2001
++++ libatalk/cnid/cnid_update.c Wed Aug 29 15:50:39 2001
+@@ -6,6 +6,7 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++#ifdef CNID_DB
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/param.h>
+@@ -136,3 +137,4 @@
+ syslog(LOG_ERR, "cnid_update: can't update CNID(%x)", id);
+ return -1;
+ }
++#endif /* CNID_DB */
diff --git a/net/netatalk/files/patch-config.h.in b/net/netatalk/files/patch-config.h.in
deleted file mode 100644
index 2ab6e3e58113..000000000000
--- a/net/netatalk/files/patch-config.h.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- config.h.in.orig Thu Apr 12 15:27:26 2001
-+++ config.h.in Fri May 18 08:13:50 2001
-@@ -84,7 +84,7 @@
- #undef HAVE_GCC_MEMCPY_BUG
- #undef MACOSX_SERVER
- #undef NEED_QUOTACTL_WRAPPER
--#undef NO_CRYPT_H
-+#define NO_CRYPT_H
- #undef NO_DDP
- #undef NO_DLFCN_H
- #undef NO_STRUCT_TM_GMTOFF
diff --git a/net/netatalk/files/patch-configure b/net/netatalk/files/patch-configure
deleted file mode 100644
index ece0d3435d00..000000000000
--- a/net/netatalk/files/patch-configure
+++ /dev/null
@@ -1,20 +0,0 @@
---- configure.orig Thu Apr 12 15:27:42 2001
-+++ configure Fri May 18 08:13:51 2001
-@@ -4906,6 +4906,7 @@
-
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-+if test "${with_pam+set}" = set; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
- #define USE_PAM 1
-@@ -4914,6 +4915,9 @@
- LIBS="$LIBS -lpam"
- compile_pam=yes
-
-+else
-+ echo "$ac_t""no" 1>&6
-+fi
- else
- echo "$ac_t""no" 1>&6
- fi
diff --git a/net/netatalk/files/patch-configure.in b/net/netatalk/files/patch-configure.in
new file mode 100644
index 000000000000..021e9fe9323f
--- /dev/null
+++ b/net/netatalk/files/patch-configure.in
@@ -0,0 +1,25 @@
+--- configure.in.orig Sat Sep 1 19:32:49 2001
++++ configure.in Sat Sep 1 19:34:07 2001
+@@ -262,18 +262,18 @@
+ db3_found=no
+ for db3dir in "" $trydb3dir /usr /usr /usr/local ; do
+ if test -f "$db3dir/include/db3/db.h" ; then
+- LDFLAGS="$LDFLAGS -L$db3dir/lib -L$db3dir"
+- CFLAGS="$CFLAGS -I$db3dir/include"
++ LDFLAGS="$LDFLAGS -L$db3dir/lib"
++ CFLAGS="$CFLAGS -I$db3dir/include/db3"
+
+ dnl If we require DB3, die if we don't have it
+ if test "x$db3_required" != "xno"; then
+- AC_CHECK_LIB(db, main,
++ AC_CHECK_LIB(db3, main,
+ dnl AC_MSG_RESULT([enabling db3 support])
+ db3_found=yes
+ dnl -- also enable CNID DB when this is found
+ AC_DEFINE(CNID_DB, 1)
+ AC_MSG_RESULT([using persistent cnid database per volume])
+- LIBS="$LIBS -ldb",
++ LIBS="$LIBS -ldb3",
+ dnl Not Found
+ AC_MSG_ERROR([Berkeley DB3 library not found!])
+ )
diff --git a/net/netatalk/files/patch-macusers b/net/netatalk/files/patch-macusers
index 66d75c4d2f65..763e5ec339af 100644
--- a/net/netatalk/files/patch-macusers
+++ b/net/netatalk/files/patch-macusers
@@ -1,59 +1,38 @@
---- contrib/macusers/macusers.orig Fri May 18 14:09:26 2001
-+++ contrib/macusers/macusers Fri May 18 14:08:28 2001
-@@ -1,52 +1,92 @@
+--- contrib/macusers/macusers.orig Wed Aug 29 12:20:32 2001
++++ contrib/macusers/macusers Sun Jun 17 01:47:44 2001
+@@ -1,8 +1,8 @@
#!/usr/bin/perl
+-# $Id: macusers,v 1.4 2001/06/29 14:14:46 rufustfirefly Exp $
-+use strict;
+ use strict;
+-use vars qw($MAC_PROCESS $PS_STR $MATCH_STR $ASIP_PORT $LSOF);
+use Socket;
+use vars qw($MAC_PROCESS $PS_STR $MATCH_STR $ASIP_PORT_NO $ASIP_PORT $LSOF);
-+
+
# Written for linux; may have to be modified for your brand of Unix.
--$MAC_PROCESS="afpd";
--$PS_STR="-ef";
--$ASIP_PORT="afpovertcp";
-+# Support for FreeBSD added by Joe Clarke <marcus@marcuscom.com>.
-+# Support could probably be extended for *BSD, but I do not have Net or
-+# OpenBSD machines to test with. Code has also been cleaned up and made
-+# to compile under strict.
-+#
-+# The new lsof call should also be quicker as it does not involve a
-+# second pipeline.
-+#
-+# Support has also been added for 16 character usernames.
-+
-+$MAC_PROCESS = "afpd";
-+if ( $^O eq "freebsd" ) {
-+ $PS_STR = "-awwxouser,pid,ppid,start,command";
-+ $MATCH_STR = '(\w+)\s+(\d+)\s+(\d+)\s+([\d\w:]+)';
-+}
-+else {
-+ $PS_STR = "-ef";
-+ $MATCH_STR = '\s*(\w+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)';
-+}
+@@ -25,10 +25,11 @@
+ $PS_STR = "-ef";
+ $MATCH_STR = '\s*(\w+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)';
+ }
+-$ASIP_PORT = "afpovertcp";
+$ASIP_PORT = "afpovertcp";
+$ASIP_PORT_NO = 548;
# Change to 0 if you don't have lsof
--$LSOF=1;
+-$LSOF = 1;
+$LSOF = 0;
-+my %mac = ();
-+
-+if ( $LSOF == 1 ) {
-+ open( LSOF, "lsof -i :$ASIP_PORT |" );
-+
-+ while (<LSOF>) {
-+ next if ( $_ !~ /$ASIP_PORT/ );
-+ $_ =~ /\w+\s+(\d+).*->([\w\.-]+).*/;
-+ my ( $pid, $host );
-+ $pid = $1;
-+ $host = $2;
-+ ($host) = ( $host =~ /(^[\w\d\-]+)/ );
-+ $mac{$pid} = $host;
-+ }
+ my %mac = ();
+
+ if ( $LSOF == 1 ) {
+@@ -43,8 +44,25 @@
+ ($host) = ( $host =~ /(^[\w\d\-]+)/ );
+ $mac{$pid} = $host;
+ }
+-
+ print
+"PID UID Username Name Logintime Mac\n";
-+ close(LSOF);
+ close(LSOF);
+}
+elsif ( $^O eq "freebsd" ) {
+ open( SOCKSTAT, "sockstat -4 | grep $MAC_PROCESS | grep -v grep |" );
@@ -70,69 +49,6 @@
+ ($host) = ( $host =~ /(^[\w\d\-]+)/ );
+ $mac{$pid} = $host;
+ }
-+ print
-+"PID UID Username Name Logintime Mac\n";
-+}
-+else {
-+ print
-+ "PID UID Username Name Logintime\n";
-+}
-+
-+open( PS, "ps $PS_STR |" ) || die "Unable to open a pipe to ``ps''";
-
--if ($LSOF == 1 )
--{
-- open(LSOF,"lsof -i | grep $ASIP_PORT |");
--
-- while(<LSOF>)
-- {
-- if ($_ !~ /$ASIP_PORT/)
-- {
-- next;
-- }
-- $_=~/\w+\s+(\d+).*->([\w-]+).*/;
-- $pid=$1; $host=$2;
-- $mac{$pid}=$host;
-- }
--
-- close(LSOF);
-- print "PID UID Usercode Name Logintime Mac\n";
--}
--else
--{
-- print "PID UID Usercode Name Logintime\n";
--}
--
--open(PS," ps $PS_STR |") || die "cannot do ps";
--
--while(<PS>)
--{
-- if ($_ !~ /$MAC_PROCESS/ )
-- {
-- next;
-- }
-- $_=~ /\s*(\w+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)/;
-- $user=$1; $pid=$2; $ppid=$3; $time=$4;
-- if ($ppid != 1)
-- {
-- ($t,$t,$uid,$t,$t,$t,$name,$t,$t)=getpwnam($user);
-- printf "%-8d %-8d %-8s %-20s %-9s %s\n",$pid,$uid,$user,$name,$time,$mac{$pid};
-- }
-+while (<PS>) {
-+ next if ( $_ !~ /$MAC_PROCESS/ );
-+ my ( $user, $pid, $ppid, $time, $name, $uid, $t );
-+ $_ =~ /$MATCH_STR/;
-+ $user = $1;
-+ $pid = $2;
-+ $ppid = $3;
-+ $time = $4;
-+
-+ if ( $ppid != 1 ) {
-+ ( $t, $t, $uid, $t, $t, $t, $name, $t, $t ) = getpwnam($user);
-+ printf "%-8d %-8d %-16s %-20s %-9s %s\n", $pid, $uid, $user,
-+ $name, $time, $mac{$pid};
-+ }
+ print
+ "PID UID Username Name Logintime Mac\n";
}
-
--close(PS);
-+close(PS);
diff --git a/net/netatalk/files/patch-netatalk.pamd b/net/netatalk/files/patch-netatalk.pamd
deleted file mode 100644
index 66dcab1a22c8..000000000000
--- a/net/netatalk/files/patch-netatalk.pamd
+++ /dev/null
@@ -1,13 +0,0 @@
---- config/netatalk.pamd.orig Tue Jul 25 23:08:59 2000
-+++ config/netatalk.pamd Fri May 18 08:13:51 2001
-@@ -1,6 +1,5 @@
- #%PAM-1.0
--auth required /lib/security/pam_pwdb.so shadow
--account required /lib/security/pam_pwdb.so
--#password required /lib/security/pam_cracklib.so
--#password required /lib/security/pam_pwdb.so shadow use_authtok
--session required /lib/security/pam_pwdb.so
-+auth required pam_unix.so
-+account required pam_unix.so
-+password required pam_unix.so
-+session required pam_unix.so
diff --git a/net/netatalk/pkg-plist b/net/netatalk/pkg-plist
index 4d97e720c08d..7e6ea5543c66 100644
--- a/net/netatalk/pkg-plist
+++ b/net/netatalk/pkg-plist
@@ -32,6 +32,7 @@ bin/nbplkup
bin/nbprgstr
bin/nbpunrgstr
bin/netatalk-config
+bin/netatalkshorternamelinks.pl
bin/pap
bin/papstatus
bin/parsecode
@@ -74,27 +75,34 @@ etc/afpd.conf.dist
@unexec if cmp -s %D/etc/atalkd.conf %D/etc/atalkd.conf.dist; then rm -f %D/etc/atalkd.conf; fi
etc/atalkd.conf.dist
@exec [ ! -f %B/atalkd.conf ] && cp %B/%f %B/atalkd.conf
-@unexec if cmp -s %D/etc/netatalk.conf %D/etc/netatalk.conf.dist; then rm -f %D/etc/netatalk.conf; fi
-etc/netatalk.conf.dist
-@exec [ ! -f %B/netatalk.conf ] && cp %B/%f %B/netatalk.conf
-@unexec if cmp -s %D/etc/netatalk.pamd %D/etc/netatalk.pamd.dist; then rm -f %D/etc/netatalk.pamd; fi
-etc/netatalk.pamd.dist
-@exec [ ! -f %B/netatalk.pamd ] && cp %B/%f %B/netatalk.pamd
@unexec if cmp -s %D/etc/papd.conf %D/etc/papd.conf.dist; then rm -f %D/etc/papd.conf; fi
etc/papd.conf.dist
@exec [ ! -f %B/papd.conf ] && cp %B/%f %B/papd.conf
etc/nls/maccode.437
etc/nls/maccode.850
etc/nls/maccode.iso8859-1
+etc/nls/maccode.iso8859-1.adapted
etc/rc.d/netatalk.sh
etc/uams/uams_clrtxt.so
etc/uams/uams_dhx.so
%%NETATALKPAM%%etc/uams/uams_dhx_pam.so
+%%NETATALKPAM%%etc/uams/uams_dhx_pam.a
+%%NETATALKPAM%%etc/uams/uams_dhx_pam.la
etc/uams/uams_dhx_passwd.so
+etc/uams/uams_dhx_passwd.a
+etc/uams/uams_dhx_passwd.la
etc/uams/uams_guest.so
+etc/uams/uams_guest.a
+etc/uams/uams_guest.la
%%NETATALKPAM%%etc/uams/uams_pam.so
+%%NETATALKPAM%%etc/uams/uams_pam.a
+%%NETATALKPAM%%etc/uams/uams_pam.la
etc/uams/uams_passwd.so
+etc/uams/uams_passwd.a
+etc/uams/uams_passwd.la
etc/uams/uams_randnum.so
+etc/uams/uams_randnum.a
+etc/uams/uams_randnum.la
@dirrm etc/nls
@dirrm etc/uams
include/atalk/adouble.h
@@ -133,3 +141,4 @@ include/netatalk/phase2.h
lib/libatalk.a
lib/libatalk.la
share/aclocal/netatalk.m4
+share/netatalk/pagecount.ps