FreeBSD Bugzilla – Attachment 168648 Details for
Bug 208305
[patch] geli(8): Negative iterations values dumped incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
geli(8): Dump negative iterations values properly
geli-8-Dump-negative-iterations-values-properly.diff (text/plain), 1.36 KB, created by
Fabian Keil
on 2016-03-26 11:03:33 UTC
(
hide
)
Description:
geli(8): Dump negative iterations values properly
Filename:
MIME Type:
Creator:
Fabian Keil
Created:
2016-03-26 11:03:33 UTC
Size:
1.36 KB
patch
obsolete
>From 74b7c5c021deeff48a5db54e2cf95461f1ff0d27 Mon Sep 17 00:00:00 2001 >From: Fabian Keil <fk@fabiankeil.de> >Date: Fri, 25 Mar 2016 18:03:20 +0100 >Subject: [PATCH] geli(8): Dump negative iterations values properly > >An iterations value of -1 signals that no passphrase is being used. >Previously it was dumped incorrectly due to being cast to unsigned >first: > >[fk@elektrobier ~]$ geli dump /dev/ada3p3 >Metadata on /dev/ada3p3: > magic: GEOM::ELI > version: 7 > flags: 0x2 > ealgo: AES-XTS > keylen: 256 > provsize: 8589934592 >sectorsize: 4096 > keys: 0x01 >iterations: 4294967295 > Salt: [...] >Master Key: [...] > MD5 hash: 44e17ea9c25f27dff32179bc4f82f659 > >Obtained from: ElectroBSD >--- > sys/geom/eli/g_eli.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/sys/geom/eli/g_eli.h b/sys/geom/eli/g_eli.h >index 3deb865..2ed2821 100644 >--- a/sys/geom/eli/g_eli.h >+++ b/sys/geom/eli/g_eli.h >@@ -497,7 +497,7 @@ eli_metadata_dump(const struct g_eli_metadata *md) > printf(" provsize: %ju\n", (uintmax_t)md->md_provsize); > printf("sectorsize: %u\n", (u_int)md->md_sectorsize); > printf(" keys: 0x%02x\n", (u_int)md->md_keys); >- printf("iterations: %u\n", (u_int)md->md_iterations); >+ printf("iterations: %i\n", md->md_iterations); > bzero(str, sizeof(str)); > for (i = 0; i < sizeof(md->md_salt); i++) { > str[i * 2] = hex[md->md_salt[i] >> 4]; >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208305
: 168648