debuginfod: PR27917 - protect against federation loops

Message ID a53f364d9208983172de9fa8ed2dd5d79a751652.camel@klomp.org
State Committed
Headers
Series debuginfod: PR27917 - protect against federation loops |

Commit Message

Mark Wielaard Aug. 27, 2021, 5:42 p.m. UTC
  Hi dichen,

On Fri, 2021-08-20 at 20:44 +0800, Di Chen via Elfutils-devel wrote:
> 1) moved the XFF check to handle_buildid.
> 2) replace "livelock" with "deadlock" in the commit message.

This looks very good, thanks not just for the code but for also
including documentation and a testcase.

I did make one small change to the test:

And added ChangeLog file entries. Then pushed.

Thanks,

Mark
  

Patch

diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index dbf20975..7e12dd7f 100755
--- a/tests/run-debuginfod-find.sh
+++ b/tests/run-debuginfod-find.sh
@@ -819,6 +819,11 @@  while true; do
     ss -atn | fgrep -e ":$PORT4" -e ":$PORT5"|| break
 done
 
+# Make sure the vlogs are cleaned up after the test
+# and that they are printed on error.
+tempfiles vlog$PORT4 vlog$PORT5
+errfiles vlog$PORT4 vlog$PORT5
+
 env LD_LIBRARY_PATH=$ldpath DEBUGINFOD_URLS=http://127.0.0.1:$PORT5 ${abs_builddir}/../debuginfod/debuginfod $VERBOSE --forwarded-ttl-limit 0 -p $PORT4 > vlog$PORT4 2>&1 &
 PID5=$!