SHA256
1
0
forked from pool/dhcp

- Update to ISC dhcp-4.2.4-P1 release, providing security fixes (bnc#772924)

- Moved lease file check to a separate action so it is not used in
  restart -- it can fail when the daemon rewrites the lease causing
  a restart failure then (bnc#762108 regression).
- Request dhcp6.sntp-servers in /etc/dhclient6.conf and forward to
  netconfig for processing (bnc#770236).
- Removed RFC 4833 TZ options from client requests [unused].
- Update to ISC dhcp-4.2.4 release, fixing a dhcpv6 server assert
  crash while accessing lease on heap (bnc#767661) and providing...

OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=92
This commit is contained in:
2012-07-25 20:48:38 +00:00
committed by Git OBS Bridge
parent c67cc23113
commit 560b29399c
16 changed files with 540 additions and 396 deletions

View File

@@ -221,7 +221,7 @@ case "$1" in
get_ldd_deps() { :; }
fi
cplibs=`for i in /$libdir/{libresolv.so.*,libnss_*.so.*} \
/$libdir/{libpthread.so.0,libdl.so.2} ;
/$libdir/{libpthread.so.0,libdl.so.2,libgcc_s.so.*} ;
do
if [ -s "$i" ] ; then
echo "$i"
@@ -352,26 +352,35 @@ case "$1" in
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
sleep 3
$0 start
# Remember status and be quiet
rc_status
## Check syntax and when it is OK, stop the service
## and regardless of whether it was running or not,
## start it again.
if ! $0 check-syntax &>/dev/null ; then
echo -n "Syntax check reports errors, see log messages"
rc_failed
rc_status -v
else
$0 stop
sleep 3
$0 start
# Remember status and be quiet
rc_status
fi
;;
force-reload)
## Signal the daemon to reload its config. Most daemons
## do this on signal 1 (SIGHUP).
## If it does not support it, restart.
echo -n "Reload service $DAEMON"
if [ "$SUPPORTS_HUP" = "yes" ]; then
echo -n "Reload service $DAEMON"
killproc -p $DAEMON_STATE/$DAEMON_PIDFILE -HUP $DAEMON_BIN
#touch $DAEMON_STATE/$DAEMON_PIDFILE
rc_status -v
elif ! $0 check-syntax &>/dev/null ; then
echo -n "Syntax check reports errors, see log messages"
rc_failed
rc_status -v
else
$0 stop && sleep 3 && $0 start
rc_status
@@ -419,31 +428,39 @@ case "$1" in
test $rc = 1 && echo restart
;;
check-syntax|syntax-check)
echo "Checking syntax of $DAEMON_CONF: "
echo -n "Checking syntax of $DAEMON_CONF: "
## this nice bit is from Edwin Groothuis:
## check syntax (quiet)
$DAEMON_BIN $DHCPDv_OPT -q -t -cf $DAEMON_CONF
if ! [ $? -eq 0 ]; then
rc_status
if [ $? -ne 0 ]; then
echo ""
## check syntax (verbose)
$DAEMON_BIN $DHCPDv_OPT -t -cf $DAEMON_CONF
echo -e '\nConfig is NOT okay\n'
else
echo 'Config is okay. Hope you also specified existent network devices ;) '
## in v3, lease file checking is also implemented
if [ $DAEMON_BIN != "/usr/sbin/dhcpd-2" ]; then
## check leases file (quiet)
$DAEMON_BIN $DHCPDv_OPT -q -T -cf $DAEMON_CONF -lf ${DAEMON_STATE}/db/$DAEMON_LEASES
if ! [ $? -eq 0 ]; then
## check leases file (verbose)
$DAEMON_BIN $DHCPDv_OPT -T -cf $DAEMON_CONF -lf ${DAEMON_STATE}/db/$DAEMON_LEASES
echo -e '\nLease file is NOT okay'
else
echo 'Lease file is okay'
fi
fi
echo -ne '\nConfig is NOT okay'
rc_failed
fi
rc_status -v
;;
check-lease|check-lease-file)
echo -n "Checking lease file $DAEMON_LEASES: "
if [ -s ${DAEMON_STATE}/db/$DAEMON_LEASES ] ; then
## check leases file (quiet)
$DAEMON_BIN $DHCPDv_OPT -q -T -cf /dev/null -lf ${DAEMON_STATE}/db/$DAEMON_LEASES
rc_status
if [ $? -ne 0 ]; then
echo ""
## check leases file (verbose)
$DAEMON_BIN $DHCPDv_OPT -T -cf $DAEMON_CONF -lf ${DAEMON_STATE}/db/$DAEMON_LEASES
echo -ne '\nLease file is NOT okay'
rc_failed
fi
else
rc_status -u
fi
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe|check-syntax} [-v]"