diff --git a/dhcp-3.0.5-pool_eof.dif b/dhcp-3.0.5-pool_eof.dif deleted file mode 100644 index a975f03..0000000 --- a/dhcp-3.0.5-pool_eof.dif +++ /dev/null @@ -1,15 +0,0 @@ ---- server/confpars.c -+++ server/confpars.c 2007/02/19 12:39:45 -@@ -1466,6 +1466,12 @@ - done = 1; - break; - -+ case END_OF_FILE: -+ parse_warn (cfile, "unexpected end of file"); -+ pool_dereference (&pool, MDL); -+ return; -+ break; -+ - default: - declaration = parse_statement (cfile, pool -> group, - POOL_DECL, diff --git a/dhcp-3.0.6-ldap-patch_external-dn.diff b/dhcp-3.0.6-ldap-patch_external-dn.diff new file mode 100644 index 0000000..15d9ca9 --- /dev/null +++ b/dhcp-3.0.6-ldap-patch_external-dn.diff @@ -0,0 +1,19 @@ +--- server/ldap.c ++++ server/ldap.c 2008-05-10 07:49:20.000000000 +0530 +@@ -893,7 +893,15 @@ + { + char *search[] = {"dhcpOptionsDN", "dhcpSharedNetworkDN", "dhcpSubnetDN", + "dhcpGroupDN", "dhcpHostDN", "dhcpClassesDN", +- "dhcpPoolDN", NULL}; ++ "dhcpPoolDN", "dhcpZoneDN", "dhcpFailOverPeerDN", NULL}; ++ ++ /* FIXME: dhcpKeyDN can't be added. It is referenced in dhcpDnsZone to ++ retrive the key name (cn). Adding keyDN will reflect adding a key declaration ++ inside the zone configuration. ++ ++ dhcpSubClassesDN cant be added. It is also similar to the above. ++ Needs schema change. ++ */ + LDAPMessage * newres, * newent; + struct ldap_config_stack *ns; + char **tempstr; diff --git a/dhcp-3.0.6.tar.gz b/dhcp-3.0.6.tar.gz deleted file mode 100644 index ffe2a8a..0000000 --- a/dhcp-3.0.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f77b0ebf975d71578e2d305a2e07b900a9462b7efaac41826facfb4d4f00f4d -size 891513 diff --git a/dhcp-3.0.6.tar.gz.asc b/dhcp-3.0.6.tar.gz.asc deleted file mode 100644 index 3ea3b0b..0000000 --- a/dhcp-3.0.6.tar.gz.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.7 (FreeBSD) - -iQEVAwUARoq/7yM0Ek4byR5sAQIfegf9GFrj5mfEsZEHeHeJ/rsHktCn3v+wEzz+ -eqVU7UwYCMIbMw0Pvejj/bwMJz7hoxyDtjZ7GF7+SWLUDqXObazxhFEYg5tmeu4l -OZnbfiaaw5u7m62JfBm9LXT6Nr9CcyOM0/AySR6N86sBefsRY70Q1AoTnIpygYha -KPZfgadjkZ6p824CflRBj0eg0dKfEchTH7g6QpOKaa17J+fKxRYrZjh3Rh2R7lDe -yEPSEzHpNlFc40JCFYSShKP7J0lxQHFTVQAUm4+9Svfw/At2t+g43utn/Jwqhq5i -ox6lGoSf0ZcpTfJU2vO2Fc8OecvCItVTFps0r++gz3kni+ZyQt995w== -=mLMd ------END PGP SIGNATURE----- diff --git a/dhcp-3.0.7-dhclient-script-netconfig.dif b/dhcp-3.0.7-dhclient-script-netconfig.dif new file mode 100644 index 0000000..1bba9c4 --- /dev/null +++ b/dhcp-3.0.7-dhclient-script-netconfig.dif @@ -0,0 +1,193 @@ +--- client/dhclient-script.8 ++++ client/dhclient-script.8 2008/08/22 10:05:02 +@@ -45,9 +45,10 @@ any, and also called once if no valid le + This script is not meant to be customized by the end user. If local + customizations are needed, they should be possible using the enter and + exit hooks provided (see HOOKS for details). These hooks will allow the +-user to override the default behaviour of the client in creating a ++user to override the default behaviour of the client in applying of ++additional settings like DNS (e.g. creating a + .B /etc/resolv.conf +-file. ++file), NTP or YP to the system. + .PP + No standard client script exists for some operating systems, even though + the actual client may work, so a pioneering user may well need to create +@@ -59,14 +60,46 @@ customizing + .B ETCDIR/dhclient.conf + or using the enter and exit hooks, please submit a bug report. + .SH HOOKS +-When it starts, the client script first defines a shell function, +-.B make_resolv_conf , +-which is later used to create the +-.B /etc/resolv.conf +-file. To override the default behaviour, redefine this function in +-the enter hook script. ++When it starts, the client script first defines several shell functions: ++.BR use_netconfig , ++.BR netconfig_modify , ++.BR netconfig_remove , ++.BR make_resolv_conf , ++.BR make_ntp_runtime_conf , ++.BR restore_resolv_conf , ++and ++.BR remove_ntp_runtime_conf . ++These functions are later used to apply DNS, NTP, YP, and other additional ++settings to the system. ++ ++The ++.B use_netconfig ++returns true (0), when the /sbin/netconfig script is supported / installed ++and enables the use of ++.B netconfig_modify ++and ++.B netconfig_remove ++functions. See also the netconfig(8) manual page. ++.br ++Otherwise, the compatibility functions ++.BR make_resolv_conf , ++.BR restore_resolv_conf , ++.BR make_ntp_runtime_conf , ++and ++.B remove_ntp_runtime_conf ++functions are used. The default implementation of make_resolv_conf is to ++modify the /etc/resolv.conf file in /sbin/modify_resolvconf script ++compatible way. The make_ntp_runtime_conf makes use of the /etc/init.d/ntp ++init script mechanism to apply the NTP server provided by dhcp at runtime. ++ ++.IR Note : ++The /sbin/modify_resolvconf script and mechanizm is obsoleted by netconfig ++and not shipped or supported any more since openSUSE 11.1. ++ ++To override the default behaviour, redefine these functions in the enter ++hook script. + .PP +-On after defining the make_resolv_conf function, the client script checks ++On after defining the netconfig functions, the client script checks + for the presence of an executable + .B ETCDIR/dhclient-enter-hooks + script, and if present, it invokes the script inline, using the Bourne +@@ -220,8 +253,8 @@ the other. Assuming the information pr + valid, this shouldn't cause any real problems, but it could be + confusing. + .SH SEE ALSO +-dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and +-dhclient.leases(5). ++dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5), ++dhclient.leases(5) and netconfig(8). + .SH AUTHOR + .B dhclient-script(8) + has been written for Internet Systems Consortium +--- client/scripts/linux ++++ client/scripts/linux 2008/08/22 09:52:12 +@@ -57,6 +57,36 @@ if [ -n "${dhc_dbus}" ]; then + fi; + fi; + ++use_netconfig() { ++ test -x /sbin/netconfig ++} ++ ++netconfig_modify() { ++ { ++ echo "INTERFACE='$interface'" ++ for v in ${!new_*}; do ++ case $v in ++ (new_ip_address) k='IPADDR' ;; ++ (new_subnet_mask) k='NETMASK' ;; ++ (new_network_number) k='NETWORK' ;; ++ (new_broadcast_address) k='BROADCAST' ;; ++ (new_routers) k='GATEWAYS' ;; ++ (new_domain_name) k='DNSDOMAIN' ;; ++ (new_domain_name_servers) k='DNSSERVERS' ;; ++ (new_ntp_servers) k='NTPSERVERS' ;; ++ (new_nis_domain) k='NISDOMAIN' ;; ++ (new_nis_servers) k='NISSERVERS' ;; ++ (new_netbios_name_servers) k='NETBIOSNAMESERVER' ;; ++ (*) : skip $v ; continue ;; ++ esac ++ [ "k${k}" != k ] && echo "${k}='${!v}'" ++ done ++ } | /sbin/netconfig modify -s "dhclient3" -i "$interface" ++} ++ ++netconfig_remove() { ++ /sbin/netconfig remove -s "dhclient3" -i "$interface" = DHCP_OPTION_LEN) { ++ if (strlen (argv[i]) > HOST_NAME_MAX) { + log_error("-H option host-name string \"%s\" is too long:" -+ "maximum length is %d characters", argv[i], DHCP_OPTION_LEN-1); ++ "maximum length is %d characters", argv[i], HOST_NAME_MAX); + exit(1); + } + dhclient_hostname = argv [i]; @@ -63,15 +63,15 @@ diff -urN dhcp-3.0.3/client/dhclient.c dhcp/client/dhclient.c + /* If the user specified a hostname, send it here and now */ + if ((dhclient_hostname != NULL) && (*dhclient_hostname != '\0') ) { + struct parse *cfile = NULL; -+ char buf[DHCP_OPTION_LEN + 40]; ++ char buf[HOST_NAME_MAX + 40]; + int len; + -+ len = sprintf (buf, "send host-name \"%s\";", dhclient_hostname); ++ len = snprintf (buf, sizeof(buf), "send host-name \"%s\";", dhclient_hostname); + + status = new_parse (&cfile, -1, buf, len, "host-name option", 0); + + if (status != ISC_R_SUCCESS) -+ log_fatal ("Cannot parse dhcp-client-identifier send statement!"); ++ log_fatal ("Cannot parse send host-name statement!"); + + for (;;) { + const char *val = NULL; diff --git a/dhcp.changes b/dhcp.changes index c40a94e..d12ed46 100644 --- a/dhcp.changes +++ b/dhcp.changes @@ -1,3 +1,71 @@ +------------------------------------------------------------------- +Fri Aug 22 13:34:07 CEST 2008 - mt@suse.de + +- Adopted dhclient-script and manual page to use /sbin/netconfig + that is replacing the modify_resolvconf mechanizm by default. + +------------------------------------------------------------------- +Wed Aug 20 15:11:14 CEST 2008 - mt@suse.de + +- Updated to dhcp-3.0.7, a maintenance release containing several + bug fixes; since the 3.0.6 release this are: + * Fixed "--version" flag in dhcrelay. + * Clarified error message when lease limit exceeded + * Fixed a buffer overflow error which could have allowed a denial + of service under unusual server configurations + * Bug in octal parsing fixed. Thanks to Bernd Fuhrmann for the + report and fix. + * The warning logged when an address range doesn't fit in the + subnets they were declared has been updated to be more helpful + and identify the typo in configuration that created the + spanning addresses. + * The 'min-secs' configuration parameter's log message has been + updated to be more helpful. + * Fixed a bug in which write_lease() might report a failure + incorrectly. + * Bug in server configuration parser caused server to get stuck + on startup for certain bad pool declarations. Thanks to + Guillaume Knispel for the bug report and fix. + * Fixed file descriptor leak on listen failure. Thanks to Tom + Clark. + * Failover binding acks are now transmitted before new binding + updates (which may, very rarely, be related to a lease on the + ack queue). This eliminates a lease database inconsistency + bug, as the remote system relies upon the most recent message + it received from its peer. + * POOLREQ messages received within 30 seconds of one another are + ignored. + * 'lease imbalance' messages are not logged unless rebalance was + actually attempted ("ten percent" rule). + * A bug was fixed where the 'giaddr' may be used to find the + client's subnet rather than its own 'ciaddr'. + * A log message was introduced to clarify the situation where a + failover 'address' parameter (the server's local address) did + not resolve to an IPv4 address. + * When server is configured with options that it overrides, a + warning is issued when the configuration file is read, rather + than at the time the option is overridden. This was important, + because the warning was given every time the option was + overridden, which could create a lot of unnecessary logging. + * When a failover server suspects it has encountered a peer + running a version 3.1.x failover server, a warning that the + failover wire protocol is incompatible is printed. + * The failover server no longer issues a floating point error + if it encounters a previously undefined option code. + * A memory leak when using omapi has been fixed. +- Adopted dhcp-send-hostname-rml patch +- Removed obsolete dhcp-3.0.5-pool_eof patch +- Merged changes between server:isc-dhcp and openSUSE:Factory +- Removed down parameter from ifconfig calls in dhclient-script + because it destroys bonding interfaces and also conflicts with + an dhcpv6 client running on same interface (bnc#410905). + +------------------------------------------------------------------- +Wed Aug 20 14:11:14 CEST 2008 - skalyanasundaram@novell.com + +- Added missing DNs (dhcpZoneDN, dhcpFailOverPeerDN) to list of + external references. + ------------------------------------------------------------------- Fri Jun 27 14:28:02 CEST 2008 - mt@suse.de diff --git a/dhcp.spec b/dhcp.spec index 4c864b6..dbaea71 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -1,10 +1,17 @@ # -# spec file for package dhcp (Version 3.0.6) +# spec file for package dhcp (Version 3.0.7) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -23,8 +30,8 @@ BuildRequires: openldap2-devel License: BSD 3-Clause Group: Productivity/Networking/Boot/Servers AutoReqProv: on -Version: 3.0.6 -Release: 88 +Version: 3.0.7 +Release: 1 Summary: Common Files Used by ISC DHCP Software Url: http://www.isc.org/isc/dhcp.html Source0: http://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz @@ -65,7 +72,6 @@ Patch40: dhcp-3.0.6-dhclient-exec-filedes.dif Patch41: makefile.diff Patch51: dhcp-3.0.5-tmpfile.dif Patch52: dhcp-3.0.3-man.dif -Patch53: dhcp-3.0.5-pool_eof.dif ## LDAP support for DHCP server ## patch lives here: http://home.ntelos.net/~masneyb/ %define DHCPD_LDAP 1 @@ -75,6 +81,7 @@ Patch61: dhcp-3.0.5-ldap-patch_object-order.dif Patch62: dhcp-3.0.5-ldap-patch_server_dn.dif Patch63: dhcp-3.0.5-ldap-patch_host_brace.dif Patch64: dhcp-3.0.6-ldap-patch_hwaddr-icase.dif +Patch65: dhcp-3.0.6-ldap-patch_external-dn.diff %endif %if %{?suse_version:%suse_version}%{?!suse_version:99999} > 930 Patch70: dhcp-3.0.3b1-pie.dif @@ -89,6 +96,8 @@ Patch85: dhcp-3.0.6-dhclient-conf-requests.patch Patch86: dhcp-3.0.6-dhclient-conf-no-script.patch Patch87: dhcp-3.0.6-dhclient-conf-requires.patch Patch88: dhcp-3.0.6-dhclient-script-sethostname.patch +Patch89: dhcp-3.0.7-dhclient-script-skip-ifconfig-down.dif +Patch90: dhcp-3.0.7-dhclient-script-netconfig.dif Obsoletes: dhcp-base Provides: dhcp-base:/usr/bin/omshell PreReq: /bin/touch /sbin/chkconfig @@ -205,13 +214,13 @@ Authors: %patch41 %patch51 -p1 %patch52 -p1 -%patch53 -p0 %if %DHCPD_LDAP %patch60 -p1 %patch61 -p0 %patch62 -p0 %patch63 -p0 %patch64 -p0 +%patch65 -p0 %endif %if %{?suse_version:%suse_version}%{?!suse_version:99999} > 930 %patch70 @@ -225,6 +234,8 @@ Authors: %patch86 -p1 %patch87 -p1 %patch88 -p1 +%patch89 -p0 +%patch90 -p0 find . -type f -name \*.cat\* -exec rm -f {} \; cp -p %{S:2} %{S:3} %{S:11} %{S:12} %{S:14} %{S:32} %{S:33} . for i in README LIESMICH; do @@ -493,6 +504,65 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi %doc %{_mandir}/man3/dhcpctl.3.gz %changelog +* Fri Aug 22 2008 mt@suse.de +- Adopted dhclient-script and manual page to use /sbin/netconfig + that is replacing the modify_resolvconf mechanizm by default. +* Wed Aug 20 2008 mt@suse.de +- Updated to dhcp-3.0.7, a maintenance release containing several + bug fixes; since the 3.0.6 release this are: + * Fixed "--version" flag in dhcrelay. + * Clarified error message when lease limit exceeded + * Fixed a buffer overflow error which could have allowed a denial + of service under unusual server configurations + * Bug in octal parsing fixed. Thanks to Bernd Fuhrmann for the + report and fix. + * The warning logged when an address range doesn't fit in the + subnets they were declared has been updated to be more helpful + and identify the typo in configuration that created the + spanning addresses. + * The 'min-secs' configuration parameter's log message has been + updated to be more helpful. + * Fixed a bug in which write_lease() might report a failure + incorrectly. + * Bug in server configuration parser caused server to get stuck + on startup for certain bad pool declarations. Thanks to + Guillaume Knispel for the bug report and fix. + * Fixed file descriptor leak on listen failure. Thanks to Tom + Clark. + * Failover binding acks are now transmitted before new binding + updates (which may, very rarely, be related to a lease on the + ack queue). This eliminates a lease database inconsistency + bug, as the remote system relies upon the most recent message + it received from its peer. + * POOLREQ messages received within 30 seconds of one another are + ignored. + * 'lease imbalance' messages are not logged unless rebalance was + actually attempted ("ten percent" rule). + * A bug was fixed where the 'giaddr' may be used to find the + client's subnet rather than its own 'ciaddr'. + * A log message was introduced to clarify the situation where a + failover 'address' parameter (the server's local address) did + not resolve to an IPv4 address. + * When server is configured with options that it overrides, a + warning is issued when the configuration file is read, rather + than at the time the option is overridden. This was important, + because the warning was given every time the option was + overridden, which could create a lot of unnecessary logging. + * When a failover server suspects it has encountered a peer + running a version 3.1.x failover server, a warning that the + failover wire protocol is incompatible is printed. + * The failover server no longer issues a floating point error + if it encounters a previously undefined option code. + * A memory leak when using omapi has been fixed. +- Adopted dhcp-send-hostname-rml patch +- Removed obsolete dhcp-3.0.5-pool_eof patch +- Merged changes between server:isc-dhcp and openSUSE:Factory +- Removed down parameter from ifconfig calls in dhclient-script + because it destroys bonding interfaces and also conflicts with + an dhcpv6 client running on same interface (bnc#410905). +* Wed Aug 20 2008 skalyanasundaram@novell.com +- Added missing DNs (dhcpZoneDN, dhcpFailOverPeerDN) to list of + external references. * Fri Jun 27 2008 mt@suse.de - Added /etc/openldap directory to the file list of the dhcp-server package, because it is not provided by the ldap package any more.