gnupg: readded --enable-m-guard; danm has created a nice well-working

patch
This commit is contained in:
Simon Gloner 2006-04-07 16:16:36 +00:00
parent 157d69ebe7
commit ae73185432
3 changed files with 31 additions and 5 deletions

View File

@ -1,2 +1,3 @@
9c27490749384afffca5d7d18aaaf276 gnupg-1.4.3-mguard.patch
d237d8fe1c4afa379f56dbda0e0b40e4 gnupg-1.4.3.tar.bz2
9dc3bc086824a8c7a331f35e09a3e57f idea.c.gz

View File

@ -5,13 +5,17 @@
name=gnupg
version=1.4.3
release=1
release=2
source=(ftp://ftp.gnupg.org/gcrypt/gnupg/$name-$version.tar.bz2 \
ftp://ftp.gnupg.dk/pub/contrib-dk/idea.c.gz)
ftp://ftp.gnupg.dk/pub/contrib-dk/idea.c.gz \
$name-$version-mguard.patch)
build () {
cd $name-$version
# necessary because of --enable-m-guard
patch -p1 < $SRC/$name-$version-mguard.patch
zcat ../idea.c.gz > cipher/idea.c
./configure \
@ -19,13 +23,11 @@ build () {
--libexecdir=/usr/lib \
--enable-static-rnd=linux \
--enable-dev-random \
--enable-m-guard \
--disable-nls \
--disable-ldap \
--enable-mailto
# doesn't work in 1.4.3
# --enable-m-guard \
make
make DESTDIR=$PKG install

View File

@ -0,0 +1,23 @@
diff -Nru gnupg-1.4.3-old/util/memory.c gnupg-1.4.3/util/memory.c
--- gnupg-1.4.3-old/util/memory.c 2006-04-06 23:28:07.875803000 +0000
+++ gnupg-1.4.3/util/memory.c 2006-04-06 23:29:02.695229000 +0000
@@ -509,15 +509,15 @@
if( len >= n ) /* we don't shrink for now */
return a;
if( p[-1] == MAGIC_SEC_BYTE )
- b = FNAME(alloc_secure_clear)(n FNAMEARG);
+ b = FNAMEXM(alloc_secure_clear)(n FNAMEARG);
else
- b = FNAME(alloc_clear)(n FNAMEARG);
+ b = FNAMEXM(alloc_clear)(n FNAMEARG);
FNAME(check)(NULL FNAMEARG);
memcpy(b, a, len );
- FNAME(free)(p FNAMEARG);
+ FNAMEX(free)(p FNAMEARG);
}
else
- b = FNAME(alloc)(n FNAMEARG);
+ b = FNAMEXM(alloc)(n FNAMEARG);
#else
if( m_is_secure(a) ) {
if( !(b = secmexrealloc( a, n )) )