- Match LDAP server option values in stables.c and dhcpd.h (#431003)
- Fix invalid sprintf() statement in server/ldap.c (#431003)
This commit is contained in:
parent
f40480343e
commit
f586ac836e
@ -1,6 +1,6 @@
|
||||
diff -up dhcp-4.0.0/server/Makefile.am.ldap dhcp-4.0.0/server/Makefile.am
|
||||
--- dhcp-4.0.0/server/Makefile.am.ldap 2007-05-29 06:32:11.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/Makefile.am 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/Makefile.am 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -4,12 +4,10 @@ dist_sysconf_DATA = dhcpd.conf
|
||||
sbin_PROGRAMS = dhcpd
|
||||
dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
|
||||
@ -19,7 +19,7 @@ diff -up dhcp-4.0.0/server/Makefile.am.ldap dhcp-4.0.0/server/Makefile.am
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
diff -up dhcp-4.0.0/server/mdb.c.ldap dhcp-4.0.0/server/mdb.c
|
||||
--- dhcp-4.0.0/server/mdb.c.ldap 2007-11-30 11:51:43.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/mdb.c 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/mdb.c 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -600,6 +600,12 @@ int find_hosts_by_haddr (struct host_dec
|
||||
const char *file, int line)
|
||||
{
|
||||
@ -34,8 +34,8 @@ diff -up dhcp-4.0.0/server/mdb.c.ldap dhcp-4.0.0/server/mdb.c
|
||||
h.hlen = hlen + 1;
|
||||
h.hbuf [0] = htype;
|
||||
diff -up /dev/null dhcp-4.0.0/server/ldap_casa.c
|
||||
--- /dev/null 2008-01-19 23:52:35.158021373 -1000
|
||||
+++ dhcp-4.0.0/server/ldap_casa.c 2008-01-22 15:09:56.000000000 -1000
|
||||
--- /dev/null 2008-02-04 11:13:29.142014072 -1000
|
||||
+++ dhcp-4.0.0/server/ldap_casa.c 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -0,0 +1,138 @@
|
||||
+/* ldap_casa.c
|
||||
+
|
||||
@ -177,7 +177,7 @@ diff -up /dev/null dhcp-4.0.0/server/ldap_casa.c
|
||||
+
|
||||
diff -up dhcp-4.0.0/server/dhcpd.c.ldap dhcp-4.0.0/server/dhcpd.c
|
||||
--- dhcp-4.0.0/server/dhcpd.c.ldap 2007-11-30 11:51:43.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/dhcpd.c 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/dhcpd.c 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -505,6 +505,14 @@ main(int argc, char **argv) {
|
||||
/* Add the ddns update style enumeration prior to parsing. */
|
||||
add_enumeration (&ddns_styles);
|
||||
@ -194,8 +194,8 @@ diff -up dhcp-4.0.0/server/dhcpd.c.ldap dhcp-4.0.0/server/dhcpd.c
|
||||
if (!group_allocate (&root_group, MDL))
|
||||
log_fatal ("Can't allocate root group!");
|
||||
diff -up /dev/null dhcp-4.0.0/server/ldap.c
|
||||
--- /dev/null 2008-01-19 23:52:35.158021373 -1000
|
||||
+++ dhcp-4.0.0/server/ldap.c 2008-01-22 15:09:56.000000000 -1000
|
||||
--- /dev/null 2008-02-04 11:13:29.142014072 -1000
|
||||
+++ dhcp-4.0.0/server/ldap.c 2008-02-06 14:35:19.000000000 -1000
|
||||
@@ -0,0 +1,2004 @@
|
||||
+/* ldap.c
|
||||
+
|
||||
@ -998,7 +998,7 @@ diff -up /dev/null dhcp-4.0.0/server/ldap.c
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ sprintf("ldap://%s:%d", ldap_server, ldap_port);
|
||||
+ sprintf(uri, "ldap://%s:%d", ldap_server, ldap_port);
|
||||
+ ldap_initialize(&ld, uri);
|
||||
+
|
||||
+ if (ld == NULL)
|
||||
@ -2203,7 +2203,7 @@ diff -up /dev/null dhcp-4.0.0/server/ldap.c
|
||||
+#endif
|
||||
diff -up dhcp-4.0.0/server/confpars.c.ldap dhcp-4.0.0/server/confpars.c
|
||||
--- dhcp-4.0.0/server/confpars.c.ldap 2007-11-30 11:51:43.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/confpars.c 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/confpars.c 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -60,7 +60,17 @@ void parse_trace_setup ()
|
||||
|
||||
isc_result_t readconf ()
|
||||
@ -2225,7 +2225,7 @@ diff -up dhcp-4.0.0/server/confpars.c.ldap dhcp-4.0.0/server/confpars.c
|
||||
isc_result_t read_conf_file (const char *filename, struct group *group,
|
||||
diff -up dhcp-4.0.0/server/class.c.ldap dhcp-4.0.0/server/class.c
|
||||
--- dhcp-4.0.0/server/class.c.ldap 2007-09-05 07:32:10.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/class.c 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/class.c 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -84,6 +84,7 @@ int check_collection (packet, lease, col
|
||||
int matched = 0;
|
||||
int status;
|
||||
@ -2255,52 +2255,52 @@ diff -up dhcp-4.0.0/server/class.c.ldap dhcp-4.0.0/server/class.c
|
||||
print_hex_1 (data.len,
|
||||
diff -up dhcp-4.0.0/server/stables.c.ldap dhcp-4.0.0/server/stables.c
|
||||
--- dhcp-4.0.0/server/stables.c.ldap 2007-11-20 08:34:37.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/stables.c 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/server/stables.c 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -238,9 +238,107 @@ static struct option server_options[] =
|
||||
{ "dhcpv6-lease-file-name", "t", &server_universe, 54, 1 },
|
||||
{ "dhcpv6-pid-file-name", "t", &server_universe, 55, 1 },
|
||||
{ "limit-addrs-per-ia", "L", &server_universe, 56, 1 },
|
||||
+#if defined(LDAP_CONFIGURATION)
|
||||
+ { "ldap-server", "t", &server_universe, 57, 1 },
|
||||
+ { "ldap-port", "d", &server_universe, 58, 1 },
|
||||
+ { "ldap-username", "t", &server_universe, 59, 1 },
|
||||
+ { "ldap-password", "t", &server_universe, 60, 1 },
|
||||
+ { "ldap-base-dn", "t", &server_universe, 61, 1 },
|
||||
+ { "ldap-server", "t", &server_universe, 57, 1 },
|
||||
+ { "ldap-port", "d", &server_universe, 58, 1 },
|
||||
+ { "ldap-username", "t", &server_universe, 59, 1 },
|
||||
+ { "ldap-password", "t", &server_universe, 60, 1 },
|
||||
+ { "ldap-base-dn", "t", &server_universe, 61, 1 },
|
||||
+ { "ldap-method", "Nldap-methods.", &server_universe, 62, 1 },
|
||||
+ { "ldap-debug-file", "t", &server_universe, 63, 1 },
|
||||
+ { "ldap-debug-file", "t", &server_universe, 63, 1 },
|
||||
+ { "ldap-dhcp-server-cn", "t", &server_universe, 64, 1 },
|
||||
+ { "ldap-referrals", "f", &server_universe, 65, 1 },
|
||||
+ { "ldap-referrals", "f", &server_universe, 65, 1 },
|
||||
+#if defined(USE_SSL)
|
||||
+ { "ldap-ssl", "Nldap-ssl-usage.", &server_universe, 66, 1 },
|
||||
+ { "ldap-tls-reqcert", "Nldap-tls-reqcert.", &server_universe, 67, 1 },
|
||||
+ { "ldap-tls-ca-file", "t", &server_universe, 68, 1 },
|
||||
+ { "ldap-tls-ca-dir", "t", &server_universe, 69, 1 },
|
||||
+ { "ldap-tls-cert", "t", &server_universe, 70, 1 },
|
||||
+ { "ldap-tls-key", "t", &server_universe, 71, 1 },
|
||||
+ { "ldap-tls-ca-file", "t", &server_universe, 68, 1 },
|
||||
+ { "ldap-tls-ca-dir", "t", &server_universe, 69, 1 },
|
||||
+ { "ldap-tls-cert", "t", &server_universe, 70, 1 },
|
||||
+ { "ldap-tls-key", "t", &server_universe, 71, 1 },
|
||||
+ { "ldap-tls-crlcheck", "Nldap-tls-crlcheck.", &server_universe, 72, 1 },
|
||||
+ { "ldap-tls-ciphers", "t", &server_universe, 73, 1 },
|
||||
+ { "ldap-tls-randfile", "t", &server_universe, 74, 1 },
|
||||
+ { "ldap-tls-ciphers", "t", &server_universe, 73, 1 },
|
||||
+ { "ldap-tls-randfile", "t", &server_universe, 74, 1 },
|
||||
+#else
|
||||
+ { "unknown-66", "X", &server_universe, 66, 1 },
|
||||
+ { "unknown-67", "X", &server_universe, 67, 1 },
|
||||
+ { "unknown-68", "X", &server_universe, 68, 1 },
|
||||
+ { "unknown-69", "X", &server_universe, 69, 1 },
|
||||
+ { "unknown-70", "X", &server_universe, 70, 1 },
|
||||
+ { "unknown-71", "X", &server_universe, 71, 1 },
|
||||
+ { "unknown-72", "X", &server_universe, 72, 1 },
|
||||
+ { "unknown-73", "X", &server_universe, 73, 1 },
|
||||
+ { "unknown-74", "X", &server_universe, 74, 1 },
|
||||
+ { "unknown-66", "X", &server_universe, 66, 1 },
|
||||
+ { "unknown-67", "X", &server_universe, 67, 1 },
|
||||
+ { "unknown-68", "X", &server_universe, 68, 1 },
|
||||
+ { "unknown-69", "X", &server_universe, 69, 1 },
|
||||
+ { "unknown-70", "X", &server_universe, 70, 1 },
|
||||
+ { "unknown-71", "X", &server_universe, 71, 1 },
|
||||
+ { "unknown-72", "X", &server_universe, 72, 1 },
|
||||
+ { "unknown-73", "X", &server_universe, 73, 1 },
|
||||
+ { "unknown-74", "X", &server_universe, 74, 1 },
|
||||
+#endif
|
||||
+#else
|
||||
+ { "unknown-57", "X", &server_universe, 57, 1 },
|
||||
+ { "unknown-58", "X", &server_universe, 58, 1 },
|
||||
+ { "unknown-59", "X", &server_universe, 59, 1 },
|
||||
+ { "unknown-60", "X", &server_universe, 60, 1 },
|
||||
+ { "unknown-61", "X", &server_universe, 61, 1 },
|
||||
+ { "unknown-62", "X", &server_universe, 62, 1 },
|
||||
+ { "unknown-63", "X", &server_universe, 63, 1 },
|
||||
+ { "unknown-64", "X", &server_universe, 64, 1 },
|
||||
+ { "unknown-65", "X", &server_universe, 65, 1 },
|
||||
+ { "unknown-57", "X", &server_universe, 57, 1 },
|
||||
+ { "unknown-58", "X", &server_universe, 58, 1 },
|
||||
+ { "unknown-59", "X", &server_universe, 59, 1 },
|
||||
+ { "unknown-60", "X", &server_universe, 60, 1 },
|
||||
+ { "unknown-61", "X", &server_universe, 61, 1 },
|
||||
+ { "unknown-62", "X", &server_universe, 62, 1 },
|
||||
+ { "unknown-63", "X", &server_universe, 63, 1 },
|
||||
+ { "unknown-64", "X", &server_universe, 64, 1 },
|
||||
+ { "unknown-65", "X", &server_universe, 65, 1 },
|
||||
+#endif
|
||||
{ NULL, NULL, NULL, 0, 0 }
|
||||
};
|
||||
@ -2366,7 +2366,7 @@ diff -up dhcp-4.0.0/server/stables.c.ldap dhcp-4.0.0/server/stables.c
|
||||
{ "ad-hoc", 1 },
|
||||
diff -up dhcp-4.0.0/dst/Makefile.am.ldap dhcp-4.0.0/dst/Makefile.am
|
||||
--- dhcp-4.0.0/dst/Makefile.am.ldap 2007-05-29 06:32:10.000000000 -1000
|
||||
+++ dhcp-4.0.0/dst/Makefile.am 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/dst/Makefile.am 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -2,7 +2,12 @@ AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
|
||||
|
||||
lib_LIBRARIES = libdst.a
|
||||
@ -2382,7 +2382,7 @@ diff -up dhcp-4.0.0/dst/Makefile.am.ldap dhcp-4.0.0/dst/Makefile.am
|
||||
EXTRA_DIST = dst_internal.h md5.h md5_locl.h
|
||||
diff -up dhcp-4.0.0/common/print.c.ldap dhcp-4.0.0/common/print.c
|
||||
--- dhcp-4.0.0/common/print.c.ldap 2007-10-01 04:47:35.000000000 -1000
|
||||
+++ dhcp-4.0.0/common/print.c 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/common/print.c 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -163,9 +163,9 @@ char *print_base64 (const unsigned char
|
||||
}
|
||||
|
||||
@ -2398,7 +2398,7 @@ diff -up dhcp-4.0.0/common/print.c.ldap dhcp-4.0.0/common/print.c
|
||||
char *s;
|
||||
diff -up dhcp-4.0.0/common/conflex.c.ldap dhcp-4.0.0/common/conflex.c
|
||||
--- dhcp-4.0.0/common/conflex.c.ldap 2007-10-31 09:13:33.000000000 -1000
|
||||
+++ dhcp-4.0.0/common/conflex.c 2008-01-22 15:10:31.000000000 -1000
|
||||
+++ dhcp-4.0.0/common/conflex.c 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -43,6 +43,7 @@ static enum dhcp_token read_string PROTO
|
||||
static enum dhcp_token read_number PROTO ((int, struct parse *));
|
||||
static enum dhcp_token read_num_or_name PROTO ((int, struct parse *));
|
||||
@ -2463,7 +2463,7 @@ diff -up dhcp-4.0.0/common/conflex.c.ldap dhcp-4.0.0/common/conflex.c
|
||||
+}
|
||||
diff -up dhcp-4.0.0/includes/dhcpd.h.ldap dhcp-4.0.0/includes/dhcpd.h
|
||||
--- dhcp-4.0.0/includes/dhcpd.h.ldap 2007-12-08 09:36:00.000000000 -1000
|
||||
+++ dhcp-4.0.0/includes/dhcpd.h 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/includes/dhcpd.h 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -101,6 +101,11 @@ typedef time_t TIME;
|
||||
#include <isc-dhcp/result.h>
|
||||
#include <omapip/omapip_p.h>
|
||||
@ -2523,25 +2523,25 @@ diff -up dhcp-4.0.0/includes/dhcpd.h.ldap dhcp-4.0.0/includes/dhcpd.h
|
||||
#endif
|
||||
|
||||
+#if defined(LDAP_CONFIGURATION)
|
||||
+# define SV_LDAP_SERVER 47
|
||||
+# define SV_LDAP_PORT 48
|
||||
+# define SV_LDAP_USERNAME 49
|
||||
+# define SV_LDAP_PASSWORD 50
|
||||
+# define SV_LDAP_BASE_DN 51
|
||||
+# define SV_LDAP_METHOD 52
|
||||
+# define SV_LDAP_DEBUG_FILE 53
|
||||
+# define SV_LDAP_DHCP_SERVER_CN 54
|
||||
+# define SV_LDAP_REFERRALS 55
|
||||
+# define SV_LDAP_SERVER 57
|
||||
+# define SV_LDAP_PORT 58
|
||||
+# define SV_LDAP_USERNAME 59
|
||||
+# define SV_LDAP_PASSWORD 60
|
||||
+# define SV_LDAP_BASE_DN 61
|
||||
+# define SV_LDAP_METHOD 62
|
||||
+# define SV_LDAP_DEBUG_FILE 63
|
||||
+# define SV_LDAP_DHCP_SERVER_CN 64
|
||||
+# define SV_LDAP_REFERRALS 65
|
||||
+#if defined (USE_SSL)
|
||||
+# define SV_LDAP_SSL 56
|
||||
+# define SV_LDAP_TLS_REQCERT 57
|
||||
+# define SV_LDAP_TLS_CA_FILE 58
|
||||
+# define SV_LDAP_TLS_CA_DIR 59
|
||||
+# define SV_LDAP_TLS_CERT 60
|
||||
+# define SV_LDAP_TLS_KEY 61
|
||||
+# define SV_LDAP_TLS_CRLCHECK 62
|
||||
+# define SV_LDAP_TLS_CIPHERS 63
|
||||
+# define SV_LDAP_TLS_RANDFILE 64
|
||||
+# define SV_LDAP_SSL 66
|
||||
+# define SV_LDAP_TLS_REQCERT 67
|
||||
+# define SV_LDAP_TLS_CA_FILE 68
|
||||
+# define SV_LDAP_TLS_CA_DIR 69
|
||||
+# define SV_LDAP_TLS_CERT 70
|
||||
+# define SV_LDAP_TLS_KEY 71
|
||||
+# define SV_LDAP_TLS_CRLCHECK 72
|
||||
+# define SV_LDAP_TLS_CIPHERS 73
|
||||
+# define SV_LDAP_TLS_RANDFILE 74
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
@ -2580,7 +2580,7 @@ diff -up dhcp-4.0.0/includes/dhcpd.h.ldap dhcp-4.0.0/includes/dhcpd.h
|
||||
HASH_FUNCTIONS_DECL(ia_na, unsigned char *, struct ia_na, ia_na_hash_t);
|
||||
diff -up dhcp-4.0.0/includes/site.h.ldap dhcp-4.0.0/includes/site.h
|
||||
--- dhcp-4.0.0/includes/site.h.ldap 2006-07-31 12:19:51.000000000 -1000
|
||||
+++ dhcp-4.0.0/includes/site.h 2008-01-22 15:09:56.000000000 -1000
|
||||
+++ dhcp-4.0.0/includes/site.h 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -183,3 +183,13 @@
|
||||
traces. */
|
||||
|
||||
@ -2596,8 +2596,8 @@ diff -up dhcp-4.0.0/includes/site.h.ldap dhcp-4.0.0/includes/site.h
|
||||
+
|
||||
+#define USE_SSL
|
||||
diff -up /dev/null dhcp-4.0.0/includes/ldap_casa.h
|
||||
--- /dev/null 2008-01-19 23:52:35.158021373 -1000
|
||||
+++ dhcp-4.0.0/includes/ldap_casa.h 2008-01-22 15:09:56.000000000 -1000
|
||||
--- /dev/null 2008-02-04 11:13:29.142014072 -1000
|
||||
+++ dhcp-4.0.0/includes/ldap_casa.h 2008-02-06 14:34:44.000000000 -1000
|
||||
@@ -0,0 +1,83 @@
|
||||
+/* ldap_casa.h
|
||||
+
|
||||
|
@ -4,7 +4,7 @@
|
||||
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
|
||||
Name: dhcp
|
||||
Version: 4.0.0
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||
# that's why it is at 12 now. It should have never been used, but it was.
|
||||
@ -401,6 +401,10 @@ fi
|
||||
%{_libdir}/libdhcp4client.so
|
||||
|
||||
%changelog
|
||||
* Wed Feb 06 2008 David Cantrell <dcantrell@redhat.com> - 12:4.0.0-9
|
||||
- Match LDAP server option values in stables.c and dhcpd.h (#431003)
|
||||
- Fix invalid sprintf() statement in server/ldap.c (#431003)
|
||||
|
||||
* Wed Feb 06 2008 David Cantrell <dcantrell@redhat.com> - 12:4.0.0-8
|
||||
- Remove invalid fclose() patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user