diff options
author | Sergey Popov <pinkbyte@gentoo.org> | 2014-01-06 21:44:17 +0000 |
---|---|---|
committer | Sergey Popov <pinkbyte@gentoo.org> | 2014-01-06 21:44:17 +0000 |
commit | 35d36b24010e27217c66b1b3f7dee9da695c468c (patch) | |
tree | 1e34bd6a3399124ec3096ccdadeadcdb26ed401b /net-misc/dhcp/files | |
parent | Marked ~hppa too. (diff) | |
download | gentoo-2-35d36b24010e27217c66b1b3f7dee9da695c468c.tar.gz gentoo-2-35d36b24010e27217c66b1b3f7dee9da695c468c.tar.bz2 gentoo-2-35d36b24010e27217c66b1b3f7dee9da695c468c.zip |
Security cleanup, wrt bug #463848, acked by Tony Vroon
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42)
Diffstat (limited to 'net-misc/dhcp/files')
22 files changed, 0 insertions, 2223 deletions
diff --git a/net-misc/dhcp/files/dhcp-3.0.2-gmake.patch b/net-misc/dhcp/files/dhcp-3.0.2-gmake.patch deleted file mode 100644 index 4ab99a2b71a9..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.2-gmake.patch +++ /dev/null @@ -1,66 +0,0 @@ -Index: dhcp-3.0.2/Makefile -=================================================================== ---- dhcp-3.0.2.orig/Makefile -+++ dhcp-3.0.2/Makefile -@@ -33,7 +33,7 @@ all: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make all); \ -+ (cd work.$$sysname; $(MAKE) all); \ - fi - - install: -@@ -41,7 +41,7 @@ install: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make install); \ -+ (cd work.$$sysname; $(MAKE) install); \ - fi - - depend: -@@ -49,7 +49,7 @@ depend: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make depend); \ -+ (cd work.$$sysname; $(MAKE) depend); \ - fi - - clean: -@@ -57,7 +57,7 @@ clean: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make clean); \ -+ (cd work.$$sysname; $(MAKE) clean); \ - fi - - realclean: -@@ -65,7 +65,7 @@ realclean: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make realclean); \ -+ (cd work.$$sysname; $(MAKE) realclean); \ - fi - - distclean: -@@ -73,7 +73,7 @@ distclean: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make distclean); \ -+ (cd work.$$sysname; $(MAKE) distclean); \ - fi - - links: -@@ -81,6 +81,6 @@ links: - if [ ! -d work.$$sysname ]; then \ - echo No build directory for $$sysname - please run ./configure.; \ - else \ -- (cd work.$$sysname; make links); \ -+ (cd work.$$sysname; $(MAKE) links); \ - fi - diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch deleted file mode 100644 index 579d72f48443..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- client/scripts/bsdos -+++ client/scripts/bsdos -@@ -47,6 +47,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/freebsd -+++ client/scripts/freebsd -@@ -57,6 +57,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/linux -+++ client/scripts/linux -@@ -69,6 +69,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/netbsd -+++ client/scripts/netbsd -@@ -47,6 +47,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/openbsd -+++ client/scripts/openbsd -@@ -47,6 +47,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - ---- client/scripts/solaris -+++ client/scripts/solaris -@@ -47,6 +47,11 @@ - . /etc/dhcp/dhclient-exit-hooks - fi - # probably should do something with exit status of the local script -+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then -+ dbus-send --system --dest=com.redhat.dhcp \ -+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \ -+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`" -+ fi - exit $exit_status - } - diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch deleted file mode 100644 index 9a6e7b9698b1..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- client/scripts/linux -+++ client/scripts/linux -@@ -138,10 +138,12 @@ - [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then - current_hostname=`hostname` - if [ x$current_hostname = x ] || \ -+ [ x$current_hostname = "x(none)" ] || \ -+ [ x$current_hostname = xlocalhost ] || \ - [ x$current_hostname = x$old_host_name ]; then - if [ x$current_hostname = x ] || \ - [ x$new_host_name != x$old_host_name ]; then -- hostname $new_host_name -+ hostname "$new_host_name" - fi - fi - diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch deleted file mode 100644 index 040ef779d761..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-metric.patch +++ /dev/null @@ -1,200 +0,0 @@ ---- client/scripts/bsdos -+++ client/scripts/bsdos -@@ -84,6 +84,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -141,7 +144,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - route add $new_ip_address 127.1 >/dev/null 2>&1 - for router in $new_routers; do - route add default $router >/dev/null 2>&1 -@@ -198,7 +201,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/freebsd -+++ client/scripts/freebsd -@@ -94,6 +94,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -151,7 +154,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - $LOGGER "New IP Address ($interface): $new_ip_address" - $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" - $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" -@@ -215,7 +218,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - $LOGGER "New IP Address ($interface): $new_ip_address" - $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" - $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" ---- client/scripts/linux -+++ client/scripts/linux -@@ -83,11 +83,6 @@ - fi - fi - --release=`uname -r` --release=`expr $release : '\(.*\)\..*'` --relminor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'` --relmajor=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'` -- - if [ x$new_broadcast_address != x ]; then - new_broadcast_arg="broadcast $new_broadcast_address" - fi -@@ -106,6 +101,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - if [ x$reason = xMEDIUM ]; then - # Linux doesn't do mediums (ok, ok, media). -@@ -117,15 +115,7 @@ - # Bring down alias interface. Its routes will disappear too. - ifconfig $interface:0- inet 0 - fi -- if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ) -- then -- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \ -- broadcast 255.255.255.255 up -- # Add route to make broadcast work. Do not omit netmask. -- route add default dev $interface netmask 0.0.0.0 -- else -- ifconfig $interface 0 up -- fi -+ ifconfig $interface 0 up - - # We need to give the kernel some time to get the interface up. - sleep 1 -@@ -164,12 +154,14 @@ - ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg $mtu_arg - # Add a network route to the computed network address. -- if [ $relmajor -lt 2 ] || \ -- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then -- route add -net $new_network_number $new_subnet_arg dev $interface -+ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then -+ route del -net $new_network_number $new_subnet_arg \ -+ dev $interface -+ route add -net $new_network_number $new_subnet_arg $metric_arg \ -+ dev $interface - fi - for router in $new_routers; do -- route add default gw $router -+ route add default gw $router $metric_arg dev $interface - done - fi - if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; -@@ -213,12 +205,15 @@ - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg - route add -host $alias_ip_address dev $interface:0 - fi -- if [ $relmajor -lt 2 ] || \ -- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then -- route add -net $new_network_number -+ # Add a network route to the computed network address. -+ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then -+ route del -net $new_network_number $new_subnet_arg \ -+ dev $interface -+ route add -net $new_network_number $new_subnet_arg $metric_arg \ -+ dev $interface - fi - for router in $new_routers; do -- route add default gw $router -+ route add default gw $router $metric_arg dev $interface - done - make_resolv_conf - exit_with_hooks 0 ---- client/scripts/netbsd -+++ client/scripts/netbsd -@@ -84,6 +84,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -141,7 +144,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - route add $new_ip_address 127.1 >/dev/null 2>&1 - for router in $new_routers; do - route add default $router >/dev/null 2>&1 -@@ -198,7 +201,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/solaris -+++ client/scripts/solaris -@@ -79,6 +79,9 @@ - if [ x$new_interface_mtu != x ]; then - mtu_arg="mtu $new_interface_mtu" - fi -+if [ x$IF_METRIC != x ]; then -+ metric_arg="metric $IF_METRIC" -+fi - - ifconfig=/sbin/ifconfig - -@@ -141,7 +144,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - route add $new_ip_address 127.1 1 >/dev/null 2>&1 - for router in $new_routers; do - route add default $router 1 >/dev/null 2>&1 -@@ -182,7 +185,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $mtu_arg $medium" -+ $new_broadcast_arg $mtu_arg $metric_arg $medium" - sleep 1 - set $new_routers - if ping -s -n -I 1 $1 64 1; then diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch deleted file mode 100644 index 5ef4442d88aa..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-mtu.patch +++ /dev/null @@ -1,180 +0,0 @@ ---- client/scripts/bsdos -+++ client/scripts/bsdos -@@ -81,6 +81,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -138,7 +141,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - route add $new_ip_address 127.1 >/dev/null 2>&1 - for router in $new_routers; do - route add default $router >/dev/null 2>&1 -@@ -195,7 +198,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/freebsd -+++ client/scripts/freebsd -@@ -91,6 +91,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -148,7 +151,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - $LOGGER "New IP Address ($interface): $new_ip_address" - $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" - $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" -@@ -212,7 +215,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - $LOGGER "New IP Address ($interface): $new_ip_address" - $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" - $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" ---- client/scripts/linux -+++ client/scripts/linux -@@ -103,6 +103,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - # Linux doesn't do mediums (ok, ok, media). -@@ -159,7 +162,7 @@ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - - ifconfig $interface inet $new_ip_address $new_subnet_arg \ -- $new_broadcast_arg -+ $new_broadcast_arg $mtu_arg - # Add a network route to the computed network address. - if [ $relmajor -lt 2 ] || \ - ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then -@@ -201,7 +204,7 @@ - ifconfig $interface:0- inet 0 - fi - ifconfig $interface inet $new_ip_address $new_subnet_arg \ -- $new_broadcast_arg -+ $new_broadcast_arg $mtu_arg - set $new_routers - ############## what is -w in ping? - if ping -q -c 1 $1; then ---- client/scripts/netbsd -+++ client/scripts/netbsd -@@ -81,6 +81,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -138,7 +141,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - route add $new_ip_address 127.1 >/dev/null 2>&1 - for router in $new_routers; do - route add default $router >/dev/null 2>&1 -@@ -195,7 +198,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/openbsd -+++ client/scripts/openbsd -@@ -81,6 +81,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - if [ x$reason = xMEDIUM ]; then - eval "ifconfig $interface $medium" -@@ -138,7 +141,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - route add $new_ip_address 127.1 >/dev/null 2>&1 - for router in $new_routers; do - route add default $router >/dev/null 2>&1 -@@ -195,7 +198,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers ---- client/scripts/solaris -+++ client/scripts/solaris -@@ -76,6 +76,9 @@ - if [ x$alias_subnet_mask != x ]; then - alias_subnet_arg="netmask $alias_subnet_mask" - fi -+if [ x$new_interface_mtu != x ]; then -+ mtu_arg="mtu $new_interface_mtu" -+fi - - ifconfig=/sbin/ifconfig - -@@ -138,7 +141,7 @@ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - route add $new_ip_address 127.1 1 >/dev/null 2>&1 - for router in $new_routers; do - route add default $router 1 >/dev/null 2>&1 -@@ -179,7 +182,7 @@ - route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 - fi - eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \ -- $new_broadcast_arg $medium" -+ $new_broadcast_arg $mtu_arg $medium" - sleep 1 - set $new_routers - if ping -s -n -I 1 $1 64 1; then diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch deleted file mode 100644 index d84e6f6138a9..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-ntp.patch +++ /dev/null @@ -1,186 +0,0 @@ ---- client/clparse.c -+++ client/clparse.c -@@ -51,6 +51,7 @@ - DHO_DOMAIN_NAME, - DHO_DOMAIN_NAME_SERVERS, - DHO_HOST_NAME, -+ DHO_NTP_SERVERS, - 0 - }; - ---- client/scripts/bsdos -+++ client/scripts/bsdos -@@ -7,6 +7,26 @@ - echo nameserver $nameserver >>/etc/resolv.conf - done - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ x$new_ntp_servers != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- client/scripts/freebsd -+++ client/scripts/freebsd -@@ -32,8 +32,28 @@ - done - fi - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf - } - -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi -+} -+ - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. - exit_with_hooks() { - exit_status=$1 ---- client/scripts/linux -+++ client/scripts/linux -@@ -30,6 +30,26 @@ - echo nameserver $nameserver >>/etc/resolv.conf - done - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- client/scripts/netbsd -+++ client/scripts/netbsd -@@ -7,6 +7,26 @@ - echo nameserver $nameserver >>/etc/resolv.conf - done - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- client/scripts/openbsd -+++ client/scripts/openbsd -@@ -7,6 +7,26 @@ - echo nameserver $nameserver >>/etc/resolv.conf - done - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- client/scripts/solaris -+++ client/scripts/solaris -@@ -7,6 +7,26 @@ - echo nameserver $nameserver >>/etc/resolv.conf - done - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. diff --git a/net-misc/dhcp/files/dhcp-3.0.3-libdst.patch b/net-misc/dhcp/files/dhcp-3.0.3-libdst.patch deleted file mode 100644 index 8e93ac95bc40..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-libdst.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- dst/Makefile.dist.old 2004-12-24 13:31:22.986061032 +0000 -+++ dst/Makefile.dist 2004-12-24 13:47:19.036913364 +0000 -@@ -31,6 +31,10 @@ - all: libdst.a - - install: -+ mkdir -p $(DESTDIR)$(LIBDIR) -+ $(INSTALL) libdst.a $(DESTDIR)$(LIBDIR) -+ $(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libdst.a -+ - - libdst.a: $(OBJ) - rm -f dst.a - diff --git a/net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch b/net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch deleted file mode 100644 index 38f7713f5c62..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.3-no_isc_blurb.patch +++ /dev/null @@ -1,105 +0,0 @@ -Patch nobbled from RedHat, and adapted to work with dhclient and dhrelay -by Roy Marples <uberlord@gentoo.org> - ---- dhcp-3.0.3/omapip/errwarn.c.no_isc_blurb 2004-09-30 16:38:32.000000000 -0400 -+++ dhcp-3.0.3/omapip/errwarn.c 2005-04-18 13:45:49.037158000 -0400 -@@ -45,6 +45,8 @@ - int log_perror = 1; - #endif - int log_priority; -+int log_isc_blurb=1; -+ - void (*log_cleanup) (void); - - #define CVT_BUF_MAX 1023 -@@ -76,7 +78,9 @@ - write (STDERR_FILENO, "\n", 1); - } - --#if !defined (NOMINUM) -+#if !defined(NOMINUM) -+ if ( log_isc_blurb ) -+ { - log_error ("%s", ""); - log_error ("If you did not get this software from ftp.isc.org, please"); - log_error ("get the latest from ftp.isc.org and install that before"); -@@ -94,7 +98,12 @@ - log_error ("the README file."); - log_error ("%s", ""); - log_error ("exiting."); -+ }else -+ { -+ log_error ("exiting."); -+ } - #endif -+ - if (log_cleanup) - (*log_cleanup) (); - exit (1); ---- dhcp-3.0.3/client/dhclient.c.no_isc_blurb 2005-04-18 13:21:08.509169000 -0400 -+++ dhcp-3.0.3/client/dhclient.c 2005-04-18 13:49:27.574402000 -0400 -@@ -34,7 +34,7 @@ - static char ocopyright[] = - "$Id: dhcp-3.0.3-no_isc_blurb.patch,v 1.1 2005/12/09 14:13:30 uberlord Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; - #endif /* not lint */ -- -+ - #include "dhcpd.h" - #include "version.h" - -@@ -81,6 +81,8 @@ - - void do_release(struct client_state *); - -+extern int log_isc_blurb; -+ - int main (argc, argv, envp) - int argc; - char **argv, **envp; -@@ -176,6 +178,7 @@ - } else if (!strcmp (argv [i], "-q")) { - quiet = 1; - quiet_interface_discovery = 1; -+ log_isc_blurb = 0; - } else if (!strcmp (argv [i], "-s")) { - if (++i == argc) - usage (); ---- dhcp-3.0.3/server/dhcpd.c.no_isc_blurb 2005-12-08 10:01:40.000000000 +0000 -+++ dhcp-3.0.3/server/dhcpd.c 2005-12-08 10:05:55.000000000 +0000 -@@ -62,6 +62,9 @@ - struct iaddr server_identifier; - int server_identifier_matched; - -+ -+extern int log_isc_blurb; -+ - #if defined (NSUPDATE) - - /* This stuff is always executed to figure the default values for certain -@@ -368,6 +371,7 @@ - } else if (!strcmp (argv [i], "-q")) { - quiet = 1; - quiet_interface_discovery = 1; -+ log_isc_blurb = 0; - } else if (!strcmp (argv [i], "--version")) { - log_info ("isc-dhcpd-%s", DHCP_VERSION); - exit (0); ---- dhcp-3.0.3/relay/dhcrelay.c.no_isc_blurb 2005-12-08 10:21:00.000000000 +0000 -+++ dhcp-3.0.3/relay/dhcrelay.c 2005-12-08 10:21:50.000000000 +0000 -@@ -102,6 +102,8 @@ - static char message [] = "Internet Systems Consortium DHCP Relay Agent"; - static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/"; - -+extern int log_isc_blurb; -+ - int main (argc, argv, envp) - int argc; - char **argv, **envp; -@@ -170,6 +172,7 @@ - } else if (!strcmp (argv [i], "-q")) { - quiet = 1; - quiet_interface_discovery = 1; -+ log_isc_blurb = 0; - } else if (!strcmp (argv [i], "-a")) { - add_agent_options = 1; - } else if (!strcmp (argv [i], "-c")) { diff --git a/net-misc/dhcp/files/dhcp-3.0.4-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-3.0.4-dhclient-stdin-conf.patch deleted file mode 100644 index 3fedc7c0e80b..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.4-dhclient-stdin-conf.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- common/conflex.c.orig 2006-02-21 16:21:45.000000000 +0000 -+++ common/conflex.c 2006-02-21 16:23:06.000000000 +0000 -@@ -90,7 +90,7 @@ - struct parse **cfile; - { - /* "Memory" config files have no file. */ -- if ((*cfile)->file != -1) -+ if ((*cfile)->file != -1 && (*cfile)->file != fileno(stdin)) - close((*cfile)->file); - - if ((*cfile)->bufsiz) ---- client/clparse.c.orig 2006-02-22 09:37:12.000000000 +0000 -+++ client/clparse.c 2006-02-22 09:38:26.000000000 +0000 -@@ -97,6 +97,11 @@ - status = read_client_conf_file (path_dhclient_conf, - (struct interface_info *)0, - &top_level_config); -+ -+ /* Read any extra configuration from stdin */ -+ read_client_conf_stdin ((struct interface_info *)0, -+ &top_level_config); -+ - if (status != ISC_R_SUCCESS) { - ; - #ifdef LATER -@@ -148,20 +153,17 @@ - return status; - } - --int read_client_conf_file (const char *name, struct interface_info *ip, -- struct client_config *client) -+int read_client_conf_actual (int file, const char *name, -+ struct interface_info *ip, -+ struct client_config *client) - { -- int file; - struct parse *cfile; - const char *val; - int token; - isc_result_t status; - -- if ((file = open (name, O_RDONLY)) < 0) -- return uerr2isc (errno); -- - cfile = (struct parse *)0; -- new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); -+ new_parse (&cfile, file, (char *)0, 0, name , 0); - - do { - token = peek_token (&val, (unsigned *)0, cfile); -@@ -177,6 +179,32 @@ - return status; - } - -+int read_client_conf_file (const char *name, struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file; -+ isc_result_t status; -+ -+ if ((file = open (name, O_RDONLY)) < 0) -+ return uerr2isc (errno); -+ -+ status = read_client_conf_actual(file, name, ip, client); -+ -+ return status; -+} -+ -+ -+int read_client_conf_stdin (struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file = fileno(stdin); -+ isc_result_t status; -+ -+ if (isatty(file)) return ISC_R_NOTFOUND; -+ status = read_client_conf_actual(file, "stdin", ip, client); -+ -+ return status; -+} - - /* lease-file :== client-lease-statements END_OF_FILE - client-lease-statements :== <nil> diff --git a/net-misc/dhcp/files/dhcp-3.0.5-bpf-nofallback.patch b/net-misc/dhcp/files/dhcp-3.0.5-bpf-nofallback.patch deleted file mode 100644 index 2fae6f2204af..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0.5-bpf-nofallback.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -ur common.orig/bpf.c common/bpf.c ---- common.orig/bpf.c 2006-09-20 12:52:47 +0100 -+++ common/bpf.c 2006-09-20 12:53:22 +0100 -@@ -354,10 +354,6 @@ - int result; - int fudge; - -- if (!strcmp (interface -> name, "fallback")) -- return send_fallback (interface, packet, raw, -- len, from, to, hto); -- - /* Assemble the headers... */ - assemble_hw_header (interface, (unsigned char *)hw, &hbufp, hto); - assemble_udp_ip_header (interface, -@@ -531,17 +527,5 @@ - - void maybe_setup_fallback () - { -- isc_result_t status; -- struct interface_info *fbi = (struct interface_info *)0; -- if (setup_fallback (&fbi, MDL)) { -- if_register_fallback (fbi); -- status = omapi_register_io_object ((omapi_object_t *)fbi, -- if_readsocket, 0, -- fallback_discard, 0, 0); -- if (status != ISC_R_SUCCESS) -- log_fatal ("Can't register I/O handle for %s: %s", -- fbi -> name, isc_result_totext (status)); -- interface_dereference (&fbi, MDL); -- } - } - #endif -diff -ur includes.orig/osdep.h includes/osdep.h ---- includes.orig/osdep.h 2006-09-20 12:54:52 +0100 -+++ includes/osdep.h 2006-09-20 12:56:40 +0100 -@@ -190,7 +190,7 @@ - Currently, all low-level packet interfaces use BSD sockets as a - fallback. */ - --#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || \ -+#if defined (USE_NIT_SEND) || \ - defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) || \ - defined (USE_LPF_SEND) || \ - (defined (USE_SOCKET_SEND) && defined (HAVE_SO_BINDTODEVICE)) diff --git a/net-misc/dhcp/files/dhcp-3.1.0a1-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-3.1.0a1-dhclient-resolvconf.patch deleted file mode 100644 index 5c420ae6e0f4..000000000000 --- a/net-misc/dhcp/files/dhcp-3.1.0a1-dhclient-resolvconf.patch +++ /dev/null @@ -1,254 +0,0 @@ -diff -ur client.orig/scripts/bsdos client/scripts/bsdos ---- client.orig/scripts/bsdos 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/bsdos 2006-09-07 19:19:53.000000000 +0100 -@@ -1,21 +1,22 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ "x$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then -+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ if [ "x$new_domain_name" != x ]; then -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >> /etc/resolv.conf.dhclient -- done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf -diff -ur client.orig/scripts/freebsd client/scripts/freebsd ---- client.orig/scripts/freebsd 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/freebsd 2006-09-07 19:19:32.000000000 +0100 -@@ -11,38 +11,20 @@ - fi - - make_resolv_conf() { -- if [ x"$new_domain_name_servers" != x ]; then -- ( cat /dev/null > /etc/resolv.conf.dhclient ) -- exit_status=$? -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status" -- else -- if [ "x$new_domain_search" != x ]; then -- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- elif [ "x$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient ) -- exit_status=$? -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then -+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ if [ "x$new_domain_name" != x ]; then -+ conf="${conf}search $new_domain_name\n" - fi - for nameserver in $new_domain_name_servers; do -- if [ $exit_status -ne 0 ]; then -- break -- fi -- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient ) -- exit_status=$? -+ conf="${conf}nameserver $nameserver\n" - done -- -- # If there were no errors, attempt to mv the new file into place. -- if [ $exit_status -eq 0 ]; then -- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf ) -- exit_status = $? -- fi -- -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Error while writing new /etc/resolv.conf." -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf - fi - fi - fi -diff -ur client.orig/scripts/linux client/scripts/linux ---- client.orig/scripts/linux 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/linux 2006-09-07 19:18:57.000000000 +0100 -@@ -23,22 +23,22 @@ - # of the $1 in its args. - - make_resolv_conf() { -- if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- chmod 644 /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then -+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ if [ "x$new_domain_name" != x ]; then -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -- done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf -diff -ur client.orig/scripts/netbsd client/scripts/netbsd ---- client.orig/scripts/netbsd 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/netbsd 2006-09-07 19:20:10.000000000 +0100 -@@ -1,21 +1,22 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ "x$new_domain_search != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ "x$new_domain_name != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then -+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ if [ "x$new_domain_name" != x ]; then -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -- done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf -diff -ur client.orig/scripts/openbsd client/scripts/openbsd ---- client.orig/scripts/openbsd 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/openbsd 2006-09-07 19:20:38.000000000 +0100 -@@ -1,21 +1,22 @@ - #!/bin/sh - - make_resolv_conf() { -- if x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then -+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ if [ "x$new_domain_name" != x ]; then -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -- done -- -- mv /etc/ersolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf -diff -ur client.orig/scripts/solaris client/scripts/solaris ---- client.orig/scripts/solaris 2006-09-07 18:53:10.476329752 +0100 -+++ client/scripts/solaris 2006-09-07 19:21:12.000000000 +0100 -@@ -1,21 +1,22 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then -+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ if [ "x$new_domain_name" != x ]; then -+ conf="${conf}search $new_domain_name\n" -+ fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver $nameserver\n" -+ done -+ if [ -x /sbin/resolvconf ]; then -+ printf "$conf" | resolvconf -a "$interface" -+ else -+ printf "$conf" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -- for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -- done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf diff --git a/net-misc/dhcp/files/dhcp-3.1.2_p1-CVE-2009-1892.patch b/net-misc/dhcp/files/dhcp-3.1.2_p1-CVE-2009-1892.patch deleted file mode 100644 index ae1b92af8a7d..000000000000 --- a/net-misc/dhcp/files/dhcp-3.1.2_p1-CVE-2009-1892.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr dhcp-3.1.2.ORIG/server/dhcp.c dhcp-3.1.2/server/dhcp.c ---- dhcp-3.1.2.ORIG/server/dhcp.c 2009-07-13 14:26:15.000000000 +0100 -+++ dhcp-3.1.2/server/dhcp.c 2009-07-13 14:26:33.000000000 +0100 -@@ -1747,6 +1747,8 @@ - host_reference (&host, h, MDL); - } - if (!host) { -+ if (hp) -+ host_dereference (&hp, MDL); - find_hosts_by_haddr (&hp, - packet -> raw -> htype, - packet -> raw -> chaddr, diff --git a/net-misc/dhcp/files/dhcp-4.0.1-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-4.0.1-dhclient-stdin-conf.patch deleted file mode 100644 index ddbe4a39d5a4..000000000000 --- a/net-misc/dhcp/files/dhcp-4.0.1-dhclient-stdin-conf.patch +++ /dev/null @@ -1,114 +0,0 @@ -diff -uNr dhcp-4.0.1.ORIG/client/clparse.c dhcp-4.0.1/client/clparse.c ---- dhcp-4.0.1.ORIG/client/clparse.c 2009-03-30 13:54:47.000000000 +0100 -+++ dhcp-4.0.1/client/clparse.c 2009-03-30 13:58:02.000000000 +0100 -@@ -174,6 +174,10 @@ - #endif - } - -+ /* Read any extra configuration from stdin */ -+ read_client_conf_stdin ((struct interface_info *)0, -+ &top_level_config); -+ - /* Set up state and config structures for clients that don't - have per-interface configuration statements. */ - config = (struct client_config *)0; -@@ -203,23 +207,13 @@ - return status; - } - --int read_client_conf_file (const char *name, struct interface_info *ip, -+int read_client_conf_actual (struct parse *cfile, struct interface_info *ip, - struct client_config *client) - { -- int file; -- struct parse *cfile; - const char *val; - int token; - isc_result_t status; - -- if ((file = open (name, O_RDONLY)) < 0) -- return uerr2isc (errno); -- -- cfile = NULL; -- status = new_parse(&cfile, file, NULL, 0, path_dhclient_conf, 0); -- if (status != ISC_R_SUCCESS || cfile == NULL) -- return status; -- - do { - token = peek_token (&val, (unsigned *)0, cfile); - if (token == END_OF_FILE) -@@ -230,10 +224,74 @@ - status = (cfile -> warnings_occurred - ? ISC_R_BADPARSE - : ISC_R_SUCCESS); -+ return status; -+} -+ -+int read_client_conf_file (const char *name, struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file; -+ struct parse *cfile; -+ isc_result_t status; -+ -+ if ((file = open (name, O_RDONLY)) < 0) -+ return uerr2isc (errno); -+ -+ cfile = (struct parse *)0; -+ new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); -+ status = read_client_conf_actual(cfile, ip, client); - end_parse (&cfile); - return status; - } - -+int read_client_conf_stdin (struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file; -+ char *buffer = NULL, *p; -+ unsigned buflen, len = 0; -+ struct parse *cfile; -+ size_t bytes; -+ isc_result_t status; -+ -+ file = fileno(stdin); -+ if (isatty (file)) -+ return ISC_R_NOTFOUND; -+ if (fcntl (file, F_SETFL, O_NONBLOCK) < 0) -+ log_fatal ("could not set stdin to non blocking!"); -+ -+ buflen = BUFSIZ; -+ buffer = malloc (BUFSIZ + 1); -+ p = buffer; -+ do { -+ bytes = read (file, p, BUFSIZ); -+ if (bytes == 0) -+ break; -+ if (bytes == -1) -+ log_fatal ("failed to read stdin!"); -+ if (bytes >= BUFSIZ) { -+ buflen += BUFSIZ; -+ len += BUFSIZ; -+ buffer = realloc (buffer, buflen + 1); -+ if (!buffer) -+ log_fatal ("not enough buffer to read stdin!"); -+ p = buffer + len; -+ } else { -+ len += bytes; -+ break; -+ } -+ } while(1); -+ buffer[len] = '\0'; -+ -+ cfile = (struct parse *)0; -+ status = new_parse (&cfile, -1, buffer, len, "stdin", 0); -+ if (status == ISC_R_SUCCESS) { -+ status = read_client_conf_actual (cfile, ip, client); -+ end_parse (&cfile); -+ } -+ free(buffer); -+ return status; -+} - - /* lease-file :== client-lease-statements END_OF_FILE - client-lease-statements :== <nil> diff --git a/net-misc/dhcp/files/dhcp-4.2.1-dhclient-parse_option_param-Bad-format-a.patch b/net-misc/dhcp/files/dhcp-4.2.1-dhclient-parse_option_param-Bad-format-a.patch deleted file mode 100644 index 991dddcc48d7..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.1-dhclient-parse_option_param-Bad-format-a.patch +++ /dev/null @@ -1,44 +0,0 @@ -https://bugs.gentoo.org/432998 - -snipped from OpenSUSE - -From 19248f4207e55ecb1f5cdd9eb084f1a69470afaf Mon Sep 17 00:00:00 2001 -From: Marius Tomaschewski <mt@suse.de> -Date: Thu, 5 Jan 2012 16:20:42 +0100 -Subject: [PATCH] dhclient: parse_option_param: Bad format a - -When the server provides options using the "a" array type, such as: -option rfc3442-classless-routes code 121 = array of unsigned integer 8; -the option is stored into the lease file, but when the client reads the -lease file next time, it complains about, because "a" array type aren't -recognized in the parsing loop and the option (lease?) discarded. - -Signed-off-by: Marius Tomaschewski <mt@suse.de> ---- - common/parse.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/common/parse.c b/common/parse.c -index 865522e..b4a821b 100644 ---- a/common/parse.c -+++ b/common/parse.c -@@ -5409,7 +5409,7 @@ int parse_option_decl (oc, cfile) - /* Parse the option data... */ - do { - for (fmt = option -> format; *fmt; fmt++) { -- if (*fmt == 'A') -+ if (*fmt == 'A' || *fmt == 'a') - break; - if (*fmt == 'o' && fmt != option -> format) - continue; -@@ -5623,7 +5623,7 @@ int parse_option_decl (oc, cfile) - } - } - token = next_token (&val, (unsigned *)0, cfile); -- } while (*fmt == 'A' && token == COMMA); -+ } while ((*fmt == 'A' || *fmt == 'a') && token == COMMA); - - if (token != SEMI) { - parse_warn (cfile, "semicolon expected."); --- -1.7.7 diff --git a/net-misc/dhcp/files/dhcp-4.2.1-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-4.2.1-dhclient-resolvconf.patch deleted file mode 100644 index fbbe65ad2061..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.1-dhclient-resolvconf.patch +++ /dev/null @@ -1,384 +0,0 @@ ---- a/client/scripts/bsdos -+++ b/client/scripts/bsdos -@@ -1,34 +1,41 @@ - #!/bin/sh - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient - if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_search}\n" - elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >> /etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do -- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -+ - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf - } ---- a/client/scripts/freebsd -+++ b/client/scripts/freebsd -@@ -11,68 +11,41 @@ - fi - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- ( cat /dev/null > /etc/resolv.conf.dhclient ) -- exit_status=$? -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status" -- else -- if [ "x$new_domain_search" != x ]; then -- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- elif [ "x$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- fi -- for nameserver in $new_domain_name_servers; do -- if [ $exit_status -ne 0 ]; then -- break -- fi -- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient ) -- exit_status=$? -- done -- -- # If there were no errors, attempt to mv the new file into place. -- if [ $exit_status -eq 0 ]; then -- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf ) -- exit_status=$? -- fi -- -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Error while writing new /etc/resolv.conf." -- fi -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then -+ # Note that the DHCP 'Domain Name Option' is really just a domain -+ # name, and that this practice of using the domain name option as -+ # a search path is both nonstandard and deprecated. -+ conf="${conf}search ${new_domain_name}\n" - fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver ${nameserver}\n" -+ done - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- ( cat /dev/null > /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- if [ $exit_status -ne 0 ] ; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status" -- else -- if [ "x${new_dhcp6_domain_search}" != x ] ; then -- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- fi -- for nameserver in ${new_dhcp6_name_servers} ; do -- if [ $exit_status -ne 0 ] ; then -- break -- fi -- ( echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- done -- -- if [ $exit_status -eq 0 ] ; then -- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ) -- exit_status=$? -- fi -+ if [ "x${new_dhcp6_domain_search}" != x ] ; then -+ conf="${conf}search ${new_dhcp6_domain_search}\n" -+ fi -+ for nameserver in ${new_dhcp6_name_servers} ; do -+ conf="${conf}nameserver ${nameserver}\n" -+ done -+ fi - -- if [ $exit_status -ne 0 ] ; then -- $LOGGER "Error while writing new /etc/resolv.conf." -- fi -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf - fi - fi -+ - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf - } ---- a/client/scripts/linux -+++ b/client/scripts/linux -@@ -26,35 +26,41 @@ - ip=/sbin/ip - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- chmod 644 /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do -- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -+ - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf - } ---- a/client/scripts/netbsd -+++ b/client/scripts/netbsd -@@ -1,34 +1,41 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ "x$new_domain_name" != x ]; then -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= -+ if [ x"$new_domain_name_servers" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do -- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -+ - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf - } ---- a/client/scripts/openbsd -+++ b/client/scripts/openbsd -@@ -1,34 +1,41 @@ - #!/bin/sh - - make_resolv_conf() { -- if x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= -+ if [ x"$new_domain_name_servers" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/ersolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do -- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -+ - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf - } ---- a/client/scripts/solaris -+++ b/client/scripts/solaris -@@ -1,22 +1,41 @@ - #!/bin/sh - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" -+ done -+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then -+ if [ "x${new_dhcp6_domain_search}" != x ] ; then -+ conf="${conf}search ${new_dhcp6_domain_search}\n" -+ fi -+ for nameserver in ${new_dhcp6_name_servers} ; do -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi -+ - # If we're making confs, may as well make an ntp.conf too - make_ntp_conf - } diff --git a/net-misc/dhcp/files/dhcp-4.2.1-nogateway.patch b/net-misc/dhcp/files/dhcp-4.2.1-nogateway.patch deleted file mode 100644 index 11aaacefd476..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.1-nogateway.patch +++ /dev/null @@ -1,46 +0,0 @@ -http://bugs.gentoo.org/265531 - ---- dhcp-4.2.1/client/scripts/linux -+++ dhcp-4.2.1/client/scripts/linux -@@ -193,12 +193,14 @@ - ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg $mtu_arg - # Add a network route to the computed network address. -- for router in $new_routers; do -- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -- route add -host $router dev $interface -- fi -- route add default gw $router $metric_arg dev $interface -- done -+ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then -+ for router in $new_routers; do -+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -+ route add -host $router dev $interface -+ fi -+ route add default gw $router $metric_arg dev $interface -+ done -+ fi - fi - if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; - then -@@ -244,12 +246,14 @@ - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg - route add -host $alias_ip_address dev $interface:0 - fi -- for router in $new_routers; do -- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -- route add -host $router dev $interface -- fi -- route add default gw $router $metric_arg dev $interface -- done -+ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then -+ for router in $new_routers; do -+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then -+ route add -host $router dev $interface -+ fi -+ route add default gw $router $metric_arg dev $interface -+ done -+ fi - make_resolv_conf - exit_with_hooks 0 - fi diff --git a/net-misc/dhcp/files/dhcpd.conf b/net-misc/dhcp/files/dhcpd.conf deleted file mode 100644 index 1672633c894d..000000000000 --- a/net-misc/dhcp/files/dhcpd.conf +++ /dev/null @@ -1,29 +0,0 @@ -# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd - -# If you require more than one instance of dhcpd you can create symbolic -# links to dhcpd service like so -# cd /etc/init.d -# ln -s dhcpd dhcpd.foo -# cd ../conf.d -# cp dhcpd dhcpd.foo -# Now you can edit dhcpd.foo and specify a different configuration file. -# You'll also need to specify a pidfile in that dhcpd.conf file. -# See the pid-file-name option in the dhcpd.conf man page for details. - -# If you wish to run dhcpd in a chroot, uncomment the following line -# DHCPD_CHROOT="/chroot/dhcp" - -# Then run emerge dhcp --config -# All file paths below are relative to the chroot. -# You can specify a different chroot directory but MAKE SURE it's empty. - -# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf -# DHCPD_CONF="/etc/dhcp/dhcpd.conf" - -# Configure which interface or interfaces to for dhcpd to listen on. -# List all interfaces space separated. If this is not specified then -# we listen on all interfaces. -# DHCPD_IFACE="" - -# Insert any other dhcpd options - see the man page for a full list. -# DHCPD_OPTS="" diff --git a/net-misc/dhcp/files/dhcpd.init2 b/net-misc/dhcp/files/dhcpd.init2 deleted file mode 100644 index 82cb26e77901..000000000000 --- a/net-misc/dhcp/files/dhcpd.init2 +++ /dev/null @@ -1,94 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init2,v 1.1 2009/07/09 14:45:22 chainsaw Exp $ - -opts="configtest" - -DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/dhcpd.conf} - -depend() { - need net - use logger dns -} - -get_var() { - sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \ - "${DHCPD_CHROOT}/${DHCPD_CONF}" -} - -checkconfig() { - /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t 1>/dev/null 2>&1 - ret=$? - if [ $ret -ne 0 ]; then - eerror "${SVCNAME} has detected a syntax error in your configuration files:" - /usr/sbin/dhcpd -cf ${DHCPD_CHROOT}/${DHCPD_CONF} -t - fi - - return $ret -} - -configtest() { - ebegin "Checking ${SVCNAME} configuration" - checkconfig - eend $? -} - -start() { - # Work out our cffile if it's on our DHCPD_OPTS - case " ${DHCPD_OPTS} " in - *" -cf "*) - DHCPD_CONF=" ${DHCPD_OPTS} " - DHCPD_CONF="${DHCPD_CONF##* -cf }" - DHCPD_CONF="${DHCPD_CONF%% *}" - ;; - *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" - ;; - esac - - if [ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ] ; then - eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist" - return 1 - fi - - checkconfig || return 1 - - local leasefile="$(get_var lease-file-name)" - leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}" - if [ ! -f "${leasefile}" ] ; then - ebegin "Creating ${leasefile}" - touch "${leasefile}" - chown dhcp:dhcp "${leasefile}" - eend $? || return 1 - fi - - # Setup LD_PRELOAD so name resolution works in our chroot. - if [ -n "${DHCPD_CHROOT}" ] ; then - LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so" - export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so" - fi - - local pidfile="$(get_var pid-file-name)" - pidfile="${pidfile:-/var/run/dhcp/dhcpd.pid}" - - ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" - start-stop-daemon --start --exec /usr/sbin/dhcpd \ - --pidfile "${DHCPD_CHROOT}/${pidfile}" \ - -- ${DHCPD_OPTS} -q -pf "${pidfile}" \ - -user dhcp -group dhcp \ - ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE} - eend $? \ - && save_options chroot "${DHCPD_CHROOT}" \ - && save_options pidfile "${pidfile}" -} - -stop() { - local chroot="$(get_options chroot)" - - checkconfig || return 1 - - ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" - start-stop-daemon --stop --exec /usr/sbin/dhcpd \ - --pidfile "${chroot}/$(get_options pidfile)" - eend $? -} diff --git a/net-misc/dhcp/files/dhcpd.init3 b/net-misc/dhcp/files/dhcpd.init3 deleted file mode 100755 index 3b00531429a0..000000000000 --- a/net-misc/dhcp/files/dhcpd.init3 +++ /dev/null @@ -1,94 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init3,v 1.1 2011/03/05 23:59:20 vapier Exp $ - -opts="configtest" - -DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/${SVCNAME}.conf} - -depend() { - need net - use logger dns -} - -get_var() { - sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \ - "${DHCPD_CHROOT}/${DHCPD_CONF}" -} - -checkconfig() { - dhcpd ${DHCPD_OPTS} ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} -t 1>/dev/null 2>&1 - local ret=$? - if [ $ret -ne 0 ] ; then - eerror "${SVCNAME} has detected a syntax error in your configuration files:" - dhcpd ${DHCPD_OPTS} ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} -t - fi - - return $ret -} - -configtest() { - ebegin "Checking ${SVCNAME} configuration" - checkconfig - eend $? -} - -start() { - # Work out our cffile if it's in our DHCPD_OPTS - case " ${DHCPD_OPTS} " in - *" -cf "*) - DHCPD_CONF=" ${DHCPD_OPTS} " - DHCPD_CONF="${DHCPD_CONF##* -cf }" - DHCPD_CONF="${DHCPD_CONF%% *}" - ;; - *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" - ;; - esac - - if [ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ] ; then - eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist" - return 1 - fi - - checkconfig || return 1 - - checkpath -d -o dhcp:dhcp /var/run/dhcp /var/lib/dhcp - - local leasefile="$(get_var lease-file-name)" - leasefile="${leasefile:-/var/lib/dhcp/${SVCNAME}.leases}" - if [ ! -f "${DHCPD_CHROOT}${leasefile}" ] ; then - ebegin "Creating ${leasefile}" - touch "${DHCPD_CHROOT}${leasefile}" - chown dhcp:dhcp "${DHCPD_CHROOT}${leasefile}" - eend $? || return 1 - fi - - # Setup LD_PRELOAD so name resolution works in our chroot. - if [ -n "${DHCPD_CHROOT}" ] ; then - LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so" - export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so" - fi - - local pidfile="$(get_var pid-file-name)" - pidfile="${pidfile:-/var/run/dhcp/${SVCNAME}.pid}" - - ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" - start-stop-daemon --start --exec /usr/sbin/dhcpd \ - --pidfile "${DHCPD_CHROOT}/${pidfile}" \ - -- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \ - -user dhcp -group dhcp \ - ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE} - eend $? \ - && save_options chroot "${DHCPD_CHROOT}" \ - && save_options pidfile "${pidfile}" -} - -stop() { - local chroot="$(get_options chroot)" - - ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" - start-stop-daemon --stop --exec /usr/sbin/dhcpd \ - --pidfile "${chroot}/$(get_options pidfile)" - eend $? -} diff --git a/net-misc/dhcp/files/dhcpd.init4 b/net-misc/dhcp/files/dhcpd.init4 deleted file mode 100755 index b071d8f0c44d..000000000000 --- a/net-misc/dhcp/files/dhcpd.init4 +++ /dev/null @@ -1,113 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init4,v 1.2 2011/09/22 19:38:41 vapier Exp $ - -extra_commands="configtest" - -: ${DHCPD_CONF:=/etc/dhcp/${SVCNAME}.conf} - -depend() { - need net - use logger dns -} - -get_var() { - # we read the conf outside of the chroot as we do - # not configure with --enable-early-chroot - local var="$(sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${DHCPD_CONF}")" - echo ${var:-$2} -} - -checkconfig() { - set -- ${DHCPD_OPTS} ${chroot:+-chroot} ${chroot} -t - - dhcpd "$@" 1>/dev/null 2>&1 - local ret=$? - if [ ${ret} -ne 0 ] ; then - eerror "${SVCNAME} has detected a syntax error in your configuration files:" - dhcpd "$@" - fi - - return ${ret} -} - -configtest() { - local chroot=${DHCPD_CHROOT} - - ebegin "Checking ${SVCNAME} configuration" - checkconfig - eend $? -} - -start() { - local chroot=${DHCPD_CHROOT} - - # Work out our cffile if it's in our DHCPD_OPTS - case " ${DHCPD_OPTS} " in - *" -cf "*) - DHCPD_CONF=" ${DHCPD_OPTS} " - DHCPD_CONF="${DHCPD_CONF##* -cf }" - DHCPD_CONF="${DHCPD_CONF%% *}" - ;; - *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" - ;; - esac - - # see comment in get_var() above - if [ ! -f "${DHCPD_CONF}" ] ; then - eerror "${DHCPD_CONF} does not exist" - return 1 - fi - - if [ -n "${chroot}" ] ; then - # the config test want's these to exist - mkdir -p "${chroot}"/var/run/dhcp "${chroot}"/var/lib/dhcp - fi - - checkconfig || return 1 - - checkpath -d -o dhcp:dhcp "${chroot}"/var/run/dhcp "${chroot}"/var/lib/dhcp - - local leasefile="$(get_var lease-file-name /var/lib/dhcp/${SVCNAME}.leases)" - checkpath -f -o dhcp:dhcp "${chroot}${leasefile}" - - # Setup LD_PRELOAD so name resolution works in our chroot. - if [ -n "${chroot}" ] ; then - checkpath -d -o root:root -m 755 "${chroot}"/dev "${chroot}"/etc "${chroot}"/proc - cp -pP /etc/localtime /etc/resolv.conf "${chroot}"/etc/ - export LD_PRELOAD="${LD_PRELOAD} libresolv.so libnss_dns.so" - if ! mountinfo -q "${chroot}/proc" ; then - mount --bind /proc "${chroot}/proc" - fi - fi - - local pidfile="$(get_var pid-file-name /var/run/dhcp/${SVCNAME}.pid)" - - ebegin "Starting ${chroot:+chrooted }${SVCNAME}" - start-stop-daemon --start --exec /usr/sbin/dhcpd \ - --pidfile "${chroot}/${pidfile}" \ - -- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \ - -user dhcp -group dhcp \ - ${chroot:+-chroot} ${chroot} ${DHCPD_IFACE} - eend $? \ - && save_options chroot "${chroot}" \ - && save_options pidfile "${pidfile}" -} - -stop() { - local chroot="$(get_options chroot)" - - ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" - start-stop-daemon --stop --exec /usr/sbin/dhcpd \ - --pidfile "${chroot}/$(get_options pidfile)" - res=$? - - if [ ${res} -eq 0 ] && [ -n "${chroot}" ] ; then - if mountinfo -q "${chroot}/proc" ; then - umount "${chroot}/proc" - fi - fi - - eend $res -} diff --git a/net-misc/dhcp/files/dhcrelay.init b/net-misc/dhcp/files/dhcrelay.init deleted file mode 100644 index 2f92956be8fc..000000000000 --- a/net-misc/dhcp/files/dhcrelay.init +++ /dev/null @@ -1,32 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init,v 1.2 2007/03/22 15:36:59 uberlord Exp $ - -depend() { - need net - use logger -} - -start() { - if [ -z "${DHCRELAY_SERVERS}" ]; then - eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/dhcrelay" - return 1 - fi - - local IFACES= i= - for i in ${IFACE} ; do - IFACES="${IFACES} -i ${i}" - done - - ebegin "Starting dhcrelay" - start-stop-daemon --start --exec /usr/sbin/dhcrelay \ - -- -q ${IFACES} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS} - eend $? -} - -stop() { - ebegin "Stopping dhcrelay" - start-stop-daemon --stop --pidfile /var/run/dhcrelay.pid - eend $? -} diff --git a/net-misc/dhcp/files/dhcrelay.init2 b/net-misc/dhcp/files/dhcrelay.init2 deleted file mode 100755 index 4f09249a6782..000000000000 --- a/net-misc/dhcp/files/dhcrelay.init2 +++ /dev/null @@ -1,29 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init2,v 1.2 2011/03/08 20:13:26 vapier Exp $ - -depend() { - need net - use logger -} - -start() { - if [ -z "${DHCRELAY_SERVERS}" ]; then - eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/dhcrelay" - return 1 - fi - - checkpath -d /var/run/dhcp - - ebegin "Starting dhcrelay" - start-stop-daemon --start --exec /usr/sbin/dhcrelay \ - -- -q $(printf -- '-i %s ' ${IFACE}) ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS} - eend $? -} - -stop() { - ebegin "Stopping dhcrelay" - start-stop-daemon --stop --pidfile /var/run/dhcp/dhcrelay.pid - eend $? -} |