diff options
author | jlam <jlam@pkgsrc.org> | 2000-07-27 16:10:23 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2000-07-27 16:10:23 +0000 |
commit | 7b97ef07bf5e3b7879d04d5f93a1ec9b0d1d8ca1 (patch) | |
tree | 84ef47f6700de2992872d191232fb35ab44ba75b /security | |
parent | 0c901b9fb02ca92c409d3b9173f8e4f37c8a04b4 (diff) | |
download | pkgsrc-7b97ef07bf5e3b7879d04d5f93a1ec9b0d1d8ca1.tar.gz |
pks - PGP Key Server
Taken from PR#10394 by Dave Burgess <burgess@neonramp.com> with
modifications.
Diffstat (limited to 'security')
-rw-r--r-- | security/pks/Makefile | 32 | ||||
-rw-r--r-- | security/pks/files/md5 | 5 | ||||
-rw-r--r-- | security/pks/files/patch-sum | 6 | ||||
-rw-r--r-- | security/pks/files/pksd.sh | 50 | ||||
-rw-r--r-- | security/pks/patches/patch-aa | 61 | ||||
-rw-r--r-- | security/pks/patches/patch-ab | 12 | ||||
-rw-r--r-- | security/pks/patches/patch-ac | 55 | ||||
-rw-r--r-- | security/pks/patches/patch-ad | 12 | ||||
-rw-r--r-- | security/pks/pkg/COMMENT | 1 | ||||
-rw-r--r-- | security/pks/pkg/DEINSTALL | 27 | ||||
-rw-r--r-- | security/pks/pkg/DESCR | 2 | ||||
-rw-r--r-- | security/pks/pkg/INSTALL | 30 | ||||
-rw-r--r-- | security/pks/pkg/PLIST | 16 |
13 files changed, 309 insertions, 0 deletions
diff --git a/security/pks/Makefile b/security/pks/Makefile new file mode 100644 index 00000000000..70b8f6017eb --- /dev/null +++ b/security/pks/Makefile @@ -0,0 +1,32 @@ +# NetBSD: Makefile,v 1.11 2000/05/19 07:34:33 itohy Exp $ + +DISTNAME= pks-0.9.4 +CATEGORIES= security www +MASTER_SITES+= http://www.mit.edu/people/marc/pks/ +MASTER_SITES+= ftp://ftp.neonramp.com/pub/pksd/ + +PATCH_SITES+= http://www.mit.edu/people/marc/pks/ +PATCH_SITES+= ftp://ftp.neonramp.com/pub/pksd/ +PATCHFILES= pks094-patch2 \ + pks094-patch3 +PATCH_DIST_STRIP= -p1 + +MAINTAINER= burgess@neonramp.com +HOMEPAGE= http://www.mit.edu/people/marc/pks/ + +DEPENDS+= db-*:../../databases/db + +GNU_CONFIGURE= # defined +CONFIGURE_ARGS+= --datadir=${PREFIX}/share/pks +CONFIGURE_ARGS+= --localstatedir=/var/pks +CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/share/examples + +post-build: + ${SED} -e "s,@PREFIX@,${PREFIX},g" \ + < ${FILESDIR}/pksd.sh > ${WRKDIR}/pksd.sh + +post-install: + ${INSTALL_SCRIPT} ${WRKDIR}/pksd.sh ${PREFIX}/etc/rc.d + PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL + +.include "../../mk/bsd.pkg.mk" diff --git a/security/pks/files/md5 b/security/pks/files/md5 new file mode 100644 index 00000000000..31297a9df3a --- /dev/null +++ b/security/pks/files/md5 @@ -0,0 +1,5 @@ +$NetBSD: md5,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $ + +MD5 (pks-0.9.4.tar.gz) = 365d062bbc3f7bfda745474693d0fdec +MD5 (pks094-patch2) = 33effba52c7a195d02d42ae41ba2795e +MD5 (pks094-patch3) = a28a4074668654d0aac1a5ab10c211ee diff --git a/security/pks/files/patch-sum b/security/pks/files/patch-sum new file mode 100644 index 00000000000..ee47e09cb7b --- /dev/null +++ b/security/pks/files/patch-sum @@ -0,0 +1,6 @@ +$NetBSD: patch-sum,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $ + +MD5 (patch-aa) = 0b573d67933f343881dfa8e188dd2a7a +MD5 (patch-ab) = 3f7d2a440d86333921c2853ec847f728 +MD5 (patch-ac) = 8d3de4be3e0a8a9a6db2936ca225c441 +MD5 (patch-ad) = 6d43ffe6f8bf0de9f9bca972600182c9 diff --git a/security/pks/files/pksd.sh b/security/pks/files/pksd.sh new file mode 100644 index 00000000000..c178dba2755 --- /dev/null +++ b/security/pks/files/pksd.sh @@ -0,0 +1,50 @@ +#!/bin/sh +# +# $NetBSD: pksd.sh,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $ +# + +name="pksd" +command=${1:-start} + +case ${command} in +start) + if [ ! -f /etc/${name}.conf ] + then + exit 0 + else + dbdir=`awk '/db_dir/ { print $2 }' < /etc/${name}.conf` + fi + if [ ! -f ${dbdir}/keydb000 -a -x @PREFIX@/bin/pksclient ] + then + @PREFIX@/bin/pksclient ${dbdir} create + fi + if [ -x @PREFIX@/bin/${name} -a -x @PREFIX@/bin/pks-queue-run.sh ] + then + echo "Starting ${name}." + @PREFIX@/bin/${name} /etc/${name}.conf & + sleep 5 + @PREFIX@/bin/pks-queue-run.sh /etc/${name}.conf + fi + ;; +stop) + if [ ! -f /etc/${name}.conf ] + then + exit 0 + else + socket=`awk '/socket_name/ { print $2 }' < /etc/${name}.conf` + fi + if [ -x @PREFIX@/bin/${name}ctl -a -S ${socket} ] + then + echo "Stopping ${name}." + @PREFIX@/bin/${name}ctl ${socket} shutdown + else + echo "couldn't stop ${name}." + fi + ;; +restart) + ( $0 stop ) + sleep 1 + $0 start + ;; +esac +exit 0 diff --git a/security/pks/patches/patch-aa b/security/pks/patches/patch-aa new file mode 100644 index 00000000000..7c253a14d9a --- /dev/null +++ b/security/pks/patches/patch-aa @@ -0,0 +1,61 @@ +$NetBSD: patch-aa,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $ + +--- Makefile.in.orig Thu Jul 27 11:11:28 2000 ++++ Makefile.in Thu Jul 27 11:24:02 2000 +@@ -9,9 +9,9 @@ + SHELL = /bin/sh + + ## this does recursion for db2, if it's in the tree +- +-SUBDIRS = db2-sleepycat/dist +- ++# ++# We use the installed db2, so we don't need this line anymore ++# + depend all install check clean distclean maintainer-clean:: + for i in ${SUBDIRS}; do (test -d $$i && cd $$i && ${MAKE} $@) || exit 1; done + +@@ -32,12 +32,13 @@ + all-pure:: $(ALL_PURE) + all-utils:: $(UTILS) + +-DBDIR = db2-sleepycat/dist ++DBDIR = ${LOCALBASE}/include/db2 + + CC = @CC@ + INSTALL = @INSTALL@ +-INSTALL_PROGRAM = $(INSTALL) +-INSTALL_DATA = $(INSTALL) ++INSTALL_PROGRAM = $(BSD_INSTALL_PROGRAM) ++INSTALL_DATA = $(BSD_INSTALL_DATA) ++INSTALL_SCRIPT = $(BSD_INSTALL_SCRIPT) + SOCKLIBS = @LIBS@ + VPATH = @srcdir@ + +@@ -60,7 +61,7 @@ + DEFINES = $(DBG) @DEFS@ + CFLAGS = @gcc_cflags@ -g -O $(INCLUDES) $(DEFINES) + +-LIBDB = $(DBDIR)/libdb.a ++LIBDB = -ldb2 + + CLEAN = rm -f + +@@ -118,6 +119,8 @@ + pgpdump: pgpdump.o pgpfile.o $(PGPOBJS) $(UTILOBJS) + + pgpsplit: pgpsplit.o $(PGPOBJS) $(UTILOBJS) ++ $(CC) -o $@ pgpsplit.o $(PGPOBJS) $(UTILOBJS) $(LDFLAGS) \ ++ $(SOCKLIBS) $(LIBDB) + + kvcv: kvcv.o pgpfile.o logging.o $(PGPOBJS) $(UTILOBJS) + +@@ -138,7 +141,7 @@ + install:: all installdirs + for f in $(ALL); do $(INSTALL_PROGRAM) $$f $(bindir); done + for f in $(SYSCONF); do $(INSTALL_DATA) $$f $(sysconfdir); done +- for f in $(ALL_SH); do $(INSTALL_PROGRAM) $(srcdir)/$$f $(bindir); done ++ for f in $(ALL_SH); do $(INSTALL_SCRIPT) $(srcdir)/$$f $(bindir); done + for f in $(DATA); do $(INSTALL_DATA) $(srcdir)/$$f $(datadir); done + for f in $(MAN5); do $(INSTALL_DATA) $(srcdir)/$$f $(man5dir); done + for f in $(MAN8); do $(INSTALL_DATA) $(srcdir)/$$f $(man8dir); done diff --git a/security/pks/patches/patch-ab b/security/pks/patches/patch-ab new file mode 100644 index 00000000000..27342f4260e --- /dev/null +++ b/security/pks/patches/patch-ab @@ -0,0 +1,12 @@ +$NetBSD: patch-ab,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $ + +--- pksd.c.orig Thu Jul 27 10:16:19 2000 ++++ pksd.c Thu Jul 27 10:17:34 2000 +@@ -85,6 +85,7 @@ + psc.mrc = &mrc; + + pwc.port = pc.www_port; ++ pwc.db_dir = pc.db_dir; + pwc.max_reply_keys = pc.max_reply_keys; + pwc.pic = &pic; + diff --git a/security/pks/patches/patch-ac b/security/pks/patches/patch-ac new file mode 100644 index 00000000000..28e0ef9e561 --- /dev/null +++ b/security/pks/patches/patch-ac @@ -0,0 +1,55 @@ +$NetBSD: patch-ac,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $ + +--- pks_www.c.orig Wed Jun 2 02:06:01 1999 ++++ pks_www.c Thu Jul 27 10:17:35 2000 +@@ -113,6 +113,9 @@ + w_error(fd, vers, (unsigned char *) str, strlen(str)); + } + ++static const char homepage_str[] = "/"; ++static int homepage_len = sizeof(homepage_str)-1; ++ + static const char lookup_str[] = "/pks/lookup"; + static int lookup_len = sizeof(lookup_str)-1; + +@@ -291,6 +294,34 @@ + search = -1; + search_len = 0; + ++ if (is_token(uri, urilen, homepage_str, homepage_len, 1)) { ++ FILE *homepage; ++ char homepage_path[2048]; ++ char buf[1024]; ++ unsigned char *line; ++ xbuffer xb; ++ ++ strncpy(homepage_path, conf->db_dir, 2035); ++ strncat(homepage_path, "/index.html", 2046); ++ if ((homepage = fopen(homepage_path,"r")) == NULL) { ++ log_fatal("pks_www", "non-existent homepage"); ++ return; ++ } ++ ++ xbuffer_alloc(&xb); ++ ++ while (line = (unsigned char *) fgets(buf,sizeof(buf), homepage)) { ++ if (!xbuffer_append_str(&xb, line)) { ++ log_fatal("pks_www", "displaying home page"); ++ return; ++ } ++ } ++ ++ w_reply(fd, vers, xb.buf, xb.len); ++ ++ xbuffer_free(&xb); ++ return; ++ } + if (is_token(uri, urilen, lookup_str, lookup_len, 1)) { + long op, op_len, exact, exact_len, fingerprint, fingerprint_len; + int flags; +@@ -498,4 +529,5 @@ + void pks_www_init(pks_www_conf *conf) + { + www_init(conf->port, pks_www, conf); ++ www_init(conf->db_dir, pks_www, conf); + } diff --git a/security/pks/patches/patch-ad b/security/pks/patches/patch-ad new file mode 100644 index 00000000000..59918aac762 --- /dev/null +++ b/security/pks/patches/patch-ad @@ -0,0 +1,12 @@ +$NetBSD: patch-ad,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $ + +--- pks_www.h.orig Wed May 19 23:39:52 1999 ++++ pks_www.h Thu Jul 27 10:17:35 2000 +@@ -13,6 +13,7 @@ + typedef struct _pks_www_conf { + int port; + int max_reply_keys; ++ char *db_dir; + pks_incr_conf *pic; + } pks_www_conf; + diff --git a/security/pks/pkg/COMMENT b/security/pks/pkg/COMMENT new file mode 100644 index 00000000000..34cea9e471c --- /dev/null +++ b/security/pks/pkg/COMMENT @@ -0,0 +1 @@ +PGP Public Key Server diff --git a/security/pks/pkg/DEINSTALL b/security/pks/pkg/DEINSTALL new file mode 100644 index 00000000000..c2522de5f3e --- /dev/null +++ b/security/pks/pkg/DEINSTALL @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1.1.1 2000/07/27 16:10:23 jlam Exp $ + +PKGNAME=$1 +STAGE=$2 + +case ${STAGE} in +DEINSTALL) + ;; +POST-DEINSTALL) + cat << EOF +=========================================================================== +If you won't be using ${PKGNAME} any longer, you may want to remove the +following directories and files: + + /etc/pksd.conf + /var/pks +=========================================================================== +EOF + ;; +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 diff --git a/security/pks/pkg/DESCR b/security/pks/pkg/DESCR new file mode 100644 index 00000000000..c0ff028a842 --- /dev/null +++ b/security/pks/pkg/DESCR @@ -0,0 +1,2 @@ +This program implements a standard PGP Key Server, which can be assumed +to be in addition to the public key server at MIT. diff --git a/security/pks/pkg/INSTALL b/security/pks/pkg/INSTALL new file mode 100644 index 00000000000..3efe199b157 --- /dev/null +++ b/security/pks/pkg/INSTALL @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $NetBSD: INSTALL,v 1.1.1.1 2000/07/27 16:10:23 jlam Exp $ + +PKGNAME=$1 +STAGE=$2 + +case ${STAGE} in +PRE-INSTALL) + ;; +POST-INSTALL) + DBDIR=/var/pks/db + MAILDIR=/var/pks/incoming + EXAMPLE_DIR=${PKG_PREFIX}/share/examples + INSTALL_DATA="/usr/bin/install -c -o root -g wheel -m 0644" + + mkdir -p ${DBDIR} ${MAILDIR} + + if [ ! -f /etc/pksd.conf ] + then + echo "Installing example pksd.conf as /etc/pksd.conf." + ${INSTALL_DATA} ${EXAMPLE_DIR}/pksd.conf /etc/pksd.conf + fi + ;; +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 diff --git a/security/pks/pkg/PLIST b/security/pks/pkg/PLIST new file mode 100644 index 00000000000..0604f5b1a43 --- /dev/null +++ b/security/pks/pkg/PLIST @@ -0,0 +1,16 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2000/07/27 16:10:23 jlam Exp $ +bin/pgpsplit +bin/pks-mail.sh +bin/pks-queue-run.sh +bin/pksclient +bin/pksd +bin/pksdctl +etc/rc.d/pksd.sh +man/man5/pksd.conf.5 +man/man8/pks-intro.8 +man/man8/pksclient.8 +man/man8/pksd.8 +man/man8/pksdctl.8 +share/examples/pksd.conf +share/pks/mail_intro +share/pks/pks_help.en |