mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-14 22:32:30 +01:00
33b3ac0633
systems (my last change did not mix well with some firewall configurations). As much as I dislike firewalls, this is one thing I I was not prepared to break by default.. :-) Allow the user to nominate one of three ranges of port numbers as candidates for selecting a local address to replace a zero port number. The ranges are selected via a setsockopt(s, IPPROTO_IP, IP_PORTRANGE, &arg) call. The three ranges are: default, high (to bypass firewalls) and low (to get a port below 1024). The default and high port ranges are sysctl settable under sysctl net.inet.ip.portrange.* This code also fixes a potential deadlock if the system accidently ran out of local port addresses. It'd drop into an infinite while loop. The secure port selection (for root) should reduce overheads and increase reliability of rlogin/rlogind/rsh/rshd if they are modified to take advantage of it. Partly suggested by: pst Reviewed by: wollman |
||
---|---|---|
.. | ||
alpha | ||
amd64 | ||
compat/linux | ||
compile | ||
conf | ||
ddb | ||
dev | ||
fs | ||
geom | ||
gnu | ||
i386 | ||
isa | ||
isofs/cd9660 | ||
kern | ||
libkern | ||
miscfs | ||
modules | ||
msdosfs | ||
net | ||
netinet | ||
netipx | ||
netns | ||
nfs | ||
nfsclient | ||
nfsserver | ||
pc98/pc98 | ||
pccard | ||
pci | ||
powerpc/include | ||
rpc | ||
scsi | ||
sys | ||
tools | ||
ufs | ||
vm | ||
Makefile |