Revert "Align MetaPassStruct for cross-arch consistency"
This patch broke the upgrade for 32-bit systems. Any system with an
existing password file won't be able to use the same password file
after this upgrade. We need to implement a backward-compatible fix in
the phosphor-host-ipmid repository.
This reverts commit 1241052b53be928fed70c33a03ad5a99d51e8ffa.
Change-Id: I1124f291265858d7a8015f25c79401483dbb45d6
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/user_channel/passwd_mgr.cpp b/user_channel/passwd_mgr.cpp
index 6e515da..929a83c 100644
--- a/user_channel/passwd_mgr.cpp
+++ b/user_channel/passwd_mgr.cpp
@@ -51,7 +51,7 @@
struct MetaPassStruct
{
char signature[10];
- unsigned char reseved[6];
+ unsigned char reseved[2];
size_t hashSize;
size_t ivSize;
size_t dataSize;
@@ -534,8 +534,7 @@
OPENSSL_cleanse(key.data(), keyLen);
// Update the meta password structure.
- MetaPassStruct metaData = {
- META_PASSWD_SIG, {0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0};
+ MetaPassStruct metaData = {META_PASSWD_SIG, {0, 0}, 0, 0, 0, 0, 0};
metaData.hashSize = hashLen;
metaData.ivSize = ivLen;
metaData.dataSize = bytesWritten;