diff options
author | gulams <64251312+gulams@users.noreply.github.com> | 2021-04-16 22:44:43 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-16 22:44:43 +0530 |
commit | 70f3d83dfc7018a4a4e8d06a19fe562ba6d1a0d9 (patch) | |
tree | c169762f12b9e32d2921e9c1517510bee1fd5fcd | |
parent | 095f59ca464220eae285de6b5f2ee31185a6a84c (diff) | |
download | open-iscsi-70f3d83dfc7018a4a4e8d06a19fe562ba6d1a0d9.tar.gz |
Log error message when auth debug status is set
Log the correct error message in /var/log/messages when the debug status is set when there is an authentication error. The change is made in check_security_stage_status() function. This issue was identified when one of the customer was trying to login to the iscsi target after configuring the mutual CHAP authentication. They set the same password for both side authentication. This is not allowed as per the code as it was returning AUTH_DBG_STATUS_PASSWD_IDENTICAL. The error logged in /var/log/messages was not obvious. This change will help to understand the correct error message so that required action can be taken.
-rw-r--r-- | usr/login.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/login.c b/usr/login.c index 2508c48..8af8756 100644 --- a/usr/login.c +++ b/usr/login.c @@ -624,7 +624,7 @@ check_security_stage_status(iscsi_session_t *session, case AUTH_STATUS_ERROR: case AUTH_STATUS_FAIL: default: - if (acl_get_dbg_status(auth_client, &debug_status) != + if (acl_get_dbg_status(auth_client, &debug_status) == AUTH_STATUS_NO_ERROR) log_error("Login authentication failed " "with target %s, %s", |