]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: fix uuid_from_super given 'signature' is not constant
authorDan Williams <dan.j.williams@intel.com>
Sat, 8 Nov 2008 23:03:07 +0000 (16:03 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sat, 8 Nov 2008 23:03:07 +0000 (16:03 -0700)
The version portion of the signature changes depending on the contents
of the container.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
super-intel.c

index 6ef2e5198ac1b8b157dfa88c95a8eaeed334d739..433fa464ce9e1fbf1fb99f23a6e12f57ae52b7fb 100644 (file)
@@ -751,7 +751,7 @@ static void uuid_from_super_imsm(struct supertype *st, int uuid[4])
        struct imsm_dev *dev = NULL;
 
        sha1_init_ctx(&ctx);
-       sha1_process_bytes(super->anchor->sig, MAX_SIGNATURE_LENGTH, &ctx);
+       sha1_process_bytes(super->anchor->sig, MPB_SIG_LEN, &ctx);
        sha1_process_bytes(&super->anchor->family_num, sizeof(__u32), &ctx);
        if (super->current_vol >= 0)
                dev = get_imsm_dev(super, super->current_vol);