* respect CC/CFLAGS
* redo patches with update-patches
This commit is contained in:
parent
23c9148e03
commit
b4ca092a9e
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.16 2001/01/05 16:35:59 brad Exp $
|
||||
# $OpenBSD: Makefile,v 1.17 2001/03/17 15:46:36 wilfried Exp $
|
||||
|
||||
DISTNAME= cfs-1.3.3
|
||||
CATEGORIES= security
|
||||
@ -16,7 +16,7 @@ PERMIT_DISTFILES_FTP= Yes
|
||||
ALL_TARGET= cfs
|
||||
|
||||
do-build:
|
||||
@cd ${WRKSRC} && sh make_with_bad_rpcgen cfs
|
||||
@cd ${WRKSRC} && env CCTMP="${CC}" CFLAGS="${CFLAGS}" sh make_with_bad_rpcgen cfs
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/cfs
|
||||
|
39
security/cfs/patches/patch-Makefile
Normal file
39
security/cfs/patches/patch-Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1 2001/03/17 15:46:37 wilfried Exp $
|
||||
--- Makefile.orig Fri Mar 16 20:07:55 2001
|
||||
+++ Makefile Fri Mar 16 20:08:42 2001
|
||||
@@ -71,8 +71,8 @@
|
||||
#CC=cc
|
||||
#COPT=-O -DNOT_ANSI_C -DPROTOTYPES=0
|
||||
# for gcc, use
|
||||
-CC=gcc
|
||||
-COPT=-O2 -DPROTOTYPES=1
|
||||
+#CC=gcc
|
||||
+COPT=-DPROTOTYPES=1
|
||||
|
||||
#1B: paths:
|
||||
BINDIR=/usr/local/bin
|
||||
@@ -184,6 +184,15 @@ RINCLUDES=/usr/mab/rsaref/source
|
||||
#COMPAT=-lcompat
|
||||
#RPCOPTS=
|
||||
|
||||
+##use these for OpenBSD i386 2.0 (Niels Provos)
|
||||
+# for mounting, you need to use a command like:
|
||||
+# mount -o port=3049,nfsv2,intr localhost:/null /crypt
|
||||
+# use -DSHORTLINKS to support the BSD 4.4 symbolic links (Dave Carrel)
|
||||
+CFLAGS=$(COPT) -DBSD44 -DANYPORT -DSHORTLINKS -I$(RINCLUDES)
|
||||
+LIBS=
|
||||
+COMPAT=-lcompat
|
||||
+RPCOPTS=
|
||||
+
|
||||
##use these for NetBSD i386 1.0 (John Kohl)
|
||||
# for mounting, you need to use a command like:
|
||||
# mount -o -P,-c localhost:/null /crypt
|
||||
@@ -207,7 +216,7 @@ RINCLUDES=/usr/mab/rsaref/source
|
||||
# (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.
|
||||
|
@ -1,37 +0,0 @@
|
||||
*** Makefile.orig Wed Mar 20 12:59:03 1996
|
||||
--- Makefile Tue Nov 25 17:38:23 1997
|
||||
***************
|
||||
*** 175,180 ****
|
||||
--- 175,189 ----
|
||||
#COMPAT=-lcompat
|
||||
#RPCOPTS=
|
||||
|
||||
+ ##use these for OpenBSD i386 2.0 (Niels Provos)
|
||||
+ # for mounting, you need to use a command like:
|
||||
+ # mount -o port=3049,nfsv2,intr localhost:/null /crypt
|
||||
+ # use -DSHORTLINKS to support the BSD 4.4 symbolic links (Dave Carrel)
|
||||
+ CFLAGS=$(COPT) -DBSD44 -DANYPORT -DSHORTLINKS -I$(RINCLUDES)
|
||||
+ LIBS=
|
||||
+ COMPAT=-lcompat
|
||||
+ RPCOPTS=
|
||||
+
|
||||
##use these for NetBSD i386 1.0 (John Kohl)
|
||||
# for mounting, you need to use a command like:
|
||||
# mount -o -P,-c localhost:/null /crypt
|
||||
***************
|
||||
*** 198,204 ****
|
||||
# (3/3) CONFIGURE: one last thing
|
||||
#==========================================================================
|
||||
# finally, comment out the next line:
|
||||
! CC=you_forgot_to_edit_the_makefile
|
||||
|
||||
# now you're done with local configuration.
|
||||
|
||||
--- 207,213 ----
|
||||
# (3/3) CONFIGURE: one last thing
|
||||
#==========================================================================
|
||||
# finally, comment out the next line:
|
||||
! #CC=you_forgot_to_edit_the_makefile
|
||||
|
||||
# now you're done with local configuration.
|
||||
|
@ -1,19 +0,0 @@
|
||||
*** truerand.c.orig Tue Nov 25 17:53:25 1997
|
||||
--- truerand.c Tue Nov 25 17:52:49 1997
|
||||
***************
|
||||
*** 55,61 ****
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <sys/time.h>
|
||||
! #include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static jmp_buf env;
|
||||
--- 55,61 ----
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <sys/time.h>
|
||||
! /*#include <math.h>*/
|
||||
#include <stdio.h>
|
||||
|
||||
static jmp_buf env;
|
@ -1,25 +1,6 @@
|
||||
diff -u --new-file Makefile cfs-1.3.3-obsd/Makefile
|
||||
--- Makefile Sun Oct 26 23:41:30 1997
|
||||
+++ cfs-1.3.3-obsd/Makefile Sun Oct 26 23:43:39 1997
|
||||
@@ -175,6 +175,15 @@
|
||||
#COMPAT=-lcompat
|
||||
#RPCOPTS=
|
||||
|
||||
+##use these for OpenBSD i386 2.0 (Niels Provos)
|
||||
+# for mounting, you need to use a command like:
|
||||
+# mount -o port=3049,nfsv2,intr localhost:/null /crypt
|
||||
+# use -DSHORTLINKS to support the BSD 4.4 symbolic links (Dave Carrel)
|
||||
+#CFLAGS=$(COPT) -DBSD44 -DANYPORT -DSHORTLINKS -I$(RINCLUDES)
|
||||
+#LIBS=
|
||||
+#COMPAT=-lcompat
|
||||
+#RPCOPTS=
|
||||
+
|
||||
##use these for NetBSD i386 1.0 (John Kohl)
|
||||
# for mounting, you need to use a command like:
|
||||
# mount -o -P,-c localhost:/null /crypt
|
||||
diff -u --new-file bf_tab.h cfs-1.3.3-obsd/bf_tab.h
|
||||
--- bf_tab.h Thu Jan 1 01:00:00 1970
|
||||
+++ cfs-1.3.3-obsd/bf_tab.h Tue Oct 14 10:45:56 1997
|
||||
$OpenBSD: patch-bf_tab_h,v 1.1 2001/03/17 15:46:39 wilfried Exp $
|
||||
--- bf_tab.h.orig Fri Mar 16 20:23:02 2001
|
||||
+++ bf_tab.h Fri Mar 16 20:23:02 2001
|
||||
@@ -0,0 +1,270 @@
|
||||
+/* bf_tab.h: P-box and S-box tables initialized with digits of Pi */
|
||||
+
|
||||
@ -291,106 +272,3 @@ diff -u --new-file bf_tab.h cfs-1.3.3-obsd/bf_tab.h
|
||||
+ 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
|
||||
+ 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6,
|
||||
+};
|
||||
diff -u --new-file cfs.c cfs-1.3.3-obsd/cfs.c
|
||||
--- cfs.c Sun Oct 26 23:41:30 1997
|
||||
+++ cfs-1.3.3-obsd/cfs.c Tue Oct 14 10:45:56 1997
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
struct in_addr validhost;
|
||||
|
||||
-#if defined(SOLARIS2X) || defined(__NetBSD__)
|
||||
+#if defined(SOLARIS2X) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
void nfs_program_2();
|
||||
void adm_program_2();
|
||||
#include <string.h>
|
||||
@@ -50,8 +50,9 @@
|
||||
int nfs_program_2();
|
||||
int adm_program_2();
|
||||
#endif
|
||||
-#ifdef __NetBSD__
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
int _rpcsvcdirty;
|
||||
+int _rpcpmstart;
|
||||
#endif
|
||||
|
||||
void grimreap();
|
||||
@@ -233,12 +234,12 @@
|
||||
setuid(0);
|
||||
umask(0);
|
||||
|
||||
-#if defined(__NetBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#ifndef DEBUG
|
||||
/* detach from terminal */
|
||||
daemon(0,0);
|
||||
#endif /* DEBUG */
|
||||
-#endif /* __NetBSD__ */
|
||||
+#endif /* __*BSD__ */
|
||||
|
||||
#ifndef NORLIMITS
|
||||
/* make sure we don't spill a corefile */
|
||||
diff -u --new-file cfs_fh.c cfs-1.3.3-obsd/cfs_fh.c
|
||||
--- cfs_fh.c Sun Oct 26 23:41:30 1997
|
||||
+++ cfs-1.3.3-obsd/cfs_fh.c Tue Oct 14 10:45:57 1997
|
||||
@@ -48,6 +48,10 @@
|
||||
#include "admproto.h"
|
||||
#include "cfs.h"
|
||||
|
||||
+#if !defined(__OpenBSD__)
|
||||
+#define off_t u_long
|
||||
+#endif
|
||||
+
|
||||
#ifdef NO_UTIMES
|
||||
/* simulate utimes with utime */
|
||||
int utimes(s,tv)
|
||||
@@ -98,7 +102,7 @@
|
||||
/* now begin and totlen are what we do the actual i/o on */
|
||||
if (totlen>8208)
|
||||
return -1; /* shouldn't happen */
|
||||
- if (lseek(fd,begin,L_SET)<0)
|
||||
+ if (lseek(fd,(off_t)begin,L_SET)<0)
|
||||
return -1;
|
||||
/* note that we are violating standard unix semantics here - we have
|
||||
no way to distinguish between zeros in the encrypted file and
|
||||
@@ -155,7 +159,7 @@
|
||||
/* we could reduce the size of this read to just
|
||||
the CFSBLOCKs at the head &/| tail of the file,
|
||||
but that's probably more trouble than it's worth.*/
|
||||
- if (lseek(fd,begin,L_SET)<0)
|
||||
+ if (lseek(fd,(off_t)begin,L_SET)<0)
|
||||
return -1;
|
||||
/* the extra CFSBLOCK ensures that next block is ok */
|
||||
iolen=isbndry(totlen)?totlen:(totlen+CFSBLOCK);
|
||||
@@ -167,7 +171,7 @@
|
||||
/* now we can do the actual encrypt and i/o */
|
||||
bcopy((char *)blk,(char *)(buf+fronterr),len);
|
||||
doencrypt(key,buf,totlen,begin,vect);
|
||||
- if (lseek(fd,begin,L_SET)<0)
|
||||
+ if (lseek(fd,(off_t)begin,L_SET)<0)
|
||||
return -1;
|
||||
/* again, holes in the file are a delicate problem. If the CFSBLOCK
|
||||
bountry is not always on a file boundry, you could even corrupt
|
||||
diff -u --new-file make_with_bad_rpcgen cfs-1.3.3-obsd/make_with_bad_rpcgen
|
||||
--- make_with_bad_rpcgen Sun Oct 26 23:41:32 1997
|
||||
+++ cfs-1.3.3-obsd/make_with_bad_rpcgen Tue Oct 14 10:46:00 1997
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# this will make CFS for linux (and other) systems with the
|
||||
# wrong version of rpcgen
|
||||
-make CC="cc -traditional -Dd_fileno=d_ino \
|
||||
+make CC="cc -traditional -DDd_fileno=d_ino \
|
||||
-Dnfsproc_null_2_svc=nfsproc_null_2 \
|
||||
-Dnfsproc_getattr_2_svc=nfsproc_getattr_2 \
|
||||
-Dnfsproc_setattr_2_svc=nfsproc_setattr_2 \
|
||||
@@ -23,6 +23,9 @@
|
||||
-Dadmproc_null_1_svc=admproc_null_1 \
|
||||
-Dadmproc_attach_1_svc=admproc_attach_1 \
|
||||
-Dadmproc_detach_1_svc=admproc_detach_1 \
|
||||
+ -Dadmproc_null_2_svc=admproc_null_2 \
|
||||
+ -Dadmproc_attach_2_svc=admproc_attach_2 \
|
||||
+ -Dadmproc_detach_2_svc=admproc_detach_2 \
|
||||
-Dadmproc_ls_1_svc=admproc_ls_1 \
|
||||
" $*
|
||||
|
||||
|
||||
|
38
security/cfs/patches/patch-cfs_c
Normal file
38
security/cfs/patches/patch-cfs_c
Normal file
@ -0,0 +1,38 @@
|
||||
$OpenBSD: patch-cfs_c,v 1.1 2001/03/17 15:46:39 wilfried Exp $
|
||||
--- cfs.c.orig Wed Mar 20 18:57:56 1996
|
||||
+++ cfs.c Fri Mar 16 20:23:02 2001
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
struct in_addr validhost;
|
||||
|
||||
-#if defined(SOLARIS2X) || defined(__NetBSD__)
|
||||
+#if defined(SOLARIS2X) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
void nfs_program_2();
|
||||
void adm_program_2();
|
||||
#include <string.h>
|
||||
@@ -50,8 +50,9 @@ void adm_program_2();
|
||||
int nfs_program_2();
|
||||
int adm_program_2();
|
||||
#endif
|
||||
-#ifdef __NetBSD__
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
int _rpcsvcdirty;
|
||||
+int _rpcpmstart;
|
||||
#endif
|
||||
|
||||
void grimreap();
|
||||
@@ -233,12 +234,12 @@ initstuff()
|
||||
setuid(0);
|
||||
umask(0);
|
||||
|
||||
-#if defined(__NetBSD__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#ifndef DEBUG
|
||||
/* detach from terminal */
|
||||
daemon(0,0);
|
||||
#endif /* DEBUG */
|
||||
-#endif /* __NetBSD__ */
|
||||
+#endif /* __*BSD__ */
|
||||
|
||||
#ifndef NORLIMITS
|
||||
/* make sure we don't spill a corefile */
|
@ -1,6 +1,7 @@
|
||||
--- cfs_des.c.orig Wed Mar 20 14:57:56 1996
|
||||
+++ cfs_des.c Sun Oct 31 16:15:22 1999
|
||||
@@ -140,7 +140,10 @@
|
||||
$OpenBSD: patch-cfs_des_c,v 1.1 2001/03/17 15:46:39 wilfried Exp $
|
||||
--- cfs_des.c.orig Wed Mar 20 18:57:56 1996
|
||||
+++ cfs_des.c Fri Mar 16 20:23:02 2001
|
||||
@@ -140,7 +140,10 @@ int decrypting;
|
||||
register key_offset;
|
||||
int j,k;
|
||||
static int lk= -1;
|
@ -1,6 +1,7 @@
|
||||
--- cfs_fh.c.orig Sun Oct 31 16:07:18 1999
|
||||
+++ cfs_fh.c Sun Oct 31 16:06:29 1999
|
||||
@@ -363,7 +363,7 @@
|
||||
$OpenBSD: patch-cfs_fh_c,v 1.1 2001/03/17 15:46:39 wilfried Exp $
|
||||
--- cfs_fh.c.orig Fri Mar 16 20:23:02 2001
|
||||
+++ cfs_fh.c Fri Mar 16 20:23:02 2001
|
||||
@@ -363,7 +363,7 @@ isbndry(d)
|
||||
|
||||
|
||||
static fh_u roothandle;
|
@ -1,6 +1,7 @@
|
||||
--- cfsd.8- Sat Jan 1 04:35:00 1994
|
||||
+++ cfsd.8 Thu Apr 27 19:02:40 2000
|
||||
@@ -25,7 +25,7 @@
|
||||
$OpenBSD: patch-cfsd_8,v 1.1 2001/03/17 15:46:39 wilfried Exp $
|
||||
--- cfsd.8.orig Sat Jan 1 13:35:00 1994
|
||||
+++ cfsd.8 Fri Mar 16 20:23:02 2001
|
||||
@@ -25,7 +25,7 @@ port=3049.
|
||||
/usr/local/etc/cfsd
|
||||
invokes cfs (in /etc/rc)
|
||||
.TP
|
22
security/cfs/patches/patch-make_with_bad_rpcgen
Normal file
22
security/cfs/patches/patch-make_with_bad_rpcgen
Normal file
@ -0,0 +1,22 @@
|
||||
$OpenBSD: patch-make_with_bad_rpcgen,v 1.1 2001/03/17 15:46:40 wilfried Exp $
|
||||
--- make_with_bad_rpcgen.orig Wed Mar 20 18:57:56 1996
|
||||
+++ make_with_bad_rpcgen Fri Mar 16 20:15:08 2001
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# this will make CFS for linux (and other) systems with the
|
||||
# wrong version of rpcgen
|
||||
-make CC="cc -traditional -Dd_fileno=d_ino \
|
||||
+make CC="${CCTMP} ${CFLAGS} -traditional -DDd_fileno=d_ino \
|
||||
-Dnfsproc_null_2_svc=nfsproc_null_2 \
|
||||
-Dnfsproc_getattr_2_svc=nfsproc_getattr_2 \
|
||||
-Dnfsproc_setattr_2_svc=nfsproc_setattr_2 \
|
||||
@@ -23,6 +23,9 @@ make CC="cc -traditional -Dd_fileno=d_in
|
||||
-Dadmproc_null_1_svc=admproc_null_1 \
|
||||
-Dadmproc_attach_1_svc=admproc_attach_1 \
|
||||
-Dadmproc_detach_1_svc=admproc_detach_1 \
|
||||
+ -Dadmproc_null_2_svc=admproc_null_2 \
|
||||
+ -Dadmproc_attach_2_svc=admproc_attach_2 \
|
||||
+ -Dadmproc_detach_2_svc=admproc_detach_2 \
|
||||
-Dadmproc_ls_1_svc=admproc_ls_1 \
|
||||
" $*
|
||||
|
12
security/cfs/patches/patch-truerand_c
Normal file
12
security/cfs/patches/patch-truerand_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-truerand_c,v 1.1 2001/03/17 15:46:40 wilfried Exp $
|
||||
--- truerand.c.orig Wed Mar 20 18:57:56 1996
|
||||
+++ truerand.c Fri Mar 16 20:23:02 2001
|
||||
@@ -55,7 +55,7 @@
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <sys/time.h>
|
||||
-#include <math.h>
|
||||
+/*#include <math.h>*/
|
||||
#include <stdio.h>
|
||||
|
||||
static jmp_buf env;
|
Loading…
x
Reference in New Issue
Block a user