Skip to content

Commit

Permalink
Fix build for 7.0
Browse files Browse the repository at this point in the history
Thanks to alfred@ for his help.
  • Loading branch information
edwin authored and edwin committed Sep 23, 2008
1 parent 958470e commit c005240
Show file tree
Hide file tree
Showing 4 changed files with 232 additions and 26 deletions.
10 changes: 2 additions & 8 deletions security/cfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

PORTNAME= cfs
PORTVERSION= 1.4.1
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= security
MASTER_SITES= http://www.crypto.com/software/

Expand All @@ -24,12 +24,6 @@ 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 >= 7.0"
.endif

post-patch:
${REINPLACE_CMD} 's/^\.TH SSH/.TH CFSSH/' ${WRKSRC}/cfssh.1

Expand All @@ -45,4 +39,4 @@ do-install:
${INSTALL} -d ${_BINOWNGRP} -m 0 ${CFSD_BOOTSTRAP}
@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>
.include <bsd.port.mk>
27 changes: 17 additions & 10 deletions security/cfs/files/patch-cfs__fh.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@

$FreeBSD$

--- cfs_fh.c.orig
+++ cfs_fh.c
@@ -61,7 +61,7 @@
--- 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

Expand All @@ -12,15 +19,15 @@
int inst = 0;/* starting point */
instance *instances[NINSTANCES];

@@ -135,7 +135,6 @@
@@ -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 +762,7 @@
@@ -763,7 +763,7 @@
char vect[9];
union{
u_char ch[9];
Expand All @@ -29,7 +36,7 @@
} buf;
char linkname[NFS_MAXPATHLEN+1];

@@ -792,8 +791,8 @@
@@ -792,8 +792,8 @@
/*
sprintf((char *)buf,"%08x",(u_long)sb.st_ino+(u_long)sb.st_ctime);
*/
Expand All @@ -40,7 +47,7 @@
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 +907,7 @@
@@ -908,7 +908,7 @@
f->name=NULL;
}
} else {
Expand All @@ -49,7 +56,7 @@
fprintf(stderr,"cfsd: out of memory\n");
cfserrno=NFSERR_STALE; /* bad news */
return -2;
@@ -1146,7 +1145,7 @@
@@ -1146,7 +1146,7 @@
break anything */
struct dirent *
rootrd(cookie)
Expand All @@ -58,7 +65,7 @@
{
static struct dirent d;

@@ -1198,7 +1197,7 @@
@@ -1198,7 +1198,7 @@
#endif /* SHORTLINKS */
)) == NULL) {
if ((f=(cfs_fileid *)
Expand Down
186 changes: 178 additions & 8 deletions security/cfs/files/patch-cfs__nfs.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,170 @@

$FreeBSD$

--- cfs_nfs.c.orig
+++ cfs_nfs.c
@@ -877,12 +877,11 @@
--- 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;
Expand All @@ -18,7 +179,7 @@
int eof;
int ne;
int bytes;
@@ -944,7 +943,7 @@
@@ -944,7 +944,7 @@
else if (strcmp(s,"..")==0) /* parent */
entrytab[ne].fileid=fhpid(h);
else entrytab[ne].fileid=dent->d_fileno;
Expand All @@ -27,7 +188,7 @@
*prev = &entrytab[ne];
prev = &entrytab[ne].nextentry;
entrytab[ne].nextentry=NULL;
@@ -964,12 +963,12 @@
@@ -964,12 +964,12 @@

DIR *curdir;
int curdirid=0;
Expand All @@ -42,7 +203,16 @@
{
DIR *ret;
DIR *fhopendir();
@@ -1151,7 +1150,7 @@
@@ -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;
Expand All @@ -51,7 +221,7 @@
int eof;
int ne;
int bytes;
@@ -1163,7 +1162,7 @@
@@ -1163,7 +1163,7 @@
ne=0;
prev= &ret.readdirres_u.reply.entries;
*prev=NULL;
Expand All @@ -60,7 +230,7 @@
eof=1;

ret.status=NFS_OK;
@@ -1182,7 +1181,7 @@
@@ -1182,7 +1182,7 @@
else entrytab[ne].fileid=dent->d_fileno;
cookie=dent->d_reclen; /* may not work everywhere */
*prev = &entrytab[ne];
Expand Down
35 changes: 35 additions & 0 deletions security/cfs/files/patch-cfs_adm.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

$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;

0 comments on commit c005240

Please sign in to comment.