Skip to content

Commit

Permalink
xtest: pkcs11: fix the ACL authentication fail
Browse files Browse the repository at this point in the history
When ACL test is running with login type is group, it fails to run
C_Initialize. Fix this by sending the correct group id.

Signed-off-by: Matthew(Sukyoung) Chae <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
  • Loading branch information
MatthewSukyoung authored and jforissier committed Apr 13, 2023
1 parent 178f3b1 commit 9c87263
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion host/xtest/pkcs11_1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -8720,7 +8720,7 @@ static void xtest_pkcs11_test_1027(ADBG_Case_t *c)
if (!ADBG_EXPECT_TRUE(c, !setenv("CKTEEC_LOGIN_TYPE", "group", 1)))
goto out_unsetenv;

str_len = snprintf(gid_str, sizeof(gid_str), "%x", getegid());
str_len = snprintf(gid_str, sizeof(gid_str), "%d", getegid());
if (!ADBG_EXPECT_COMPARE_SIGNED(c, str_len, >=, 0))
goto out_unsetenv;
if (!ADBG_EXPECT_COMPARE_SIGNED(c, str_len, <, (int)sizeof(gid_str)))
Expand Down

0 comments on commit 9c87263

Please sign in to comment.