This commit is contained in:
parent
7a1ce40e10
commit
6f510f14b6
60
dhcp-3.0.6-ldap-patch_hwaddr-icase.dif
Normal file
60
dhcp-3.0.6-ldap-patch_hwaddr-icase.dif
Normal file
@ -0,0 +1,60 @@
|
||||
--- server/ldap.c
|
||||
+++ server/ldap.c 2007/12/04 10:16:56
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "dhcpd.h"
|
||||
#include <signal.h>
|
||||
+#include <ctype.h>
|
||||
|
||||
#if defined(LDAP_CONFIGURATION)
|
||||
|
||||
@@ -87,6 +88,24 @@
|
||||
return strncat(dst, src, dst_size > len ? dst_size - len - 1: 0);
|
||||
}
|
||||
|
||||
+static char *
|
||||
+x_strxform(char *dst, const char *src, size_t dst_size,
|
||||
+ int (*xform)(int))
|
||||
+{
|
||||
+ if(dst && src && dst_size)
|
||||
+ {
|
||||
+ size_t len, pos;
|
||||
+
|
||||
+ len = strlen(src);
|
||||
+ for(pos=0; pos < len && pos + 1 < dst_size; pos++)
|
||||
+ dst[pos] = xform((int)src[pos]);
|
||||
+ dst[pos] = '\0';
|
||||
+
|
||||
+ return dst;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
ldap_parse_class (struct ldap_config_stack *item, struct parse *cfile)
|
||||
{
|
||||
@@ -1707,6 +1726,8 @@
|
||||
struct host_decl * host;
|
||||
isc_result_t status;
|
||||
ldap_dn_node *curr;
|
||||
+ char up_hwaddr[20];
|
||||
+ char lo_hwaddr[20];
|
||||
int ret;
|
||||
|
||||
if (ldap_method == LDAP_METHOD_STATIC)
|
||||
@@ -1737,9 +1758,13 @@
|
||||
** FIXME: It is not guaranteed, that the dhcpHWAddress attribute
|
||||
** contains _exactly_ "type addr" with one space between!
|
||||
*/
|
||||
+ snprintf(lo_hwaddr, sizeof(lo_hwaddr), "%s",
|
||||
+ print_hw_addr (htype, hlen, haddr));
|
||||
+ x_strxform(up_hwaddr, lo_hwaddr, sizeof(up_hwaddr), toupper);
|
||||
+
|
||||
snprintf (buf, sizeof (buf),
|
||||
- "(&(objectClass=dhcpHost)(dhcpHWAddress=%s %s))",
|
||||
- type_str, print_hw_addr (htype, hlen, haddr));
|
||||
+ "(&(objectClass=dhcpHost)(|(dhcpHWAddress=%s %s)(dhcpHWAddress=%s %s)))",
|
||||
+ type_str, lo_hwaddr, type_str, up_hwaddr);
|
||||
|
||||
res = ent = NULL;
|
||||
for (curr = ldap_service_dn_head;
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 4 11:02:45 CET 2007 - mt@suse.de
|
||||
|
||||
- Bug #343069: Added dhcp-server compatibility workaround to search
|
||||
for lower- and upper-case MAC addresses in the dhcpHWAddress LDAP
|
||||
attributes. New patch: dhcp-3.0.6-ldap-patch_hwaddr-icase.dif
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 19 09:43:56 CET 2007 - mt@suse.de
|
||||
|
||||
|
@ -23,7 +23,7 @@ License: BSD 3-Clause
|
||||
Group: Productivity/Networking/Boot/Servers
|
||||
AutoReqProv: on
|
||||
Version: 3.0.6
|
||||
Release: 37
|
||||
Release: 41
|
||||
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
|
||||
@ -73,6 +73,7 @@ Patch60: dhcp-3.0.5-ldap-patch.gz
|
||||
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
|
||||
%endif
|
||||
%if %{?suse_version:%suse_version}%{?!suse_version:99999} > 930
|
||||
Patch70: dhcp-3.0.3b1-pie.dif
|
||||
@ -202,6 +203,7 @@ Authors:
|
||||
%patch61 -p0
|
||||
%patch62 -p0
|
||||
%patch63 -p0
|
||||
%patch64 -p0
|
||||
%endif
|
||||
%if %{?suse_version:%suse_version}%{?!suse_version:99999} > 930
|
||||
%patch70
|
||||
@ -481,6 +483,10 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
|
||||
%doc %{_mandir}/man3/dhcpctl.3.gz
|
||||
|
||||
%changelog
|
||||
* Tue Dec 04 2007 - mt@suse.de
|
||||
- Bug #343069: Added dhcp-server compatibility workaround to search
|
||||
for lower- and upper-case MAC addresses in the dhcpHWAddress LDAP
|
||||
attributes. New patch: dhcp-3.0.6-ldap-patch_hwaddr-icase.dif
|
||||
* Mon Nov 19 2007 - mt@suse.de
|
||||
- Disabled script setting in the /etc/dhclient.conf,
|
||||
because it overrides the -sf command line option.
|
||||
|
Loading…
Reference in New Issue
Block a user