rpms/cryptsetup-luks/devel cryptsetup-fix-gcrypt-init.patch,1.1,1.2
Milan Broz
mbroz at fedoraproject.org
Fri Jan 15 11:19:36 UTC 2010
Author: mbroz
Update of /cvs/pkgs/rpms/cryptsetup-luks/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4657
Modified Files:
cryptsetup-fix-gcrypt-init.patch
Log Message:
Fix compile error (missing includes).
cryptsetup-fix-gcrypt-init.patch:
ChangeLog | 5 +++++
lib/gcrypt.c | 5 +++--
lib/libdevmapper.c | 3 +++
lib/setup.c | 6 ++++++
luks/keymanage.c | 31 ++++++++++++++++++++++++++-----
5 files changed, 43 insertions(+), 7 deletions(-)
Index: cryptsetup-fix-gcrypt-init.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cryptsetup-luks/devel/cryptsetup-fix-gcrypt-init.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- cryptsetup-fix-gcrypt-init.patch 15 Jan 2010 10:53:18 -0000 1.1
+++ cryptsetup-fix-gcrypt-init.patch 15 Jan 2010 11:19:36 -0000 1.2
@@ -1,5 +1,5 @@
---- cryptsetup-1.1.0-rc4.old/ChangeLog 2010-01-15 11:43:51.000000000 +0100
-+++ cryptsetup-1.1.0-rc4/ChangeLog 2010-01-15 11:44:14.000000000 +0100
+--- cryptsetup-1.1.0-rc4.old/ChangeLog 2010-01-15 12:13:24.000000000 +0100
++++ cryptsetup-1.1.0-rc4/ChangeLog 2010-01-15 12:13:46.000000000 +0100
@@ -1,3 +1,8 @@
+2010-01-10 Milan Broz <mbroz at redhat.com>
+ * Fix initialisation of gcrypt duting luksFormat.
@@ -10,7 +10,7 @@
* Fix key slot iteration count calculation (small -i value was the same as default).
* The slot and key digest iteration minimun is now 1000.
--- cryptsetup-1.1.0-rc4.old/lib/gcrypt.c 2009-11-14 21:59:47.000000000 +0100
-+++ cryptsetup-1.1.0-rc4/lib/gcrypt.c 2010-01-15 11:44:14.000000000 +0100
++++ cryptsetup-1.1.0-rc4/lib/gcrypt.c 2010-01-15 12:13:46.000000000 +0100
@@ -1,6 +1,7 @@
#include <stdlib.h>
#include <string.h>
@@ -30,8 +30,18 @@
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0);
gcry_control (GCRYCTL_RESUME_SECMEM_WARN);
+--- cryptsetup-1.1.0-rc4.old/lib/libdevmapper.c 2009-11-15 20:08:43.000000000 +0100
++++ cryptsetup-1.1.0-rc4/lib/libdevmapper.c 2010-01-15 12:13:59.000000000 +0100
+@@ -1,4 +1,7 @@
++#include <sys/types.h>
++#include <sys/stat.h>
+ #include <sys/ioctl.h>
++#include <unistd.h>
+ #include <dirent.h>
+ #include <errno.h>
+ #include <libdevmapper.h>
--- cryptsetup-1.1.0-rc4.old/lib/setup.c 2009-12-30 18:25:15.000000000 +0100
-+++ cryptsetup-1.1.0-rc4/lib/setup.c 2010-01-15 11:44:14.000000000 +0100
++++ cryptsetup-1.1.0-rc4/lib/setup.c 2010-01-15 12:13:46.000000000 +0100
@@ -1134,6 +1134,12 @@ int crypt_format(struct crypt_device *cd
if (!type)
return -EINVAL;
@@ -46,8 +56,17 @@
cd->volume_key = LUKS_alloc_masterkey(volume_key_size,
volume_key);
--- cryptsetup-1.1.0-rc4.old/luks/keymanage.c 2009-12-30 19:47:19.000000000 +0100
-+++ cryptsetup-1.1.0-rc4/luks/keymanage.c 2010-01-15 11:44:35.000000000 +0100
-@@ -26,6 +26,7 @@
++++ cryptsetup-1.1.0-rc4/luks/keymanage.c 2010-01-15 12:13:59.000000000 +0100
+@@ -17,6 +17,8 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include <sys/types.h>
++#include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <linux/fs.h>
+ #include <netinet/in.h>
+@@ -26,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -55,7 +74,7 @@
#include "luks.h"
#include "af.h"
-@@ -108,7 +109,7 @@ int LUKS_hdr_backup(
+@@ -108,7 +111,7 @@ int LUKS_hdr_backup(
devfd = open(device, O_RDONLY | O_DIRECT | O_SYNC);
if(devfd == -1) {
@@ -64,7 +83,7 @@
r = -EINVAL;
goto out;
}
-@@ -251,9 +252,9 @@ static int _check_and_convert_hdr(const
+@@ -251,9 +254,9 @@ static int _check_and_convert_hdr(const
if(memcmp(hdr->magic, luksMagic, LUKS_MAGIC_L)) { /* Check magic */
log_dbg("LUKS header not detected.");
if (require_luks_device)
@@ -76,7 +95,7 @@
r = -EINVAL;
} else if((hdr->version = ntohs(hdr->version)) != 1) { /* Convert every uint16/32_t item from network byte order */
log_err(ctx, _("Unsupported LUKS version %d.\n"), hdr->version);
-@@ -277,6 +278,20 @@ static int _check_and_convert_hdr(const
+@@ -277,6 +280,20 @@ static int _check_and_convert_hdr(const
return r;
}
@@ -97,7 +116,7 @@
int LUKS_read_phdr_backup(const char *backup_file,
const char *device,
struct luks_phdr *hdr,
-@@ -296,8 +311,10 @@ int LUKS_read_phdr_backup(const char *ba
+@@ -296,8 +313,10 @@ int LUKS_read_phdr_backup(const char *ba
if(read(devfd, hdr, sizeof(struct luks_phdr)) < sizeof(struct luks_phdr))
r = -EIO;
@@ -109,7 +128,7 @@
close(devfd);
return r;
-@@ -391,7 +408,7 @@ static int LUKS_PBKDF2_performance_check
+@@ -391,7 +410,7 @@ static int LUKS_PBKDF2_performance_check
{
if (!*PBKDF2_per_sec) {
if (PBKDF2_performance_check(hashSpec, PBKDF2_per_sec) < 0) {
@@ -118,7 +137,7 @@
return -EINVAL;
}
log_dbg("PBKDF2: %" PRIu64 " iterations per second using hash %s.", *PBKDF2_per_sec, hashSpec);
-@@ -430,6 +447,8 @@ int LUKS_generate_phdr(struct luks_phdr
+@@ -430,6 +449,8 @@ int LUKS_generate_phdr(struct luks_phdr
header->keyBytes=mk->keyLength;
More information about the scm-commits
mailing list