summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/bcwipe/Makefile9
-rw-r--r--security/bcwipe/distinfo4
-rw-r--r--security/bcwipe/files/patch-wipe.c69
3 files changed, 22 insertions, 60 deletions
diff --git a/security/bcwipe/Makefile b/security/bcwipe/Makefile
index b80578130cba..70766a1d3de2 100644
--- a/security/bcwipe/Makefile
+++ b/security/bcwipe/Makefile
@@ -6,20 +6,19 @@
#
PORTNAME= bcwipe
-PORTVERSION= 1.6.5
-PORTREVISION= 1
+PORTVERSION= 1.9.8
CATEGORIES= security
MASTER_SITES= http://www.jetico.com/linux/ \
http://bsd.desa-hosting.de/distfiles/security/
DISTNAME= BCWipe-${PORTVERSION:S/./-/g:S/-/./}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= cy@FreeBSD.org
COMMENT= BCWipe securely erases data from magnetic and solid-state memory
NO_CDROM= yes
-WRKSRC= ${WRKDIR}/${PORTNAME}
-CFLAGS+= -DOS_FreeBSD
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/./-/g:S/-/./}
+GNU_CONFIGURE= yes
MAKE_ARGS+= CFLAGS="${CFLAGS}"
MAN1= bcwipe.1
diff --git a/security/bcwipe/distinfo b/security/bcwipe/distinfo
index 5cfa94ca688a..5527e38e82f6 100644
--- a/security/bcwipe/distinfo
+++ b/security/bcwipe/distinfo
@@ -1,2 +1,2 @@
-SHA256 (BCWipe-1.6-5.tar.gz) = 5387b51f621d69a28be91d560fa324c5b11ffad3652a1bc49e2c319650081960
-SIZE (BCWipe-1.6-5.tar.gz) = 22478
+SHA256 (BCWipe-1.9-8.tar.gz) = 6f5261716da15e3df07569ca2516334f7d132f0069420082fc71faf2aaf04fc0
+SIZE (BCWipe-1.9-8.tar.gz) = 131414
diff --git a/security/bcwipe/files/patch-wipe.c b/security/bcwipe/files/patch-wipe.c
index 079ca0fce034..fee492a49a87 100644
--- a/security/bcwipe/files/patch-wipe.c
+++ b/security/bcwipe/files/patch-wipe.c
@@ -1,25 +1,15 @@
---- wipe.c.orig Tue Mar 6 10:24:24 2007
-+++ wipe.c Fri Mar 9 09:43:00 2007
-@@ -17,6 +17,9 @@
-
- char wipe_c[]="$Id: wipe.c,v 1.96 2006/10/31 11:03:31 pav Rev 1.6-5 $";
-
-+#ifndef SOLARIS
-+#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
-+#endif
-
- #include <stdio.h>
- #include <limits.h>
-@@ -909,9 +912,17 @@
+--- wipe.c.orig 2011-01-27 07:30:06.000000000 -0800
++++ wipe.c 2011-09-09 12:13:50.626914657 -0700
+@@ -1521,9 +1521,17 @@
/*size on success */
long long int find_size_by_reading(int fd)
{
+ struct stat st;
- off_t limit,pos,prev,b_pos=0;
+ off_t limit, pos, lPos, prev, b_pos = 0;
- char buf[64];
- int i;
+ char buf[512];
-+ int i, j;
++ int i,j;
+
+ if ( OK != fstat(fd,&st) )
+ {
@@ -28,41 +18,14 @@
+ }
+ j = !(S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)) ? 1 : sizeof(buf);
- for ( limit=0x7f,i=sizeof(limit);--i; )
- limit = (limit <<8)|0xff;
-@@ -925,7 +936,7 @@
- fprintf(stderr,"lseek error: %s\n",strerror(errno));
- return 0;
- }
-- if ( 1 != read(fd,buf,1) )
-+ if ( j != read(fd,buf,j) )
- {
- prev=pos;
- pos=(pos+b_pos)>>1;
-@@ -1172,6 +1183,9 @@
-
- if ( S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode) )
- {
-+#if defined(__FreeBSD__) || defined(SOLARIS)
-+ size = ~((long long int)1 << (sizeof(size)*8-1));
-+#else
- size = 0;
-
- #ifdef BLKGETSIZE
-@@ -1191,6 +1205,7 @@
- if ( 0 == size || ERROR == size )
- for ( size=0x7f,i=sizeof(size);--i; )
- size = (size <<8)|0xff;
-+#endif
- }
-
- for ( i=0, op=0 ; i < o_pas_num; i++ )
-@@ -1202,7 +1217,7 @@
- lseek64(fd,0,SEEK_SET);
- while ( s < size )
- {
-- j = size - s < BUFFSIZE ? size - s : BUFFSIZE;
-+ j = size - s < BUFFSIZE && !(S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)) ? size - s : BUFFSIZE;
- fill_buff(buff, j, i,s);
-
- if ( ERROR == (j=write(fd,(const void *)buff,j)) )
+ for ( limit=0x7f, i=sizeof(limit); --i; )
+ limit = (limit << 8) | 0xff;
+@@ -1547,7 +1555,7 @@
+
+ lPos = lseek_f( fd, pos, SEEK_SET );
+
+- if ( ( lPos != pos ) || ( 1 != read(fd, buf, 1) ) ) {
++ if ( ( lPos != pos ) || ( 1 != read(fd, buf, j) ) ) {
+ prev = pos;
+ pos = (pos+b_pos) >> 1;
+ } else {