]> git.gsnw.org Git - fping.git/commit
fix -k, --fwmark with setuid fping executable
authorErik Auerswald <auerswal@unix-ag.uni-kl.de>
Mon, 29 Jul 2024 17:38:16 +0000 (19:38 +0200)
committerErik Auerswald <auerswal@unix-ag.uni-kl.de>
Sat, 17 Aug 2024 15:10:59 +0000 (17:10 +0200)
commit096a75fa56945d4f84938432d09b3cd41bd68715
tree31683d3a1beec4d203d92b2b35dda46b6e3790ef
parentfc2fcb32adc753a947bef2f267788a4c4b8b4cf6
fix -k, --fwmark with setuid fping executable

* Setting the SO_MARK socket option requires root privileges (or
  CAP_NET_ADMIN), thus temporarily elevate privileges for this
  operation, if possible, by using the p_setsockopt() function.
  This allows to use -k, --fwmark with setuid fping.
* Adjust README.md since setuid now works for -k, --fwmark.
* Remove "sudo" from testing -k since it is no longer needed.
* Test failure of setting firewall mark without privileges or
  capabilities for both IPv4 and IPv6.
README.md
ci/test-07-options-i-m.pl
ci/test-11-unpriv.pl
src/fping.c