commit | 2aeb1c1ac24f1ada244954b852eed5effb450c05 | [log] [tgz] |
---|---|---|
author | P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> | Tue Jul 20 04:26:13 2021 +0530 |
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | Fri Jul 30 19:59:51 2021 +0000 |
tree | 7425dae5b0cfec8c22046f6fd260d67c7a14c818 | |
parent | 83c8d1a455ab1bd88bfb8fd7ab79d0b9b329bd18 [diff] |
Restructure pam conversation function(Klockwork fix) Altered return values form the function. With the earlier implementation, the function returned PAM_AUTH_ERR on failure scenarios which is incorrect. Replaced PAM_AUTH_ERR with PAM_CONV_ERR and PAM_BUF_ERR at respetive places. Added a check for number of messages received by the conversation function capped at PAM_MAX_NUM_MSG. Added a check for password size, which is capped at PAM_MAX_RESP_SIZE as the bytes in the password greater than this limit would be discarded by PAM. Though pam_response structure and response, which are dynamically allocated by the pam conversation function are the responsibility of the caller to free them, with the current implemention, there is a possibility of memory leak when numMsg would be zero or if PAM_PROMPT_ECHO_OFF message never arrived. This commit fixes the possible memory leak by allocating only on receiving PAM_PROMPT_ECHO_OFF message. Tested: - ipmitool tool command passed with correct credentials: - With Correct Creds: ipmitool -I lanplus -H x.x.x.x -C 17 -U root -P 0penBmc raw 0x00 0x01 Reply : 01 00 03 70 - With Incorrect Creds: ipmitool -I lanplus -H x.x.x.x -C 17 -U root -P 0pen raw 0x00 0x01 Reply : Error: Unable to establish IPMI session Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> Change-Id: I670c3316eec01993a5cd0d79d1d6be248cf64328
To build this package, do the following steps:
1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make
To clean the repository run ./bootstrap.sh clean
.