]> git.pld-linux.org Git - packages/cryptsetup-luks.git/blame - cryptsetup-luks-diet.patch
- package python binding (as python-pycryptsetup)
[packages/cryptsetup-luks.git] / cryptsetup-luks-diet.patch
CommitLineData
04a59276
JB
1--- cryptsetup-1.2.0/lib/luks1/pbkdf.c~ 2009-09-11 16:11:50.000000000 +0200
2+++ cryptsetup-1.2.0/lib/luks1/pbkdf.c 2010-06-21 11:16:57.353421474 +0200
90f41aef
AM
3@@ -174,7 +174,7 @@
4 if (gcry_md_setkey(prf, P, Plen))
5 goto out;
6
7- for (i = 1; (uint) i <= l; i++) {
8+ for (i = 1; (unsigned int) i <= l; i++) {
9 memset(T, 0, hLen);
10
11 for (u = 1; u <= c ; u++) {
12@@ -198,7 +198,7 @@
13
14 memcpy(U, p, hLen);
15
16- for (k = 0; (uint) k < hLen; k++)
17+ for (k = 0; (unsigned int) k < hLen; k++)
18 T[k] ^= U[k];
19
20 if (perfcheck && __PBKDF2_performance) {
21@@ -210,7 +210,7 @@
22 __PBKDF2_global_j++;
23 }
24
25- memcpy(DK + (i - 1) * hLen, T, (uint) i == l ? r : hLen);
26+ memcpy(DK + (i - 1) * hLen, T, (unsigned int) i == l ? r : hLen);
27 }
28 rc = 0;
29 out:
d9cb94a9
JB
30--- cryptsetup-1.4.0/lib/luks1/keymanage.c.orig 2011-10-08 23:57:01.000000000 +0200
31+++ cryptsetup-1.4.0/lib/luks1/keymanage.c 2011-10-30 07:53:26.817195403 +0100
32@@ -19,6 +19,7 @@
33
90f41aef
AM
34 #include <sys/types.h>
35 #include <sys/stat.h>
90f41aef 36+#include <limits.h>
90f41aef
AM
37 #include <netinet/in.h>
38 #include <fcntl.h>
d9cb94a9
JB
39 #include <errno.h>
40@@ -35,6 +36,10 @@
41 #include "pbkdf.h"
42 #include "internal.h"
90f41aef
AM
43
44+#ifndef UINT32_MAX
45+#define UINT32_MAX UINT_MAX
46+#endif
47+
48 #define div_round_up(a,b) ({ \
49 typeof(a) __a = (a); \
50 typeof(b) __b = (b); \
This page took 0.031872 seconds and 4 git commands to generate.