Message ID | 1414563339-29826-1-git-send-email-ivan.hu@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 29/10/14 06:15, Ivan Hu wrote: > Delete the test authenticated variable created by another key before starting > the tests. > > Signed-off-by: Ivan Hu <ivan.hu@canonical.com> > Acked-by: Colin Ian King <colin.king@canonical.com> > Acked-by: Alex Hung <alex.hung@canonical.com> > --- > src/uefi/uefirtauthvar/uefirtauthvar.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/uefi/uefirtauthvar/uefirtauthvar.c b/src/uefi/uefirtauthvar/uefirtauthvar.c > index 240661e..957bb76 100644 > --- a/src/uefi/uefirtauthvar/uefirtauthvar.c > +++ b/src/uefi/uefirtauthvar/uefirtauthvar.c > @@ -96,8 +96,10 @@ static void uefirtvariable_env_cleanup(void) > uint32_t attributestest; > > long ioret = getvar(>estguid, &attributestest, &getdatasize, data, &status); > - if (ioret != -1 && status == EFI_SUCCESS) > + if (ioret != -1 && status == EFI_SUCCESS) { > setvar(>estguid, attributes, sizeof(AuthVarDel), AuthVarDel, &status); > + setvar(>estguid, attributes, sizeof(AuthVarDelDiff), AuthVarDelDiff, &status); > + } > return; > } > > (Re-) Acked-by: Colin Ian King <colin.king@canonical.com>
diff --git a/src/uefi/uefirtauthvar/uefirtauthvar.c b/src/uefi/uefirtauthvar/uefirtauthvar.c index 240661e..957bb76 100644 --- a/src/uefi/uefirtauthvar/uefirtauthvar.c +++ b/src/uefi/uefirtauthvar/uefirtauthvar.c @@ -96,8 +96,10 @@ static void uefirtvariable_env_cleanup(void) uint32_t attributestest; long ioret = getvar(>estguid, &attributestest, &getdatasize, data, &status); - if (ioret != -1 && status == EFI_SUCCESS) + if (ioret != -1 && status == EFI_SUCCESS) { setvar(>estguid, attributes, sizeof(AuthVarDel), AuthVarDel, &status); + setvar(>estguid, attributes, sizeof(AuthVarDelDiff), AuthVarDelDiff, &status); + } return; }