Displaying 6 results from an estimated 6 matches for "lo_crypt_name".
2019 Nov 05
0
[klibc:master] losetup: Fix char signedness mismatches with <linux/loop.h>
...1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/usr/utils/losetup.c b/usr/utils/losetup.c
index ebc6f360..1f50a001 100644
--- a/usr/utils/losetup.c
+++ b/usr/utils/losetup.c
@@ -94,7 +94,7 @@ static int show_loop(char *device)
if (loopinfo64.lo_encrypt_type ||
loopinfo64.lo_crypt_name[0]) {
- char *e = loopinfo64.lo_crypt_name;
+ const char *e = (const char *)loopinfo64.lo_crypt_name;
if (*e == 0 && loopinfo64.lo_encrypt_type == 1)
e = "XOR";
@@ -258,14 +258,14 @@ int set_loop(const char *device, const char *file, unsigned long long offset,
m...
2010 Mar 14
0
[patches] klibc review unsorted patch queue
...ong lo_rdevice;
+ unsigned long long lo_offset;
+ unsigned long long lo_sizelimit; /* bytes, 0 == max available */
+ unsigned int lo_number;
+ unsigned int lo_encrypt_type;
+ unsigned int lo_encrypt_key_size;
+ unsigned int lo_flags;
+ unsigned char lo_file_name[LO_NAME_SIZE];
+ unsigned char lo_crypt_name[LO_NAME_SIZE];
+ unsigned char lo_encrypt_key[LO_KEY_SIZE];
+ unsigned long long lo_init[2];
+};
diff --git a/usr/utils/losetup.c b/usr/utils/losetup.c
new file mode 100644
index 0000000..e494183
--- /dev/null
+++ b/usr/utils/losetup.c
@@ -0,0 +1,481 @@
+/* Originally from Ted's losetup.c */
+...
2019 Oct 31
0
[PATCH 2/2] loop: switch to linux/loop.h
...unsigned long long lo_rdevice;
- unsigned long long lo_offset;
- unsigned long long lo_sizelimit; /* bytes, 0 == max available */
- unsigned int lo_number;
- unsigned int lo_encrypt_type;
- unsigned int lo_encrypt_key_size;
- unsigned int lo_flags;
- char lo_file_name[LO_NAME_SIZE];
- char lo_crypt_name[LO_NAME_SIZE];
- char lo_encrypt_key[LO_KEY_SIZE];
- unsigned long long lo_init[2];
-};
diff --git a/usr/utils/losetup.c b/usr/utils/losetup.c
index 17887412..ebc6f360 100644
--- a/usr/utils/losetup.c
+++ b/usr/utils/losetup.c
@@ -18,8 +18,7 @@
#include <sys/mman.h>
#include <sys/sysma...
2019 Nov 05
0
[klibc:master] loop: switch to linux/loop.h
...unsigned long long lo_rdevice;
- unsigned long long lo_offset;
- unsigned long long lo_sizelimit; /* bytes, 0 == max available */
- unsigned int lo_number;
- unsigned int lo_encrypt_type;
- unsigned int lo_encrypt_key_size;
- unsigned int lo_flags;
- char lo_file_name[LO_NAME_SIZE];
- char lo_crypt_name[LO_NAME_SIZE];
- char lo_encrypt_key[LO_KEY_SIZE];
- unsigned long long lo_init[2];
-};
diff --git a/usr/utils/losetup.c b/usr/utils/losetup.c
index 17887412..ebc6f360 100644
--- a/usr/utils/losetup.c
+++ b/usr/utils/losetup.c
@@ -18,8 +18,7 @@
#include <sys/mman.h>
#include <sys/sysma...
2019 Nov 05
0
[klibc:master] losetup: Delete fallbacks to LOOP_{GET, SET}_STATUS
...ype;
- info->lo_encrypt_key_size = info64->lo_encrypt_key_size;
- info->lo_flags = info64->lo_flags;
- info->lo_init[0] = info64->lo_init[0];
- info->lo_init[1] = info64->lo_init[1];
- if (info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI)
- memcpy(info->lo_name, info64->lo_crypt_name, LO_NAME_SIZE);
- else
- memcpy(info->lo_name, info64->lo_file_name, LO_NAME_SIZE);
- memcpy(info->lo_encrypt_key, info64->lo_encrypt_key, LO_KEY_SIZE);
-
- /* error in case values were truncated */
- if (info->lo_device != info64->lo_device ||
- info->lo_rdevice != info64-&...
2019 Oct 31
3
[PATCH 1/2] loop: fix loop_info struct
Otherwise, stack can be corrupted resulting in incorrect runtime
behaviour. For example, overriding argc from main().
References: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/1850184
Signed-off-by: Michael Hudson-Doyle <michael.hudson at ubuntu.com>
Signed-off-by: Adam Conrad <adconrad at ubuntu.com>
Signed-off-by: Dimitri John Ledkov <xnox at ubuntu.com>
---