Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2008 08:22:27 +1000
From:      Edwin Groothuis <edwin@mavetju.org>
To:        freebsd-fs@FreeBSD.org
Cc:        Julian Stacey <jhs@berklix.org>
Subject:   Re: CFS Cryptographic file system.
Message-ID:  <20080617222227.GA87804@k7.mavetju>
In-Reply-To: <200806100753.m5A7rFIY079040@fire.js.berklix.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

> Is there some replacement of /usr/ports/security/cfs
> (encryped file system) for 7.0 ?

Call me a slacker, but I got them from somebody else but never
commited them. I never tested them, because I got it working with
my own patches.

Give it a try, if it works then I'll commit it.

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=cfs

cvs diff: Diffing .
Index: patch-cfs__fh.c
===================================================================
RCS file: /home/pcvs/ports/security/cfs/files/patch-cfs__fh.c,v
retrieving revision 1.1
diff -u -r1.1 patch-cfs__fh.c
--- patch-cfs__fh.c	12 Apr 2005 09:06:25 -0000	1.1
+++ patch-cfs__fh.c	18 Nov 2007 03:56:08 -0000
@@ -1,9 +1,16 @@
+$FreeBSD$
 
-$FreeBSD: ports/security/cfs/files/patch-cfs__fh.c,v 1.1 2005/04/12 09:06:25 flz Exp $
-
---- 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
  
@@ -12,7 +19,7 @@
  int inst = 0;/* starting point */
  instance *instances[NINSTANCES];
  
-@@ -135,7 +135,6 @@
+@@ -135,7 +136,6 @@
  	int headlen;
  	int writemore=0;
  	struct stat sb;
@@ -20,7 +27,7 @@
  	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];
@@ -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);
  		*/
@@ -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 {
@@ -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)
@@ -58,7 +65,7 @@
  {
  	static struct dirent d;
  
-@@ -1198,7 +1197,7 @@
+@@ -1198,7 +1198,7 @@
  #endif /* SHORTLINKS */
  					)) == NULL) {
  				if ((f=(cfs_fileid *)
Index: patch-cfs__nfs.c
===================================================================
RCS file: /home/pcvs/ports/security/cfs/files/patch-cfs__nfs.c,v
retrieving revision 1.1
diff -u -r1.1 patch-cfs__nfs.c
--- patch-cfs__nfs.c	12 Apr 2005 09:06:25 -0000	1.1
+++ patch-cfs__nfs.c	18 Nov 2007 03:56:08 -0000
@@ -1,9 +1,170 @@
 
-$FreeBSD: ports/security/cfs/files/patch-cfs__nfs.c,v 1.1 2005/04/12 09:06:25 flz Exp $
+$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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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];
Index: patch-cfs_adm.c
===================================================================
RCS file: patch-cfs_adm.c
diff -N patch-cfs_adm.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patch-cfs_adm.c	18 Nov 2007 03:56:08 -0000
@@ -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;


--PEIAKu/WMn1b1Hv9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080617222227.GA87804>