REAL_SCRIPT=$(realpath -e "${BASH_SOURCE[0]}")
SCRIPT_TOP="${SCRIPT_TOP:-$(dirname "${REAL_SCRIPT}")}"
+txtund=$(tput sgr 0 1) # Underline
+txtbld=$(tput bold) # Bold
+txtred=$(tput setaf 1) # Red
+txtgrn=$(tput setaf 2) # Green
+txtylw=$(tput setaf 3) # Yellow
+txtblu=$(tput setaf 4) # Blue
+txtpur=$(tput setaf 5) # Purple
+txtcyn=$(tput setaf 6) # Cyan
+txtwht=$(tput setaf 7) # White
+txtrst=$(tput sgr0) # Text reset
+
extract_addr()
{
read l
exit;
fi
-echo "git_id = ${git_id}"
+full_git_id=$(git log -1 --format="%H" "${git_id}")
+if [[ "${full_git_id}" == "" ]]; then
+ echo "git id ${git_id} not found"
+ exit;
+fi
+git_id="${full_git_id}"
+echo "Commit id ${txtcyn}${git_id}${txtrst}"
+
+queued_in=$(cd ${SCRIPT_TOP}/.. && grep -l -r ${git_id} queue-* | sort -Vr)
+if [[ "${queued_in}" != "" ]]; then
+ for q in ${queued_in}; do
+ echo " queued in: ${txtgrn}${q}${txtrst}"
+ done
+fi
+
+lines=$(git show ${git_id} | grep -i "fixes:" | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' | sed -e 's/^[ \t]*//' | cut -f 1 -d ' ')
+for fix in ${lines}; do
+ fix_id=$(git log -1 --format="%H" "${fix}")
+ if [[ "${fix_id}" != "" ]]; then
+ #echo "fix_id=${fix_id}"
+ release=$(/home/gregkh/linux/vulns/tools/verhaal/id_found_in "${fix_id}")
+ echo " fixed in: ${txtylw}${release}${txtrst}"
+ fi
+done
if [ "$#" == "0" ] ; then
versions=$("${SCRIPT_TOP}/active_kernel_versions_get.sh")