diff options
author | Rene Ladan <rene@FreeBSD.org> | 2011-10-04 23:16:30 +0000 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2011-10-04 23:16:30 +0000 |
commit | e76ee98c1a4922a71acb271a4b63dced2205d6fa (patch) | |
tree | 696011f71468eb4d996e2d405b11f9f6986142e3 /security/cfs | |
parent | 8f147e0ae593d412d1f454b825c31e13d2979299 (diff) | |
download | ports-e76ee98c1a4922a71acb271a4b63dced2205d6fa.tar.gz ports-e76ee98c1a4922a71acb271a4b63dced2205d6fa.zip |
Remove expired port:
2011-10-04 security/cfs: Locks don't work, ports/137378, unmaintained, dead upstream, insecure
Notes
Notes:
svn path=/head/; revision=282956
Diffstat (limited to 'security/cfs')
-rw-r--r-- | security/cfs/Makefile | 52 | ||||
-rw-r--r-- | security/cfs/distinfo | 2 | ||||
-rw-r--r-- | security/cfs/files/cfsd.sh.in | 53 | ||||
-rw-r--r-- | security/cfs/files/patch-Makefile | 37 | ||||
-rw-r--r-- | security/cfs/files/patch-cfs.c | 23 | ||||
-rw-r--r-- | security/cfs/files/patch-cfs.h | 27 | ||||
-rw-r--r-- | security/cfs/files/patch-cfs__bf.h | 14 | ||||
-rw-r--r-- | security/cfs/files/patch-cfs__des.c | 413 | ||||
-rw-r--r-- | security/cfs/files/patch-cfs__fh.c | 76 | ||||
-rw-r--r-- | security/cfs/files/patch-cfs__nfs.c | 241 | ||||
-rw-r--r-- | security/cfs/files/patch-cfs_adm.c | 35 | ||||
-rw-r--r-- | security/cfs/files/patch-cfsd.8 | 39 | ||||
-rw-r--r-- | security/cfs/files/patch-cfssh | 25 | ||||
-rw-r--r-- | security/cfs/files/patch-cmkdir.c | 14 | ||||
-rw-r--r-- | security/cfs/files/patch-esm__cipher.c | 14 | ||||
-rw-r--r-- | security/cfs/files/patch-getpass.c | 20 | ||||
-rw-r--r-- | security/cfs/files/patch-shs.c | 226 | ||||
-rw-r--r-- | security/cfs/files/patch-shs.h | 18 | ||||
-rw-r--r-- | security/cfs/files/patch-truerand.c | 98 | ||||
-rw-r--r-- | security/cfs/files/pkg-message.in | 27 | ||||
-rw-r--r-- | security/cfs/pkg-descr | 11 | ||||
-rw-r--r-- | security/cfs/pkg-plist | 13 |
22 files changed, 0 insertions, 1478 deletions
diff --git a/security/cfs/Makefile b/security/cfs/Makefile deleted file mode 100644 index 7974d5aecf77..000000000000 --- a/security/cfs/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# New ports collection makefile for: cfs -# Date created: 30 Jul 1997 -# Whom: John Polstra <jdp@polstra.com> -# -# $FreeBSD$ -# - -PORTNAME= cfs -PORTVERSION= 1.4.1 -PORTREVISION= 6 -CATEGORIES= security -MASTER_SITES= http://www.crypto.com/software/ - -MAINTAINER= ports@FreeBSD.org -COMMENT= A cryptographic file system implemented as a user-space NFS server - -FORBIDDEN= Buffer overflows allow remote attackers to cause DoS / execute arbitrary code -DEPRECATED= Locks don't work, ports/137378, unmaintained, dead upstream, insecure -EXPIRATION_DATE=2011-10-04 - -ALL_TARGET= cfs -MAN1= cattach.1 cdetach.1 cmkdir.1 cpasswd.1 cfssh.1 -MAN8= ccat.8 cfsd.8 cname.8 - -CFSD_BOOTSTRAP= ${PREFIX}/cfsd-bootstrap -USE_RC_SUBR= cfsd.sh -SUB_FILES= pkg-message -SUB_LIST= CFSD_BOOTSTRAP=${CFSD_BOOTSTRAP} -PLIST_SUB= CFSD_BOOTSTRAP=${CFSD_BOOTSTRAP} - -.include <bsd.port.pre.mk> - -.if ${OSVERSION} < 700000 -BROKEN= does not compile on FreeBSD 6.x -.endif - -post-patch: - ${REINPLACE_CMD} 's/^\.TH SSH/.TH CFSSH/' ${WRKSRC}/cfssh.1 - -do-install: - @cd ${WRKSRC}; \ - ${INSTALL_PROGRAM} ccat cfsd cname ${PREFIX}/sbin; \ - ${INSTALL_PROGRAM} cattach cdetach cmkdir cpasswd ${PREFIX}/bin; \ - ${INSTALL_SCRIPT} cfssh ${PREFIX}/bin/cfssh; \ - ${INSTALL_MAN} ${MAN1} ${PREFIX}/man/man1; \ - ${INSTALL_MAN} ${MAN8} ${PREFIX}/man/man8; \ - ${MKDIR} ${PREFIX}/share/doc/cfs; \ - ${INSTALL_DATA} README.install notes.ms ${PREFIX}/share/doc/cfs - ${INSTALL} -d ${_BINOWNGRP} -m 0 ${CFSD_BOOTSTRAP} - @${CAT} ${PKGMESSAGE} - -.include <bsd.port.post.mk> diff --git a/security/cfs/distinfo b/security/cfs/distinfo deleted file mode 100644 index 42554d13ee6e..000000000000 --- a/security/cfs/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (cfs-1.4.1.tar.gz) = d5c823d86a2c73019eede7d4e7853e9572f38e42b585428c3f92e75ed60312d8 -SIZE (cfs-1.4.1.tar.gz) = 98943 diff --git a/security/cfs/files/cfsd.sh.in b/security/cfs/files/cfsd.sh.in deleted file mode 100644 index c8030c9a886c..000000000000 --- a/security/cfs/files/cfsd.sh.in +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: cfsd -# REQUIRE: mountd - -# -# Add the following line to /etc/rc.conf to enable cfsd: -# -# cfsd_enable="YES" -# -# Additional options: -# -# cfsd_port="3049,udp" # the port to listen to -# XXX ports/133593 yar suggested that the ,udp suffix be used to avoid -# hangs of mount_nfs -- it's ignored by cfsd so shouldn't cause any problems -# cfsd_mountpoint="/crypt" # the CFS mountpoint -# - -. /etc/rc.subr - -name="cfsd" -rcvar=`set_rcvar` - -command="%%PREFIX%%/sbin/cfsd" -start_postcmd="cfsd_poststart" -stop_precmd="cfsd_prestop" - -cfsd_poststart() -{ - if [ -n "$cfsd_mountpoint" ]; then - mount -o port="$cfsd_port",nfsv2 localhost:%%CFSD_BOOTSTRAP%% "$cfsd_mountpoint" - fi -} - -cfsd_prestop() -{ - if [ -n "$cfsd_mountpoint" ]; then - umount "$cfsd_mountpoint" - fi -} - -load_rc_config $name -: ${cfsd_enable="NO"} -: ${cfsd_port="3049,udp"} -: ${cfsd_mountpoint="/crypt"} - -command_args="$cfsd_port >/dev/null 2>&1" -required_dirs="%%CFSD_BOOTSTRAP%% $cfsd_mountpoint" - -run_rc_command "$1" diff --git a/security/cfs/files/patch-Makefile b/security/cfs/files/patch-Makefile deleted file mode 100644 index 1eb283317643..000000000000 --- a/security/cfs/files/patch-Makefile +++ /dev/null @@ -1,37 +0,0 @@ - -$FreeBSD$ - ---- Makefile.orig -+++ Makefile -@@ -74,8 +74,9 @@ - #CC=cc - #COPT=-O -DNOT_ANSI_C -DPROTOTYPES=0 - # for gcc, use --CC=gcc --COPT=-O2 -DPROTOTYPES=1 -+CC?=gcc -+CFLAGS?=-O2 -+CFLAGS+=-DPROTOTYPES=1 - - #1B: paths: - #some peple like /usr/local/sbin instead of /usr/local/etc -@@ -224,12 +225,18 @@ - ## not sure what to do for NeXT. I think this works: - #CFLAGS=$(COPT) -posix -D_BSD -DANYPORT -I$(RINCLUDES) - -+## use these for FreeBSD -+CFLAGS+=-DBSD44 -DANYPORT -DSHORTLINKS -+LIBS=-lrpcsvc -+COMPAT=-lcompat -+RPCOPTS= -+ - - #========================================================================== - # (3/3) CONFIGURE: one last thing - #========================================================================== - # finally, comment out the next line: --CC=you_forgot_to_edit_the_makefile -+#CC=you_forgot_to_edit_the_makefile - - # now you're done with local configuration. - diff --git a/security/cfs/files/patch-cfs.c b/security/cfs/files/patch-cfs.c deleted file mode 100644 index 8d0347e41318..000000000000 --- a/security/cfs/files/patch-cfs.c +++ /dev/null @@ -1,23 +0,0 @@ - -$FreeBSD$ - ---- cfs.c.orig -+++ cfs.c -@@ -43,7 +43,7 @@ - - struct in_addr validhost; - --#if defined(SOLARIS2X) || defined(__NetBSD__) -+#if defined(SOLARIS2X) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) - void nfs_program_2(); - void adm_program_2(); - #include <string.h> -@@ -240,7 +240,7 @@ - setuid(0); - umask(0); - --#if defined(__NetBSD__) || defined(__bsdi__) -+#if defined(__NetBSD__) || defined(__bsdi__) || defined(__FreeBSD__) || defined(__OpenBSD__) - #ifndef DEBUG - /* detach from terminal */ - daemon(0,0); diff --git a/security/cfs/files/patch-cfs.h b/security/cfs/files/patch-cfs.h deleted file mode 100644 index f1e42ec1f9e5..000000000000 --- a/security/cfs/files/patch-cfs.h +++ /dev/null @@ -1,27 +0,0 @@ - -$FreeBSD$ - ---- cfs.h.orig -+++ cfs.h -@@ -23,6 +23,8 @@ - #include "safer.h" - #include "cfs_bf.h" - -+#include <inttypes.h> -+ - #define H_REG 0 - #define H_ATTACH 0 /* same as regular */ - #define H_ROOT 1 -@@ -57,10 +59,10 @@ - u_char magic[8];/* 0x0123456789abcdef */ - u_short htype; /* 0=reg, 1=attachpt, 2=root(but notused) */ - u_short instance; /* which attach */ -- u_long fileid; /* inode # */ -+ uint32_t fileid; /* inode # */ - u_char check[8];/* we just encrypt the date and copy it here */ - #ifdef SHORTLINKS -- u_long linkid; /* To uniquify short links */ -+ uint32_t linkid; /* To uniquify short links */ - u_char pad[4]; /* empty */ - #else - u_char pad[8]; /* empty */ diff --git a/security/cfs/files/patch-cfs__bf.h b/security/cfs/files/patch-cfs__bf.h deleted file mode 100644 index 1bae8ca939fd..000000000000 --- a/security/cfs/files/patch-cfs__bf.h +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- cfs_bf.h.orig -+++ cfs_bf.h -@@ -70,7 +70,7 @@ - * the Alpha, otherwise they will not. Strangly using the '8 byte' - * BF_LONG and the default 'non-pointer' inner loop is the best configuration - * for the Alpha */ --#define BF_LONG unsigned long -+#define BF_LONG unsigned int - - #define BF_ROUNDS 16 - #define BF_BLOCK 8 diff --git a/security/cfs/files/patch-cfs__des.c b/security/cfs/files/patch-cfs__des.c deleted file mode 100644 index 9599364f9e2b..000000000000 --- a/security/cfs/files/patch-cfs__des.c +++ /dev/null @@ -1,413 +0,0 @@ - -$FreeBSD$ - ---- cfs_des.c.orig -+++ cfs_des.c -@@ -22,13 +22,15 @@ - * block_cipher(key, block, decrypting) - */ - -+#include <inttypes.h> -+ - #ifdef SOLARIS2X - #define bcopy(s, d, l) memcpy(d, s, l) - #define bcmp(s, d, l) (memcmp(s, d, l)? 1 : 0) - #endif - --static long ip_low(); --static long ip_high(); -+static int32_t ip_low(); -+static int32_t ip_high(); - static void fp(); - void des_key_setup(); - -@@ -36,7 +38,7 @@ - * Tables for Combined S and P Boxes - */ - --static long s0p[] = { -+static int32_t s0p[] = { - 0x00410100,0x00010000,0x40400000,0x40410100,0x00400000,0x40010100,0x40010000,0x40400000, - 0x40010100,0x00410100,0x00410000,0x40000100,0x40400100,0x00400000,0x00000000,0x40010000, - 0x00010000,0x40000000,0x00400100,0x00010100,0x40410100,0x00410000,0x40000100,0x00400100, -@@ -47,7 +49,7 @@ - 0x00010000,0x00400000,0x40400100,0x00410100,0x40000000,0x40410000,0x00000100,0x40010100, - }; - --static long s1p[] = { -+static int32_t s1p[] = { - 0x08021002,0x00000000,0x00021000,0x08020000,0x08000002,0x00001002,0x08001000,0x00021000, - 0x00001000,0x08020002,0x00000002,0x08001000,0x00020002,0x08021000,0x08020000,0x00000002, - 0x00020000,0x08001002,0x08020002,0x00001000,0x00021002,0x08000000,0x00000000,0x00020002, -@@ -58,7 +60,7 @@ - 0x08020002,0x00020000,0x00001002,0x08001000,0x08001002,0x00000002,0x08020000,0x00021000, - }; - --static long s2p[] = { -+static int32_t s2p[] = { - 0x20800000,0x00808020,0x00000020,0x20800020,0x20008000,0x00800000,0x20800020,0x00008020, - 0x00800020,0x00008000,0x00808000,0x20000000,0x20808020,0x20000020,0x20000000,0x20808000, - 0x00000000,0x20008000,0x00808020,0x00000020,0x20000020,0x20808020,0x00008000,0x20800000, -@@ -69,7 +71,7 @@ - 0x00800020,0x00000000,0x20808000,0x20000020,0x20800000,0x20008020,0x00000020,0x00808000, - }; - --static long s3p[] = { -+static int32_t s3p[] = { - 0x00080201,0x02000200,0x00000001,0x02080201,0x00000000,0x02080000,0x02000201,0x00080001, - 0x02080200,0x02000001,0x02000000,0x00000201,0x02000001,0x00080201,0x00080000,0x02000000, - 0x02080001,0x00080200,0x00000200,0x00000001,0x00080200,0x02000201,0x02080000,0x00000200, -@@ -80,7 +82,7 @@ - 0x00080001,0x00080200,0x02080000,0x02000201,0x00000201,0x02000000,0x02000001,0x02080200, - }; - --static long s4p[] = { -+static int32_t s4p[] = { - 0x01000000,0x00002000,0x00000080,0x01002084,0x01002004,0x01000080,0x00002084,0x01002000, - 0x00002000,0x00000004,0x01000004,0x00002080,0x01000084,0x01002004,0x01002080,0x00000000, - 0x00002080,0x01000000,0x00002004,0x00000084,0x01000080,0x00002084,0x00000000,0x01000004, -@@ -91,7 +93,7 @@ - 0x00002080,0x01002004,0x01000080,0x00000084,0x00000004,0x00002084,0x01002000,0x01000004, - }; - --static long s5p[] = { -+static int32_t s5p[] = { - 0x10000008,0x00040008,0x00000000,0x10040400,0x00040008,0x00000400,0x10000408,0x00040000, - 0x00000408,0x10040408,0x00040400,0x10000000,0x10000400,0x10000008,0x10040000,0x00040408, - 0x00040000,0x10000408,0x10040008,0x00000000,0x00000400,0x00000008,0x10040400,0x10040008, -@@ -102,7 +104,7 @@ - 0x00000400,0x10000008,0x10000408,0x10040400,0x10040000,0x00000408,0x00000008,0x10040008, - }; - --static long s6p[] = { -+static int32_t s6p[] = { - 0x00000800,0x00000040,0x00200040,0x80200000,0x80200840,0x80000800,0x00000840,0x00000000, - 0x00200000,0x80200040,0x80000040,0x00200800,0x80000000,0x00200840,0x00200800,0x80000040, - 0x80200040,0x00000800,0x80000800,0x80200840,0x00000000,0x00200040,0x80200000,0x00000840, -@@ -113,7 +115,7 @@ - 0x00200840,0x80000000,0x80000800,0x80200840,0x80200000,0x00200840,0x00200800,0x80000800, - }; - --static long s7p[] = { -+static int32_t s7p[] = { - 0x04100010,0x04104000,0x00004010,0x00000000,0x04004000,0x00100010,0x04100000,0x04104010, - 0x00000010,0x04000000,0x00104000,0x00004010,0x00104010,0x04004010,0x04000010,0x04100000, - 0x00004000,0x00104010,0x00100010,0x04004000,0x04104010,0x04000010,0x00000000,0x00104000, -@@ -134,8 +136,8 @@ - int decrypting; - { - register char *key; -- register long temp; -- register long left, right; -+ register int32_t temp; -+ register int32_t left, right; - register i; - register key_offset; - int j,k; -@@ -199,8 +201,8 @@ - int decrypting; - { - register char *key; -- register long temp; -- register long left, right; -+ register int32_t temp; -+ register int32_t left, right; - register i; - register key_offset; - -@@ -240,78 +242,78 @@ - /* - * Final Permutation - */ --static long fph0[16] = { -+static int32_t fph0[16] = { - 0x00000000,0x40000000,0x00400000,0x40400000,0x00004000,0x40004000,0x00404000,0x40404000, - 0x00000040,0x40000040,0x00400040,0x40400040,0x00004040,0x40004040,0x00404040,0x40404040, - }; --static long fpl1[16] = { -+static int32_t fpl1[16] = { - 0x00000000,0x40000000,0x00400000,0x40400000,0x00004000,0x40004000,0x00404000,0x40404000, - 0x00000040,0x40000040,0x00400040,0x40400040,0x00004040,0x40004040,0x00404040,0x40404040, - }; --static long fph2[16] = { -+static int32_t fph2[16] = { - 0x00000000,0x10000000,0x00100000,0x10100000,0x00001000,0x10001000,0x00101000,0x10101000, - 0x00000010,0x10000010,0x00100010,0x10100010,0x00001010,0x10001010,0x00101010,0x10101010, - }; --static long fpl3[16] = { -+static int32_t fpl3[16] = { - 0x00000000,0x10000000,0x00100000,0x10100000,0x00001000,0x10001000,0x00101000,0x10101000, - 0x00000010,0x10000010,0x00100010,0x10100010,0x00001010,0x10001010,0x00101010,0x10101010, - }; --static long fph4[16] = { -+static int32_t fph4[16] = { - 0x00000000,0x04000000,0x00040000,0x04040000,0x00000400,0x04000400,0x00040400,0x04040400, - 0x00000004,0x04000004,0x00040004,0x04040004,0x00000404,0x04000404,0x00040404,0x04040404, - }; --static long fpl5[16] = { -+static int32_t fpl5[16] = { - 0x00000000,0x04000000,0x00040000,0x04040000,0x00000400,0x04000400,0x00040400,0x04040400, - 0x00000004,0x04000004,0x00040004,0x04040004,0x00000404,0x04000404,0x00040404,0x04040404, - }; --static long fph6[16] = { -+static int32_t fph6[16] = { - 0x00000000,0x01000000,0x00010000,0x01010000,0x00000100,0x01000100,0x00010100,0x01010100, - 0x00000001,0x01000001,0x00010001,0x01010001,0x00000101,0x01000101,0x00010101,0x01010101, - }; --static long fpl7[16] = { -+static int32_t fpl7[16] = { - 0x00000000,0x01000000,0x00010000,0x01010000,0x00000100,0x01000100,0x00010100,0x01010100, - 0x00000001,0x01000001,0x00010001,0x01010001,0x00000101,0x01000101,0x00010101,0x01010101, - }; --static long fph8[16] = { -+static int32_t fph8[16] = { - 0x00000000,0x80000000,0x00800000,0x80800000,0x00008000,0x80008000,0x00808000,0x80808000, - 0x00000080,0x80000080,0x00800080,0x80800080,0x00008080,0x80008080,0x00808080,0x80808080, - }; --static long fpl9[16] = { -+static int32_t fpl9[16] = { - 0x00000000,0x80000000,0x00800000,0x80800000,0x00008000,0x80008000,0x00808000,0x80808000, - 0x00000080,0x80000080,0x00800080,0x80800080,0x00008080,0x80008080,0x00808080,0x80808080, - }; --static long fpha[16] = { -+static int32_t fpha[16] = { - 0x00000000,0x20000000,0x00200000,0x20200000,0x00002000,0x20002000,0x00202000,0x20202000, - 0x00000020,0x20000020,0x00200020,0x20200020,0x00002020,0x20002020,0x00202020,0x20202020, - }; --static long fplb[16] = { -+static int32_t fplb[16] = { - 0x00000000,0x20000000,0x00200000,0x20200000,0x00002000,0x20002000,0x00202000,0x20202000, - 0x00000020,0x20000020,0x00200020,0x20200020,0x00002020,0x20002020,0x00202020,0x20202020, - }; --static long fphc[16] = { -+static int32_t fphc[16] = { - 0x00000000,0x08000000,0x00080000,0x08080000,0x00000800,0x08000800,0x00080800,0x08080800, - 0x00000008,0x08000008,0x00080008,0x08080008,0x00000808,0x08000808,0x00080808,0x08080808, - }; --static long fpld[16] = { -+static int32_t fpld[16] = { - 0x00000000,0x08000000,0x00080000,0x08080000,0x00000800,0x08000800,0x00080800,0x08080800, - 0x00000008,0x08000008,0x00080008,0x08080008,0x00000808,0x08000808,0x00080808,0x08080808, - }; --static long fphe[16] = { -+static int32_t fphe[16] = { - 0x00000000,0x02000000,0x00020000,0x02020000,0x00000200,0x02000200,0x00020200,0x02020200, - 0x00000002,0x02000002,0x00020002,0x02020002,0x00000202,0x02000202,0x00020202,0x02020202, - }; --static long fplf[16] = { -+static int32_t fplf[16] = { - 0x00000000,0x02000000,0x00020000,0x02020000,0x00000200,0x02000200,0x00020200,0x02020200, - 0x00000002,0x02000002,0x00020002,0x02020002,0x00000202,0x02000202,0x00020202,0x02020202, - }; - - static void - fp(left, right, text) --long left, right; -+int32_t left, right; - char text[8]; - { -- register unsigned long low, high; -- register unsigned long temp; -+ register uint32_t low, high; -+ register uint32_t temp; - - temp = left; - high = fph0[temp & 0xf]; -@@ -358,140 +360,140 @@ - /* - * Initial Permutation - */ --static long ipl0[16] = { -+static int32_t ipl0[16] = { - 0x00000000, - 0x00008000,0x00000000,0x00008000,0x00000080,0x00008080,0x00000080,0x00008080,0x00000000, - 0x00008000,0x00000000,0x00008000,0x00000080,0x00008080,0x00000080,0x00008080,}; --static long iph0[16] = { -+static int32_t iph0[16] = { - 0x00000000, - 0x00000000,0x00008000,0x00008000,0x00000000,0x00000000,0x00008000,0x00008000,0x00000080, - 0x00000080,0x00008080,0x00008080,0x00000080,0x00000080,0x00008080,0x00008080,}; --static long ipl1[16] = { -+static int32_t ipl1[16] = { - 0x00000000, - 0x80000000,0x00000000,0x80000000,0x00800000,0x80800000,0x00800000,0x80800000,0x00000000, - 0x80000000,0x00000000,0x80000000,0x00800000,0x80800000,0x00800000,0x80800000,}; --static long iph1[16] = { -+static int32_t iph1[16] = { - 0x00000000, - 0x00000000,0x80000000,0x80000000,0x00000000,0x00000000,0x80000000,0x80000000,0x00800000, - 0x00800000,0x80800000,0x80800000,0x00800000,0x00800000,0x80800000,0x80800000,}; --static long ipl2[16] = { -+static int32_t ipl2[16] = { - 0x00000000, - 0x00004000,0x00000000,0x00004000,0x00000040,0x00004040,0x00000040,0x00004040,0x00000000, - 0x00004000,0x00000000,0x00004000,0x00000040,0x00004040,0x00000040,0x00004040,}; --static long iph2[16] = { -+static int32_t iph2[16] = { - 0x00000000, - 0x00000000,0x00004000,0x00004000,0x00000000,0x00000000,0x00004000,0x00004000,0x00000040, - 0x00000040,0x00004040,0x00004040,0x00000040,0x00000040,0x00004040,0x00004040,}; --static long ipl3[16] = { -+static int32_t ipl3[16] = { - 0x00000000, - 0x40000000,0x00000000,0x40000000,0x00400000,0x40400000,0x00400000,0x40400000,0x00000000, - 0x40000000,0x00000000,0x40000000,0x00400000,0x40400000,0x00400000,0x40400000,}; --static long iph3[16] = { -+static int32_t iph3[16] = { - 0x00000000, - 0x00000000,0x40000000,0x40000000,0x00000000,0x00000000,0x40000000,0x40000000,0x00400000, - 0x00400000,0x40400000,0x40400000,0x00400000,0x00400000,0x40400000,0x40400000,}; --static long ipl4[16] = { -+static int32_t ipl4[16] = { - 0x00000000, - 0x00002000,0x00000000,0x00002000,0x00000020,0x00002020,0x00000020,0x00002020,0x00000000, - 0x00002000,0x00000000,0x00002000,0x00000020,0x00002020,0x00000020,0x00002020,}; --static long iph4[16] = { -+static int32_t iph4[16] = { - 0x00000000, - 0x00000000,0x00002000,0x00002000,0x00000000,0x00000000,0x00002000,0x00002000,0x00000020, - 0x00000020,0x00002020,0x00002020,0x00000020,0x00000020,0x00002020,0x00002020,}; --static long ipl5[16] = { -+static int32_t ipl5[16] = { - 0x00000000, - 0x20000000,0x00000000,0x20000000,0x00200000,0x20200000,0x00200000,0x20200000,0x00000000, - 0x20000000,0x00000000,0x20000000,0x00200000,0x20200000,0x00200000,0x20200000,}; --static long iph5[16] = { -+static int32_t iph5[16] = { - 0x00000000, - 0x00000000,0x20000000,0x20000000,0x00000000,0x00000000,0x20000000,0x20000000,0x00200000, - 0x00200000,0x20200000,0x20200000,0x00200000,0x00200000,0x20200000,0x20200000,}; --static long ipl6[16] = { -+static int32_t ipl6[16] = { - 0x00000000, - 0x00001000,0x00000000,0x00001000,0x00000010,0x00001010,0x00000010,0x00001010,0x00000000, - 0x00001000,0x00000000,0x00001000,0x00000010,0x00001010,0x00000010,0x00001010,}; --static long iph6[16] = { -+static int32_t iph6[16] = { - 0x00000000, - 0x00000000,0x00001000,0x00001000,0x00000000,0x00000000,0x00001000,0x00001000,0x00000010, - 0x00000010,0x00001010,0x00001010,0x00000010,0x00000010,0x00001010,0x00001010,}; --static long ipl7[16] = { -+static int32_t ipl7[16] = { - 0x00000000, - 0x10000000,0x00000000,0x10000000,0x00100000,0x10100000,0x00100000,0x10100000,0x00000000, - 0x10000000,0x00000000,0x10000000,0x00100000,0x10100000,0x00100000,0x10100000,}; --static long iph7[16] = { -+static int32_t iph7[16] = { - 0x00000000, - 0x00000000,0x10000000,0x10000000,0x00000000,0x00000000,0x10000000,0x10000000,0x00100000, - 0x00100000,0x10100000,0x10100000,0x00100000,0x00100000,0x10100000,0x10100000,}; --static long ipl8[16] = { -+static int32_t ipl8[16] = { - 0x00000000, - 0x00000800,0x00000000,0x00000800,0x00000008,0x00000808,0x00000008,0x00000808,0x00000000, - 0x00000800,0x00000000,0x00000800,0x00000008,0x00000808,0x00000008,0x00000808,}; --static long iph8[16] = { -+static int32_t iph8[16] = { - 0x00000000, - 0x00000000,0x00000800,0x00000800,0x00000000,0x00000000,0x00000800,0x00000800,0x00000008, - 0x00000008,0x00000808,0x00000808,0x00000008,0x00000008,0x00000808,0x00000808,}; --static long ipl9[16] = { -+static int32_t ipl9[16] = { - 0x00000000, - 0x08000000,0x00000000,0x08000000,0x00080000,0x08080000,0x00080000,0x08080000,0x00000000, - 0x08000000,0x00000000,0x08000000,0x00080000,0x08080000,0x00080000,0x08080000,}; --static long iph9[16] = { -+static int32_t iph9[16] = { - 0x00000000, - 0x00000000,0x08000000,0x08000000,0x00000000,0x00000000,0x08000000,0x08000000,0x00080000, - 0x00080000,0x08080000,0x08080000,0x00080000,0x00080000,0x08080000,0x08080000,}; --static long ipla[16] = { -+static int32_t ipla[16] = { - 0x00000000, - 0x00000400,0x00000000,0x00000400,0x00000004,0x00000404,0x00000004,0x00000404,0x00000000, - 0x00000400,0x00000000,0x00000400,0x00000004,0x00000404,0x00000004,0x00000404,}; --static long ipha[16] = { -+static int32_t ipha[16] = { - 0x00000000, - 0x00000000,0x00000400,0x00000400,0x00000000,0x00000000,0x00000400,0x00000400,0x00000004, - 0x00000004,0x00000404,0x00000404,0x00000004,0x00000004,0x00000404,0x00000404,}; --static long iplb[16] = { -+static int32_t iplb[16] = { - 0x00000000, - 0x04000000,0x00000000,0x04000000,0x00040000,0x04040000,0x00040000,0x04040000,0x00000000, - 0x04000000,0x00000000,0x04000000,0x00040000,0x04040000,0x00040000,0x04040000,}; --static long iphb[16] = { -+static int32_t iphb[16] = { - 0x00000000, - 0x00000000,0x04000000,0x04000000,0x00000000,0x00000000,0x04000000,0x04000000,0x00040000, - 0x00040000,0x04040000,0x04040000,0x00040000,0x00040000,0x04040000,0x04040000,}; --static long iplc[16] = { -+static int32_t iplc[16] = { - 0x00000000, - 0x00000200,0x00000000,0x00000200,0x00000002,0x00000202,0x00000002,0x00000202,0x00000000, - 0x00000200,0x00000000,0x00000200,0x00000002,0x00000202,0x00000002,0x00000202,}; --static long iphc[16] = { -+static int32_t iphc[16] = { - 0x00000000, - 0x00000000,0x00000200,0x00000200,0x00000000,0x00000000,0x00000200,0x00000200,0x00000002, - 0x00000002,0x00000202,0x00000202,0x00000002,0x00000002,0x00000202,0x00000202,}; --static long ipld[16] = { -+static int32_t ipld[16] = { - 0x00000000, - 0x02000000,0x00000000,0x02000000,0x00020000,0x02020000,0x00020000,0x02020000,0x00000000, - 0x02000000,0x00000000,0x02000000,0x00020000,0x02020000,0x00020000,0x02020000,}; --static long iphd[16] = { -+static int32_t iphd[16] = { - 0x00000000, - 0x00000000,0x02000000,0x02000000,0x00000000,0x00000000,0x02000000,0x02000000,0x00020000, - 0x00020000,0x02020000,0x02020000,0x00020000,0x00020000,0x02020000,0x02020000,}; --static long iple[16] = { -+static int32_t iple[16] = { - 0x00000000, - 0x00000100,0x00000000,0x00000100,0x00000001,0x00000101,0x00000001,0x00000101,0x00000000, - 0x00000100,0x00000000,0x00000100,0x00000001,0x00000101,0x00000001,0x00000101,}; --static long iphe[16] = { -+static int32_t iphe[16] = { - 0x00000000, - 0x00000000,0x00000100,0x00000100,0x00000000,0x00000000,0x00000100,0x00000100,0x00000001, - 0x00000001,0x00000101,0x00000101,0x00000001,0x00000001,0x00000101,0x00000101,}; --static long iplf[16] = { -+static int32_t iplf[16] = { - 0x00000000, - 0x01000000,0x00000000,0x01000000,0x00010000,0x01010000,0x00010000,0x01010000,0x00000000, - 0x01000000,0x00000000,0x01000000,0x00010000,0x01010000,0x00010000,0x01010000,}; --static long iphf[16] = { -+static int32_t iphf[16] = { - 0x00000000, - 0x00000000,0x01000000,0x01000000,0x00000000,0x00000000,0x01000000,0x01000000,0x00010000, - 0x00010000,0x01010000,0x01010000,0x00010000,0x00010000,0x01010000,0x01010000,}; - --static long -+static int32_t - ip_low(block) - register char block[8]; - { -- register long l; -+ register int32_t l; - - l = ipl1[block[0] & 0xf]; - l |= ipl0[(block[0] >> 4) & 0xf]; -@@ -512,11 +514,11 @@ - return l; - } - --static long -+static int32_t - ip_high(block) - register char block[8]; - { -- register long l; -+ register int32_t l; - - l = iph1[block[0] & 0xf]; - l |= iph0[(block[0] >> 4) & 0xf]; -@@ -962,7 +964,7 @@ - int size; - { - int i; -- struct {long fo; char key[9];} s; -+ struct {int32_t fo; char key[9];} s; - - bcopy("encrypt!",s.key,8); - diff --git a/security/cfs/files/patch-cfs__fh.c b/security/cfs/files/patch-cfs__fh.c deleted file mode 100644 index b6edee2581d8..000000000000 --- a/security/cfs/files/patch-cfs__fh.c +++ /dev/null @@ -1,76 +0,0 @@ -$FreeBSD$ - ---- cfs_fh.c.orig Thu May 3 11:24:59 2001 -+++ cfs_fh.c Sat Nov 17 19:43:36 2007 -@@ -43,6 +43,7 @@ - #ifdef NO_UTIMES - #include <utime.h> - #endif -+#include <string.h> - - #include "nfsproto.h" - #include "admproto.h" -@@ -61,7 +62,7 @@ - } - #endif - --#define hash(x) ((u_long)((x)&HMASK)) -+#define hash(x) ((uint32_t)((x)&HMASK)) - int inst = 0;/* starting point */ - instance *instances[NINSTANCES]; - -@@ -135,7 +136,6 @@ - int headlen; - int writemore=0; - struct stat sb; -- u_long mask = ~0; /*tells us whether to expand file */ - char buf[8216]; /* big enough, may not even need it */ - - /* first, normalize to the proper boundries */ -@@ -763,7 +763,7 @@ - char vect[9]; - union{ - u_char ch[9]; -- u_long i[2]; -+ uint32_t i[2]; - } buf; - char linkname[NFS_MAXPATHLEN+1]; - -@@ -792,8 +792,8 @@ - /* - sprintf((char *)buf,"%08x",(u_long)sb.st_ino+(u_long)sb.st_ctime); - */ -- buf.i[0]=(u_long)sb.st_ino; -- buf.i[1]=(u_long)sb.st_ctime; -+ buf.i[0]=(uint32_t)sb.st_ino; -+ buf.i[1]=(uint32_t)sb.st_ctime; - q_block_cipher("fixedkey",&buf,1); - /* des is just used here as a hash fn to spread the bits */ - /* since we only use 32 bits of the result, its a nonperfect */ -@@ -908,7 +908,7 @@ - f->name=NULL; - } - } else { -- if ((f=(cfs_fileid *)malloc(sizeof(cfs_fileid)))==NULL) { -+ if ((f=(cfs_fileid *)calloc(1, sizeof(cfs_fileid)))==NULL) { - fprintf(stderr,"cfsd: out of memory\n"); - cfserrno=NFSERR_STALE; /* bad news */ - return -2; -@@ -1146,7 +1146,7 @@ - break anything */ - struct dirent * - rootrd(cookie) -- long cookie; -+ int32_t cookie; - { - static struct dirent d; - -@@ -1198,7 +1198,7 @@ - #endif /* SHORTLINKS */ - )) == NULL) { - if ((f=(cfs_fileid *) -- malloc(sizeof(cfs_fileid)))==NULL) { -+ calloc(1, sizeof(cfs_fileid)))==NULL) { - fprintf(stderr,"cfsd: no memory\n"); - cfserrno=NFSERR_STALE; /* bad news */ - return -2; diff --git a/security/cfs/files/patch-cfs__nfs.c b/security/cfs/files/patch-cfs__nfs.c deleted file mode 100644 index 3beff0c16aba..000000000000 --- a/security/cfs/files/patch-cfs__nfs.c +++ /dev/null @@ -1,241 +0,0 @@ - -$FreeBSD$ - ---- cfs_nfs.c.orig Sun Dec 24 22:24:31 1995 -+++ cfs_nfs.c Sat Nov 17 19:43:00 2007 -@@ -33,6 +33,7 @@ - #else - #include <dirent.h> - #endif -+#include <string.h> - #include "nfsproto.h" - #include "admproto.h" - #include "cfs.h" -@@ -58,7 +59,7 @@ - } - - void * --nfsproc_null_2(ap,rp) -+nfsproc_null_2_svc(ap,rp) - void *ap; - SR rp; - { -@@ -72,7 +73,7 @@ - readdirres *rootreaddir(); - - attrstat * --nfsproc_getattr_2(ap,rp) -+nfsproc_getattr_2_svc(ap,rp) - nfs_fh *ap; - SR rp; - { -@@ -118,7 +119,7 @@ - } - - attrstat * --nfsproc_setattr_2(ap,rp) -+nfsproc_setattr_2_svc(ap,rp) - sattrargs *ap; - SR rp; - { -@@ -168,7 +169,7 @@ - } - - void * --nfsproc_root_2(ap,rp) -+nfsproc_root_2_svc(ap,rp) - void *ap; - SR rp; - { -@@ -179,7 +180,7 @@ - - /* fix this to deal w/ fs root (instance root should be ok) */ - diropres * --nfsproc_lookup_2(ap,rp) -+nfsproc_lookup_2_svc(ap,rp) - diropargs *ap; - SR rp; - { -@@ -258,7 +259,7 @@ - } - - readlinkres * --nfsproc_readlink_2(ap,rp) -+nfsproc_readlink_2_svc(ap,rp) - nfs_fh *ap; - SR rp; - { -@@ -309,7 +310,7 @@ - - - readres * --nfsproc_read_2(ap,rp) -+nfsproc_read_2_svc(ap,rp) - readargs *ap; - SR rp; - { -@@ -370,7 +371,7 @@ - - - void * --nfsproc_writecache_2(ap,rp) -+nfsproc_writecache_2_svc(ap,rp) - void *ap; - SR rp; - { -@@ -381,7 +382,7 @@ - - - attrstat * --nfsproc_write_2(ap,rp) -+nfsproc_write_2_svc(ap,rp) - writeargs *ap; - SR rp; - { -@@ -442,7 +443,7 @@ - - - diropres * --nfsproc_create_2(ap,rp) -+nfsproc_create_2_svc(ap,rp) - createargs *ap; - SR rp; - { -@@ -545,7 +546,7 @@ - - - nfsstat * --nfsproc_remove_2(ap,rp) -+nfsproc_remove_2_svc(ap,rp) - diropargs *ap; - SR rp; - { -@@ -587,7 +588,7 @@ - - - nfsstat * --nfsproc_rename_2(ap,rp) -+nfsproc_rename_2_svc(ap,rp) - renameargs *ap; - SR rp; - { -@@ -643,7 +644,7 @@ - - - nfsstat * --nfsproc_link_2(ap,rp) -+nfsproc_link_2_svc(ap,rp) - linkargs *ap; - SR rp; - { -@@ -694,7 +695,7 @@ - - - nfsstat * --nfsproc_symlink_2(ap,rp) -+nfsproc_symlink_2_svc(ap,rp) - symlinkargs *ap; - SR rp; - { -@@ -743,7 +744,7 @@ - } - - diropres * --nfsproc_mkdir_2(ap,rp) -+nfsproc_mkdir_2_svc(ap,rp) - createargs *ap; - SR rp; - { -@@ -817,7 +818,7 @@ - - - nfsstat * --nfsproc_rmdir_2(ap,rp) -+nfsproc_rmdir_2_svc(ap,rp) - diropargs *ap; - SR rp; - { -@@ -864,7 +865,7 @@ - /* #define cfsclosedir(x) fhclosedir(x) */ - - readdirres * --nfsproc_readdir_2(ap,rp) -+nfsproc_readdir_2_svc(ap,rp) - readdirargs *ap; - SR rp; - { -@@ -877,12 +878,11 @@ - static DIR *dp=NULL; - static struct dirent *dent; - entry **prev; -- long loc; - char s1[NFS_MAXNAMLEN+1]; - char *s; - cfskey *key; -- static long curcookie=0; -- long cookie; -+ static int32_t curcookie=0; -+ int32_t cookie; - int eof; - int ne; - int bytes; -@@ -944,7 +944,7 @@ - else if (strcmp(s,"..")==0) /* parent */ - entrytab[ne].fileid=fhpid(h); - else entrytab[ne].fileid=dent->d_fileno; -- bcopy(&cookie,entrytab[ne].cookie,sizeof(long)); -+ bcopy(&cookie,entrytab[ne].cookie,sizeof(int32_t)); - *prev = &entrytab[ne]; - prev = &entrytab[ne].nextentry; - entrytab[ne].nextentry=NULL; -@@ -964,12 +964,12 @@ - - DIR *curdir; - int curdirid=0; --long curcookie; -+int32_t curcookie; - - DIR * - cfsopendir(dir,cookie) - cfs_fileid *dir; -- long cookie; -+ int32_t cookie; - { - DIR *ret; - DIR *fhopendir(); -@@ -991,7 +991,7 @@ - } - - statfsres * --nfsproc_statfs_2(ap,rp) -+nfsproc_statfs_2_svc(ap,rp) - nfs_fh *ap; - SR rp; - { -@@ -1151,7 +1151,7 @@ - typedef char str[NFS_MAXNAMLEN+1]; - static str names[MAXENTRIES]; - entry **prev; -- long cookie; -+ int32_t cookie; - int eof; - int ne; - int bytes; -@@ -1163,7 +1163,7 @@ - ne=0; - prev= &ret.readdirres_u.reply.entries; - *prev=NULL; -- bcopy(ap->cookie,&cookie,sizeof(long)); -+ bcopy(ap->cookie,&cookie,sizeof(int32_t)); - eof=1; - - ret.status=NFS_OK; -@@ -1182,7 +1182,7 @@ - else entrytab[ne].fileid=dent->d_fileno; - cookie=dent->d_reclen; /* may not work everywhere */ - *prev = &entrytab[ne]; -- bcopy(&cookie,entrytab[ne].cookie,sizeof(long)); -+ bcopy(&cookie,entrytab[ne].cookie,sizeof(int32_t)); - prev = &entrytab[ne].nextentry; - entrytab[ne].nextentry=NULL; - ne++; diff --git a/security/cfs/files/patch-cfs_adm.c b/security/cfs/files/patch-cfs_adm.c deleted file mode 100644 index ed8414e21d0a..000000000000 --- a/security/cfs/files/patch-cfs_adm.c +++ /dev/null @@ -1,35 +0,0 @@ - -$FreeBSD$ - ---- cfs_adm.c.orig Mon Dec 25 01:41:30 1995 -+++ cfs_adm.c Sat Nov 17 19:44:35 2007 -@@ -36,14 +36,14 @@ - } - - void * --admproc_null_2() -+admproc_null_2_svc(void *v, SR rp) - { - } - - cfsstat * --admproc_attach_2(ap,rp) -+admproc_attach_2_svc(ap,rp) - cfs_attachargs *ap; -- SR *rp; -+ SR rp; - { - static cfsstat ret; - int i; -@@ -154,9 +154,9 @@ - } - - cfsstat * --admproc_detach_2(ap,rp) -+admproc_detach_2_svc(ap,rp) - cfs_detachargs *ap; -- SR *rp; -+ SR rp; - { - static cfsstat ret; - int i; diff --git a/security/cfs/files/patch-cfsd.8 b/security/cfs/files/patch-cfsd.8 deleted file mode 100644 index f5d5666cf9bc..000000000000 --- a/security/cfs/files/patch-cfsd.8 +++ /dev/null @@ -1,39 +0,0 @@ - -$FreeBSD$ - ---- cfsd.8.orig -+++ cfsd.8 -@@ -3,6 +3,7 @@ - cfsd - cryptographic file system daemon - .SH SYNOPSIS - .B cfsd -+[port] - .SH DESCRIPTION - \fBcfsd\fP is the user-level daemon for the Cryptographic File System - (CFS). It is essentially an RPC server for the NFS protocol augmented -@@ -13,8 +14,9 @@ - attached encrypted directories, presenting them in clear form under - the CFS mount point (typically "/crypt"). - .LP --\fBcfsd\fP should ordinarily be invoked at boot time from /etc/rc --(or /etc/rc.local). The rc file should also start -+\fBcfsd\fP should ordinarily be invoked at boot time from -+/usr/local/etc/rc.d/cfsd.sh -+The rc file should also start - \fBmountd\fP(8) daemon with least one file system exported to - localhost; note that cfsd itself does not handle the mount protocol. - Once a mountd is running, the mount(8) command should be invoked to -@@ -22,10 +24,10 @@ - port=3049. - .SH EXAMPLES - .TP --/usr/local/etc/cfsd --invokes cfs (in /etc/rc) -+/usr/local/etc/rc.d/cfsd.sh -+starts cfsd (from /etc/rc) - .TP --/etc/mount -o port=3049,intr localhost:/ /crypt -+/sbin/mount -o port=3049,intr,nfsv2 localhost:/ /crypt - mounts cfs on /crypt (in /etc/rc) - .SH FILES - .TP diff --git a/security/cfs/files/patch-cfssh b/security/cfs/files/patch-cfssh deleted file mode 100644 index 9704ba6f7419..000000000000 --- a/security/cfs/files/patch-cfssh +++ /dev/null @@ -1,25 +0,0 @@ - -$FreeBSD$ - ---- cfssh.orig -+++ cfssh -@@ -1,15 +1,16 @@ --#!/bin/ksh -+#!/bin/sh - - if [ -z "$1" ]; then - echo Usage: cfssh directory - exit - fi - export PS1="crypto:`basename $1`$ " --D=.$RANDOM.$RANDOM -+set -- $1 `dd if=/dev/urandom bs=8 count=1 2>/dev/null | od -D` -+D=.$3.$4 - cattach $1 $D || exit 1 - echo "Directory is /crypt/$D" - cd /crypt/$D --D=" " -+D=" " - CWD=`/bin/pwd` - D=`basename $CWD` - PWD=$CWD diff --git a/security/cfs/files/patch-cmkdir.c b/security/cfs/files/patch-cmkdir.c deleted file mode 100644 index 37195849f86b..000000000000 --- a/security/cfs/files/patch-cmkdir.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- cmkdir.c.orig -+++ cmkdir.c -@@ -43,7 +43,7 @@ - struct timeval tv; - u_long r; - int i; -- int ciph=CFS_THREE_DES; -+ int ciph=CFS_BLOWFISH; - int cfmt=1; - int smsize=LARGESMSIZE; - unsigned char ekey[128]; diff --git a/security/cfs/files/patch-esm__cipher.c b/security/cfs/files/patch-esm__cipher.c deleted file mode 100644 index d16f0139e760..000000000000 --- a/security/cfs/files/patch-esm__cipher.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- esm_cipher.c.orig -+++ esm_cipher.c -@@ -157,7 +157,7 @@ - unsigned int n; - int i; - struct timeval tv; -- unsigned long truerand(); -+ uint32_t truerand(); - unsigned char b[20]; - - R_RandomInit(&rs); diff --git a/security/cfs/files/patch-getpass.c b/security/cfs/files/patch-getpass.c deleted file mode 100644 index cd3fc0e2cb11..000000000000 --- a/security/cfs/files/patch-getpass.c +++ /dev/null @@ -1,20 +0,0 @@ ---- getpass.c -+++ getpass.c -@@ -35,7 +35,7 @@ - - #include <stdio.h> - #include <signal.h> --#ifndef linux -+#if !defined(linux) && !defined(__FreeBSD__) - #include <sgtty.h> - #endif - #include <sys/types.h> -@@ -45,7 +45,7 @@ - #include "cfs.h" - #include "shs.h" - --#if defined(irix) || defined(linux) -+#if defined(irix) || defined(linux) || defined(__FreeBSD__) - /* hacks to use POSIX style termios instead of old BSD style sgttyb */ - #include <termios.h> - #define sgttyb termios diff --git a/security/cfs/files/patch-shs.c b/security/cfs/files/patch-shs.c deleted file mode 100644 index 9dded367b9a0..000000000000 --- a/security/cfs/files/patch-shs.c +++ /dev/null @@ -1,226 +0,0 @@ - -$FreeBSD$ - ---- shs.c.orig -+++ shs.c -@@ -50,9 +50,9 @@ - #include <stdio.h> - #include "shs.h" - --static long nbits; --static unsigned long *h; --static unsigned long *w; -+static int32_t nbits; -+static uint32_t *h; -+static uint32_t *w; - static void shs1(); - /* - static void packl (unsigned long); -@@ -61,7 +61,7 @@ - static void opack(unsigned char); - */ - --#define MASK (unsigned long)0xffffffffL /* in case more than 32 bits per long */ -+#define MASK (uint32_t)0xffffffffL /* in case more than 32 bits per long */ - - /* - * stick one byte into the current block; process the block when full -@@ -70,14 +70,14 @@ - unsigned char c; - { - int n32, nd32, shiftbits; -- register unsigned long x, mask, y; -+ register uint32_t x, mask, y; - - nd32 = (int)(nbits >> 5); /* nbits/32 */ - n32 = (int)(nbits & 0x1f); /* nbits%32 */ - shiftbits = 24-n32; - -- x = (unsigned long)(c<<shiftbits); -- mask = (unsigned long)(0xff << shiftbits); -+ x = (uint32_t)(c<<shiftbits); -+ mask = (uint32_t)(0xff << shiftbits); - mask = ~mask; - - y = w[nd32]; -@@ -97,7 +97,7 @@ - int nd32; - - nd32 = (int)(nbits >> 5); -- w[nd32] = (u_long)(((u_long)c0<<24) | ((u_long)c1<<16) | ((u_long)c2<<8) | (u_long)c3); -+ w[nd32] = (uint32_t)(((uint32_t)c0<<24) | ((uint32_t)c1<<16) | ((uint32_t)c2<<8) | (uint32_t)c3); - - nbits += 32; - if(nbits==512){ -@@ -111,7 +111,7 @@ - */ - static void - packl(x) -- unsigned long x; -+ uint32_t x; - { - pack((unsigned char)(x>>24), (unsigned char)(x>>16), - (unsigned char)(x>>8), (unsigned char)(x>>0)); -@@ -123,24 +123,24 @@ - static void - shs1() - { -- unsigned long *wp; -- unsigned long temp; -- unsigned long A, B, C, D, E; -+ uint32_t *wp; -+ uint32_t temp; -+ uint32_t A, B, C, D, E; - int t; - --#define S(n,x) (u_long)(((x)<<(n))|((MASK&(x))>>(32-(n)))) -+#define S(n,x) (uint32_t)(((x)<<(n))|((MASK&(x))>>(32-(n)))) - - wp = w; - t = 8; - do { -- wp[16] = S(1, (u_long)(wp[13]^wp[8]^wp[2]^wp[0])); -- wp[17] = S(1, (u_long)(wp[14]^wp[9]^wp[3]^wp[1])); -- wp[18] = S(1, (u_long)(wp[15]^wp[10]^wp[4]^wp[2])); -- wp[19] = S(1, (u_long)(wp[16]^wp[11]^wp[5]^wp[3])); -- wp[20] = S(1, (u_long)(wp[17]^wp[12]^wp[6]^wp[4])); -- wp[21] = S(1, (u_long)(wp[18]^wp[13]^wp[7]^wp[5])); -- wp[22] = S(1, (u_long)(wp[19]^wp[14]^wp[8]^wp[6])); -- wp[23] = S(1, (u_long)(wp[20]^wp[15]^wp[9]^wp[7])); -+ wp[16] = S(1, (uint32_t)(wp[13]^wp[8]^wp[2]^wp[0])); -+ wp[17] = S(1, (uint32_t)(wp[14]^wp[9]^wp[3]^wp[1])); -+ wp[18] = S(1, (uint32_t)(wp[15]^wp[10]^wp[4]^wp[2])); -+ wp[19] = S(1, (uint32_t)(wp[16]^wp[11]^wp[5]^wp[3])); -+ wp[20] = S(1, (uint32_t)(wp[17]^wp[12]^wp[6]^wp[4])); -+ wp[21] = S(1, (uint32_t)(wp[18]^wp[13]^wp[7]^wp[5])); -+ wp[22] = S(1, (uint32_t)(wp[19]^wp[14]^wp[8]^wp[6])); -+ wp[23] = S(1, (uint32_t)(wp[20]^wp[15]^wp[9]^wp[7])); - wp += 8; - t--; - } while (t > 0); -@@ -154,22 +154,22 @@ - t = 0; - while (t<20) { - temp = S(5,A) + E + w[t++]; -- temp += (unsigned long)0x5a827999L + ((B&C)|(D&~B)); -+ temp += (uint32_t)0x5a827999L + ((B&C)|(D&~B)); - E = D; D = C; C = S(30,B); B = A; A = temp; - } - while (t<40) { - temp = S(5,A) + E + w[t++]; -- temp += (unsigned long)0x6ed9eba1L + (B^C^D); -+ temp += (uint32_t)0x6ed9eba1L + (B^C^D); - E = D; D = C; C = S(30,B); B = A; A = temp; - } - while (t<60) { - temp = S(5,A) + E + w[t++]; -- temp += (unsigned long)0x8f1bbcdcL + ((B&C)|(B&D)|(C&D)); -+ temp += (uint32_t)0x8f1bbcdcL + ((B&C)|(B&D)|(C&D)); - E = D; D = C; C = S(30,B); B = A; A = temp; - } - while (t<80) { - temp = S(5,A) + E + w[t++]; -- temp += (unsigned long)0xca62c1d6L + (B^C^D); -+ temp += (uint32_t)0xca62c1d6L + (B^C^D); - E = D; D = C; C = S(30,B); B = A; A = temp; - } - h[0] = MASK&(h[0] + A); -@@ -179,7 +179,7 @@ - h[4] = MASK&(h[4] + E); - } - --#define CHARSTOLONG(wp,s,i) {*wp++ = (u_long)((((u_long)(s[i])&0xff)<<24)|(((u_long)(s[i+1])&0xff)<<16)|(((u_long)(s[i+2])&0xff)<<8)|(u_long)(s[i+3]&0xff));} -+#define CHARSTOLONG(wp,s,i) {*wp++ = (uint32_t)((((uint32_t)(s[i])&0xff)<<24)|(((uint32_t)(s[i+1])&0xff)<<16)|(((uint32_t)(s[i+2])&0xff)<<8)|(uint32_t)(s[i+3]&0xff));} - - - void -@@ -187,11 +187,11 @@ - SHS_CTX *mdContext; - { - nbits = 0; -- mdContext->h[0] = (unsigned long)0x67452301L; -- mdContext->h[1] = (unsigned long)0xefcdab89L; -- mdContext->h[2] = (unsigned long)0x98badcfeL; -- mdContext->h[3] = (unsigned long)0x10325476L; -- mdContext->h[4] = (unsigned long)0xc3d2e1f0L; -+ mdContext->h[0] = (uint32_t)0x67452301L; -+ mdContext->h[1] = (uint32_t)0xefcdab89L; -+ mdContext->h[2] = (uint32_t)0x98badcfeL; -+ mdContext->h[3] = (uint32_t)0x10325476L; -+ mdContext->h[4] = (uint32_t)0xc3d2e1f0L; - mdContext->totalLength = 0; - } - -@@ -202,16 +202,16 @@ - unsigned char *s; - unsigned int n; - { -- register unsigned long *wp; -- long nn = n; -- long i; -+ register uint32_t *wp; -+ int32_t nn = n; -+ int32_t i; - - w = mdContext->w; - h = mdContext->h; - mdContext->totalLength += n; - - nbits = 0; -- n = n/(u_long)64; -+ n = n/(uint32_t)64; - wp = w; - - while(n>0){ -@@ -240,7 +240,7 @@ - while(i>3) { - CHARSTOLONG(wp,s,0); - s = (s + 4); -- nbits += (u_long)32; -+ nbits += (uint32_t)32; - i -= 4; - } - while (i) { -@@ -253,14 +253,14 @@ - shsFinal(mdContext) - SHS_CTX *mdContext; - { -- long nn = mdContext->totalLength; -+ int32_t nn = mdContext->totalLength; - w = mdContext->w; - h = mdContext->h; - - opack(128); - while(nbits != 448)opack(0); -- packl((unsigned long)(nn>>29)); -- packl((unsigned long)(nn<<3)); -+ packl((uint32_t)(nn>>29)); -+ packl((uint32_t)(nn<<3)); - - /* if(nbits != 0) - handle_exception(CRITICAL,"shsFinal(): nbits != 0\n");*/ -@@ -269,7 +269,7 @@ - unsigned char * - qshs(s, n) - unsigned char *s; -- long n; -+ int32_t n; - { - SHS_CTX *mdContext; - static SHS_CTX mdC; -@@ -291,6 +291,7 @@ - return ret; - } - -+#if 0 /* This doesn't work and isn't used. */ - /*int fread(char *, int, int, FILE *);*/ - - unsigned long * -@@ -316,6 +317,5 @@ - - return mdContext->h; - } -- -- -+#endif - diff --git a/security/cfs/files/patch-shs.h b/security/cfs/files/patch-shs.h deleted file mode 100644 index a8e11bbd8447..000000000000 --- a/security/cfs/files/patch-shs.h +++ /dev/null @@ -1,18 +0,0 @@ - -$FreeBSD$ - ---- shs.h.orig -+++ shs.h -@@ -1,7 +1,9 @@ -+#include <inttypes.h> -+ - typedef struct { -- long totalLength; -- unsigned long h[5]; -- unsigned long w[80]; -+ int32_t totalLength; -+ uint32_t h[5]; -+ uint32_t w[80]; - } SHS_CTX; - - unsigned char *qshs(); diff --git a/security/cfs/files/patch-truerand.c b/security/cfs/files/patch-truerand.c deleted file mode 100644 index c0cbc23d1cf9..000000000000 --- a/security/cfs/files/patch-truerand.c +++ /dev/null @@ -1,98 +0,0 @@ - -$FreeBSD$ - ---- truerand.c.orig -+++ truerand.c -@@ -89,6 +89,8 @@ - #include <math.h> - #include <stdio.h> - -+#include <inttypes.h> -+ - static jmp_buf env; - static unsigned count; - static unsigned ocount; -@@ -115,7 +117,7 @@ - tick(); - } - --static unsigned long -+static uint32_t - roulette() - { - if (setjmp(env)) -@@ -131,15 +133,15 @@ - * basic interface to 32 bit truerand. - * note that any scheduled SIGALRM will be delayed by about .3 secs. - */ --unsigned long -+uint32_t - raw_truerand() - { - void (*oldalrm)(); - struct itimerval it; -- unsigned long counts[12]; -+ uint32_t counts[12]; - unsigned char *qshs(); - unsigned char *r; -- unsigned long buf; -+ uint32_t buf; - int i; - - getitimer(ITIMER_REAL, &it); -@@ -153,7 +155,7 @@ - setitimer(ITIMER_REAL, &it, NULL); - - r = qshs(counts,sizeof(counts)); -- buf = *((unsigned long *) r); -+ buf = *((uint32_t *) r); - - return buf; - } -@@ -182,8 +184,8 @@ - * usage: - * unsigned char r8; - * unsigned short r16; -- * unsigned long r32; -- * unsigned long trand8(), trand16(), trand32(); -+ * uint32_t r32; -+ * uint32_t trand8(), trand16(), trand32(); - * r8=trand8(); - * r16=trand16(); - * r32=trand32(); -@@ -206,11 +208,11 @@ - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - */ - --unsigned long randbyte() -+uint32_t randbyte() - { -- unsigned long raw_truerand(); -+ uint32_t raw_truerand(); - unsigned char *qshs(); -- unsigned long r[2]; -+ uint32_t r[2]; - unsigned char *hash; - - r[0]=raw_truerand(); r[1]=raw_truerand(); -@@ -218,17 +220,17 @@ - return ((int) (*hash)) & 0xff; - } - --unsigned long trand8() -+uint32_t trand8() - { - return randbyte(); - } - --unsigned long trand16() -+uint32_t trand16() - { - return randbyte() ^ (randbyte()<<8); - } - --unsigned long trand32() -+uint32_t trand32() - { - return randbyte() ^ (randbyte()<<8) - ^ (randbyte()<<16) ^ (randbyte()<<24); diff --git a/security/cfs/files/pkg-message.in b/security/cfs/files/pkg-message.in deleted file mode 100644 index f4a1db7d7450..000000000000 --- a/security/cfs/files/pkg-message.in +++ /dev/null @@ -1,27 +0,0 @@ -=============================================================================== -Quick start instructions: - - - add the following entry to /etc/exports: - - %%CFSD_BOOTSTRAP%% localhost - - - create the default CFS mountpoint (if you want to use a different - mountpoint, set the cfsd_mountpoint variable in /etc/rc.conf): - - mkdir /crypt - - - enable rpcbind, mountd and cfsd in /etc/rc.conf: - - FreeBSD 4.x: - - portmap_enable="YES" - single_mountd_enable="YES" - cfsd_enable="YES" - - FreeBSD 5.x: - - mountd_enable="YES" - cfsd_enable="YES" - - - reboot the system -=============================================================================== diff --git a/security/cfs/pkg-descr b/security/cfs/pkg-descr deleted file mode 100644 index 4e01f0d2883c..000000000000 --- a/security/cfs/pkg-descr +++ /dev/null @@ -1,11 +0,0 @@ -This is CFS, Matt Blaze's Cryptographic File System. It provides -transparent encryption and decryption of selected directory trees. -It is implemented as a user-level NFS server and thus does not -require any kernel modifications. - -For an overview of how to use it, read "${PREFIX}/share/doc/cfs/notes.ms" -and the manual pages. There is a paper describing CFS at: - - http://www.crypto.com/papers/cfs.pdf - -WWW: http://www.crypto.com/software/ diff --git a/security/cfs/pkg-plist b/security/cfs/pkg-plist deleted file mode 100644 index b32516fed14c..000000000000 --- a/security/cfs/pkg-plist +++ /dev/null @@ -1,13 +0,0 @@ -bin/cattach -bin/cdetach -bin/cmkdir -bin/cpasswd -bin/cfssh -sbin/ccat -sbin/cfsd -sbin/cname -share/doc/cfs/README.install -share/doc/cfs/notes.ms -@exec install -d -o root -g wheel -m 0 %%CFSD_BOOTSTRAP%% 2>/dev/null || true -@unexec rmdir %%CFSD_BOOTSTRAP%% 2>/dev/null || true -@dirrm share/doc/cfs |