From c13ae11665f0aee36d94f0d9417d9dcffb1790c0 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Jan 23 2012 15:03:45 +0000 Subject: revert change made in 4.2.3-2 because of failing failover inicialization (#765967) dhclient-script: allow static route with a 0.0.0.0 next-hop address (#769463) --- diff --git a/dhclient-script b/dhclient-script index 86fc22f..0294766 100644 --- a/dhclient-script +++ b/dhclient-script @@ -427,7 +427,10 @@ dhconfig() { fi gateway=${static_routes[$i+1]} - if is_router_reachable ${gateway}; then + # special case 0.0.0.0 to allow static routing for link-local addresses + # (including IPv4 multicast) which will not have a next-hop (#769463) + if [ "${gateway}" = "0.0.0.0" ] || + is_router_reachable ${gateway}; then metric='' for t in ${route_targets[@]}; do if [ ${t} = ${target} ]; then @@ -456,11 +459,9 @@ dhconfig() { # gateways if [[ ( "${DEFROUTE}" != "no" ) && - (( -z "${GATEWAYDEV}" ) || - ( "${GATEWAYDEV}" = "${interface}" )) ]]; then + (( -z "${GATEWAYDEV}" ) || ( "${GATEWAYDEV}" = "${interface}" )) ]]; then if [[ ( -z "$GATEWAY" ) || - (( -n "$DHCLIENT_IGNORE_GATEWAY" ) && - ( "$DHCLIENT_IGNORE_GATEWAY" = [Yy]* )) ]]; then + (( -n "$DHCLIENT_IGNORE_GATEWAY" ) && ( "$DHCLIENT_IGNORE_GATEWAY" = [Yy]* )) ]]; then metric="${METRIC:-}" let i="${METRIC:-0}" default_routers=() diff --git a/dhcp-4.2.0-CLOEXEC.patch b/dhcp-4.2.0-CLOEXEC.patch deleted file mode 100644 index 2483f55..0000000 --- a/dhcp-4.2.0-CLOEXEC.patch +++ /dev/null @@ -1,422 +0,0 @@ -diff -up dhcp-4.2.0/client/clparse.c.cloexec dhcp-4.2.0/client/clparse.c ---- dhcp-4.2.0/client/clparse.c.cloexec 2010-07-21 13:55:42.000000000 +0200 -+++ dhcp-4.2.0/client/clparse.c 2010-07-21 14:31:13.000000000 +0200 -@@ -211,7 +211,7 @@ int read_client_conf_file (const char *n - int token; - isc_result_t status; - -- if ((file = open (name, O_RDONLY)) < 0) -+ if ((file = open (name, O_RDONLY | O_CLOEXEC)) < 0) - return uerr2isc (errno); - - cfile = NULL; -@@ -248,7 +248,7 @@ void read_client_leases () - - /* Open the lease file. If we can't open it, just return - - we can safely trust the server to remember our state. */ -- if ((file = open (path_dhclient_db, O_RDONLY)) < 0) -+ if ((file = open (path_dhclient_db, O_RDONLY | O_CLOEXEC)) < 0) - return; - - cfile = NULL; -diff -up dhcp-4.2.0/client/dhclient.c.cloexec dhcp-4.2.0/client/dhclient.c ---- dhcp-4.2.0/client/dhclient.c.cloexec 2010-07-21 13:55:42.000000000 +0200 -+++ dhcp-4.2.0/client/dhclient.c 2010-07-21 14:33:44.000000000 +0200 -@@ -137,11 +137,11 @@ main(int argc, char **argv) { - /* Make sure that file descriptors 0 (stdin), 1, (stdout), and - 2 (stderr) are open. To do this, we assume that when we - open a file the lowest available file descriptor is used. */ -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 0) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 1) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 2) - log_perror = 0; /* No sense logging to /dev/null. */ - else if (fd != -1) -@@ -488,7 +488,7 @@ main(int argc, char **argv) { - int e; - - oldpid = 0; -- if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) { -+ if ((pidfd = fopen(path_dhclient_pid, "re")) != NULL) { - e = fscanf(pidfd, "%ld\n", &temp); - oldpid = (pid_t)temp; - -@@ -530,7 +530,7 @@ main(int argc, char **argv) { - strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx); - sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name); - -- if ((pidfd = fopen(new_path_dhclient_pid, "r")) != NULL) { -+ if ((pidfd = fopen(new_path_dhclient_pid, "re")) != NULL) { - e = fscanf(pidfd, "%ld\n", &temp); - oldpid = (pid_t)temp; - -@@ -555,7 +555,7 @@ main(int argc, char **argv) { - int dhc_running = 0; - char procfn[256] = ""; - -- if ((pidfp = fopen(path_dhclient_pid, "r")) != NULL) { -+ if ((pidfp = fopen(path_dhclient_pid, "re")) != NULL) { - if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) { - snprintf(procfn,256,"/proc/%u",dhcpid); - dhc_running = (access(procfn, F_OK) == 0); -@@ -2931,7 +2931,7 @@ void rewrite_client_leases () - - if (leaseFile != NULL) - fclose (leaseFile); -- leaseFile = fopen (path_dhclient_db, "w"); -+ leaseFile = fopen (path_dhclient_db, "we"); - if (leaseFile == NULL) { - log_error ("can't create %s: %m", path_dhclient_db); - return; -@@ -3035,7 +3035,7 @@ write_duid(struct data_string *duid) - return DHCP_R_INVALIDARG; - - if (leaseFile == NULL) { /* XXX? */ -- leaseFile = fopen(path_dhclient_db, "w"); -+ leaseFile = fopen(path_dhclient_db, "we"); - if (leaseFile == NULL) { - log_error("can't create %s: %m", path_dhclient_db); - return ISC_R_IOERROR; -@@ -3215,7 +3215,7 @@ int write_client_lease (client, lease, r - return 1; - - if (leaseFile == NULL) { /* XXX */ -- leaseFile = fopen (path_dhclient_db, "w"); -+ leaseFile = fopen (path_dhclient_db, "we"); - if (leaseFile == NULL) { - log_error ("can't create %s: %m", path_dhclient_db); - return 0; -@@ -3668,9 +3668,9 @@ void go_daemon () - close(2); - - /* Reopen them on /dev/null. */ -- open("/dev/null", O_RDWR); -- open("/dev/null", O_RDWR); -- open("/dev/null", O_RDWR); -+ open("/dev/null", O_RDWR | O_CLOEXEC); -+ open("/dev/null", O_RDWR | O_CLOEXEC); -+ open("/dev/null", O_RDWR | O_CLOEXEC); - - write_client_pid_file (); - -@@ -3682,14 +3682,14 @@ void write_client_pid_file () - FILE *pf; - int pfdesc; - -- pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY, 0644); -+ pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644); - - if (pfdesc < 0) { - log_error ("Can't create %s: %m", path_dhclient_pid); - return; - } - -- pf = fdopen (pfdesc, "w"); -+ pf = fdopen (pfdesc, "we"); - if (!pf) - log_error ("Can't fdopen %s: %m", path_dhclient_pid); - else { -diff -up dhcp-4.2.0/common/bpf.c.cloexec dhcp-4.2.0/common/bpf.c ---- dhcp-4.2.0/common/bpf.c.cloexec 2009-11-20 02:48:59.000000000 +0100 -+++ dhcp-4.2.0/common/bpf.c 2010-07-21 14:31:13.000000000 +0200 -@@ -94,7 +94,7 @@ int if_register_bpf (info) - for (b = 0; 1; b++) { - /* %Audit% 31 bytes max. %2004.06.17,Safe% */ - sprintf(filename, BPF_FORMAT, b); -- sock = open (filename, O_RDWR, 0); -+ sock = open (filename, O_RDWR | O_CLOEXEC, 0); - if (sock < 0) { - if (errno == EBUSY) { - continue; -diff -up dhcp-4.2.0/common/discover.c.cloexec dhcp-4.2.0/common/discover.c ---- dhcp-4.2.0/common/discover.c.cloexec 2009-10-28 05:12:29.000000000 +0100 -+++ dhcp-4.2.0/common/discover.c 2010-07-21 14:31:13.000000000 +0200 -@@ -409,7 +409,7 @@ begin_iface_scan(struct iface_conf_list - int len; - int i; - -- ifaces->fp = fopen("/proc/net/dev", "r"); -+ ifaces->fp = fopen("/proc/net/dev", "re"); - if (ifaces->fp == NULL) { - log_error("Error opening '/proc/net/dev' to list interfaces"); - return 0; -@@ -444,7 +444,7 @@ begin_iface_scan(struct iface_conf_list - - #ifdef DHCPv6 - if (local_family == AF_INET6) { -- ifaces->fp6 = fopen("/proc/net/if_inet6", "r"); -+ ifaces->fp6 = fopen("/proc/net/if_inet6", "re"); - if (ifaces->fp6 == NULL) { - log_error("Error opening '/proc/net/if_inet6' to " - "list IPv6 interfaces; %m"); -diff -up dhcp-4.2.0/common/dlpi.c.cloexec dhcp-4.2.0/common/dlpi.c ---- dhcp-4.2.0/common/dlpi.c.cloexec 2009-11-20 02:49:00.000000000 +0100 -+++ dhcp-4.2.0/common/dlpi.c 2010-07-21 14:31:13.000000000 +0200 -@@ -807,7 +807,7 @@ dlpiopen(const char *ifname) { - } - *dp = '\0'; - -- return open (devname, O_RDWR, 0); -+ return open (devname, O_RDWR | O_CLOEXEC, 0); - } - - /* -diff -up dhcp-4.2.0/common/nit.c.cloexec dhcp-4.2.0/common/nit.c ---- dhcp-4.2.0/common/nit.c.cloexec 2009-11-20 02:49:01.000000000 +0100 -+++ dhcp-4.2.0/common/nit.c 2010-07-21 14:31:13.000000000 +0200 -@@ -81,7 +81,7 @@ int if_register_nit (info) - struct strioctl sio; - - /* Open a NIT device */ -- sock = open ("/dev/nit", O_RDWR); -+ sock = open ("/dev/nit", O_RDWR | O_CLOEXEC); - if (sock < 0) - log_fatal ("Can't open NIT device for %s: %m", info -> name); - -diff -up dhcp-4.2.0/common/resolv.c.cloexec dhcp-4.2.0/common/resolv.c ---- dhcp-4.2.0/common/resolv.c.cloexec 2009-11-20 02:49:01.000000000 +0100 -+++ dhcp-4.2.0/common/resolv.c 2010-07-21 14:31:13.000000000 +0200 -@@ -49,7 +49,7 @@ void read_resolv_conf (parse_time) - struct domain_search_list *dp, *dl, *nd; - isc_result_t status; - -- if ((file = open (path_resolv_conf, O_RDONLY)) < 0) { -+ if ((file = open (path_resolv_conf, O_RDONLY | O_CLOEXEC)) < 0) { - log_error ("Can't open %s: %m", path_resolv_conf); - return; - } -diff -up dhcp-4.2.0/common/upf.c.cloexec dhcp-4.2.0/common/upf.c ---- dhcp-4.2.0/common/upf.c.cloexec 2009-11-20 02:49:01.000000000 +0100 -+++ dhcp-4.2.0/common/upf.c 2010-07-21 14:31:13.000000000 +0200 -@@ -77,7 +77,7 @@ int if_register_upf (info) - /* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */ - sprintf(filename, "/dev/pf/pfilt%d", b); - -- sock = open (filename, O_RDWR, 0); -+ sock = open (filename, O_RDWR | O_CLOEXEC, 0); - if (sock < 0) { - if (errno == EBUSY) { - continue; -diff -up dhcp-4.2.0/dst/dst_api.c.cloexec dhcp-4.2.0/dst/dst_api.c ---- dhcp-4.2.0/dst/dst_api.c.cloexec 2009-10-29 01:46:48.000000000 +0100 -+++ dhcp-4.2.0/dst/dst_api.c 2010-07-21 14:31:13.000000000 +0200 -@@ -437,7 +437,7 @@ dst_s_write_private_key(const DST_KEY *k - PRIVATE_KEY, PATH_MAX); - - /* Do not overwrite an existing file */ -- if ((fp = dst_s_fopen(file, "w", 0600)) != NULL) { -+ if ((fp = dst_s_fopen(file, "we", 0600)) != NULL) { - int nn; - if ((nn = fwrite(encoded_block, 1, len, fp)) != len) { - EREPORT(("dst_write_private_key(): Write failure on %s %d != %d errno=%d\n", -@@ -494,7 +494,7 @@ dst_s_read_public_key(const char *in_nam - * flags, proto, alg stored as decimal (or hex numbers FIXME). - * (FIXME: handle parentheses for line continuation.) - */ -- if ((fp = dst_s_fopen(name, "r", 0)) == NULL) { -+ if ((fp = dst_s_fopen(name, "re", 0)) == NULL) { - EREPORT(("dst_read_public_key(): Public Key not found %s\n", - name)); - return (NULL); -@@ -620,7 +620,7 @@ dst_s_write_public_key(const DST_KEY *ke - return (0); - } - /* create public key file */ -- if ((fp = dst_s_fopen(filename, "w+", 0644)) == NULL) { -+ if ((fp = dst_s_fopen(filename, "w+e", 0644)) == NULL) { - EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n", - filename, errno)); - return (0); -@@ -854,7 +854,7 @@ dst_s_read_private_key_file(char *name, - return (0); - } - /* first check if we can find the key file */ -- if ((fp = dst_s_fopen(filename, "r", 0)) == NULL) { -+ if ((fp = dst_s_fopen(filename, "re", 0)) == NULL) { - EREPORT(("dst_s_read_private_key_file: Could not open file %s in directory %s\n", - filename, dst_path[0] ? dst_path : - (char *) getcwd(NULL, PATH_MAX - 1))); -diff -up dhcp-4.2.0/dst/prandom.c.cloexec dhcp-4.2.0/dst/prandom.c ---- dhcp-4.2.0/dst/prandom.c.cloexec 2009-11-20 02:49:01.000000000 +0100 -+++ dhcp-4.2.0/dst/prandom.c 2010-07-21 14:31:13.000000000 +0200 -@@ -269,7 +269,7 @@ get_dev_random(u_char *output, unsigned - - s = stat("/dev/random", &st); - if (s == 0 && S_ISCHR(st.st_mode)) { -- if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK)) != -1) { -+ if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK | O_CLOEXEC)) != -1) { - if ((n = read(fd, output, size)) < 0) - n = 0; - close(fd); -@@ -480,7 +480,7 @@ digest_file(dst_work *work) - work->file_digest = dst_free_key(work->file_digest); - return (0); - } -- if ((fp = fopen(name, "r")) == NULL) -+ if ((fp = fopen(name, "re")) == NULL) - return (0); - for (no = 0; (i = fread(buf, sizeof(*buf), sizeof(buf), fp)) > 0; - no += i) -diff -up dhcp-4.2.0/omapip/trace.c.cloexec dhcp-4.2.0/omapip/trace.c ---- dhcp-4.2.0/omapip/trace.c.cloexec 2010-06-01 19:29:59.000000000 +0200 -+++ dhcp-4.2.0/omapip/trace.c 2010-07-21 14:36:48.000000000 +0200 -@@ -141,10 +141,10 @@ isc_result_t trace_begin (const char *fi - return DHCP_R_INVALIDARG; - } - -- traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL, 0600); -+ traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL | O_CLOEXEC, 0600); - if (traceoutfile < 0 && errno == EEXIST) { - log_error ("WARNING: Overwriting trace file \"%s\"", filename); -- traceoutfile = open (filename, O_WRONLY | O_EXCL | O_TRUNC, -+ traceoutfile = open (filename, O_WRONLY | O_EXCL | O_TRUNC | O_CLOEXEC, - 0600); - } - -@@ -431,7 +431,7 @@ void trace_file_replay (const char *file - isc_result_t result; - int len; - -- traceinfile = fopen (filename, "r"); -+ traceinfile = fopen (filename, "re"); - if (!traceinfile) { - log_error("Can't open tracefile %s: %m", filename); - return; -diff -up dhcp-4.2.0/relay/dhcrelay.c.cloexec dhcp-4.2.0/relay/dhcrelay.c ---- dhcp-4.2.0/relay/dhcrelay.c.cloexec 2010-02-17 21:33:55.000000000 +0100 -+++ dhcp-4.2.0/relay/dhcrelay.c 2010-07-21 14:31:39.000000000 +0200 -@@ -177,11 +177,11 @@ main(int argc, char **argv) { - /* Make sure that file descriptors 0(stdin), 1,(stdout), and - 2(stderr) are open. To do this, we assume that when we - open a file the lowest available file descriptor is used. */ -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 0) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 1) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 2) - log_perror = 0; /* No sense logging to /dev/null. */ - else if (fd != -1) -@@ -520,12 +520,12 @@ main(int argc, char **argv) { - exit(0); - - pfdesc = open(path_dhcrelay_pid, -- O_CREAT | O_TRUNC | O_WRONLY, 0644); -+ O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644); - - if (pfdesc < 0) { - log_error("Can't create %s: %m", path_dhcrelay_pid); - } else { -- pf = fdopen(pfdesc, "w"); -+ pf = fdopen(pfdesc, "we"); - if (!pf) - log_error("Can't fdopen %s: %m", - path_dhcrelay_pid); -diff -up dhcp-4.2.0/server/confpars.c.cloexec dhcp-4.2.0/server/confpars.c ---- dhcp-4.2.0/server/confpars.c.cloexec 2010-03-24 22:49:47.000000000 +0100 -+++ dhcp-4.2.0/server/confpars.c 2010-07-21 14:31:39.000000000 +0200 -@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char - } - #endif - -- if ((file = open (filename, O_RDONLY)) < 0) { -+ if ((file = open (filename, O_RDONLY | O_CLOEXEC)) < 0) { - if (leasep) { - log_error ("Can't open lease database %s: %m --", - path_dhcpd_db); -diff -up dhcp-4.2.0/server/db.c.cloexec dhcp-4.2.0/server/db.c ---- dhcp-4.2.0/server/db.c.cloexec 2010-02-17 21:33:55.000000000 +0100 -+++ dhcp-4.2.0/server/db.c 2010-07-21 14:31:39.000000000 +0200 -@@ -1035,7 +1035,7 @@ void db_startup (testp) - } - #endif - if (!testp) { -- db_file = fopen (path_dhcpd_db, "a"); -+ db_file = fopen (path_dhcpd_db, "ae"); - if (!db_file) - log_fatal ("Can't open %s for append.", path_dhcpd_db); - expire_all_pools (); -@@ -1083,12 +1083,12 @@ int new_lease_file () - path_dhcpd_db, (int)t) >= sizeof newfname) - log_fatal("new_lease_file: lease file path too long"); - -- db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT, 0664); -+ db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, 0664); - if (db_fd < 0) { - log_error ("Can't create new lease file: %m"); - return 0; - } -- if ((new_db_file = fdopen(db_fd, "w")) == NULL) { -+ if ((new_db_file = fdopen(db_fd, "we")) == NULL) { - log_error("Can't fdopen new lease file: %m"); - close(db_fd); - goto fdfail; -diff -up dhcp-4.2.0/server/dhcpd.c.cloexec dhcp-4.2.0/server/dhcpd.c ---- dhcp-4.2.0/server/dhcpd.c.cloexec 2010-06-01 19:29:59.000000000 +0200 -+++ dhcp-4.2.0/server/dhcpd.c 2010-07-21 14:31:39.000000000 +0200 -@@ -268,11 +268,11 @@ main(int argc, char **argv) { - /* Make sure that file descriptors 0 (stdin), 1, (stdout), and - 2 (stderr) are open. To do this, we assume that when we - open a file the lowest available file descriptor is used. */ -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 0) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 1) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 2) - log_perror = 0; /* No sense logging to /dev/null. */ - else if (fd != -1) -@@ -780,7 +780,7 @@ main(int argc, char **argv) { - #endif /* PARANOIA */ - - /* Read previous pid file. */ -- if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) { -+ if ((i = open (path_dhcpd_pid, O_RDONLY | O_CLOEXEC)) >= 0) { - status = read(i, pbuf, (sizeof pbuf) - 1); - close (i); - if (status > 0) { -@@ -798,7 +798,7 @@ main(int argc, char **argv) { - } - - /* Write new pid file. */ -- if ((i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC, 0644)) >= 0) { -+ if ((i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644)) >= 0) { - sprintf(pbuf, "%d\n", (int) getpid()); - IGNORE_RET (write(i, pbuf, strlen(pbuf))); - close(i); -@@ -824,9 +824,9 @@ main(int argc, char **argv) { - close(2); - - /* Reopen them on /dev/null. */ -- open("/dev/null", O_RDWR); -- open("/dev/null", O_RDWR); -- open("/dev/null", O_RDWR); -+ open("/dev/null", O_RDWR | O_CLOEXEC); -+ open("/dev/null", O_RDWR | O_CLOEXEC); -+ open("/dev/null", O_RDWR | O_CLOEXEC); - log_perror = 0; /* No sense logging to /dev/null. */ - - IGNORE_RET (chdir("/")); -diff -up dhcp-4.2.0/server/ldap.c.cloexec dhcp-4.2.0/server/ldap.c ---- dhcp-4.2.0/server/ldap.c.cloexec 2010-03-25 16:26:58.000000000 +0100 -+++ dhcp-4.2.0/server/ldap.c 2010-07-21 14:31:39.000000000 +0200 -@@ -685,7 +685,7 @@ ldap_start (void) - - if (ldap_debug_file != NULL && ldap_debug_fd == -1) - { -- if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY, -+ if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, - S_IRUSR | S_IWUSR)) < 0) - log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file, - strerror (errno)); diff --git a/dhcp-4.2.1-P1-CVE-2011-0997.patch b/dhcp-4.2.1-P1-CVE-2011-0997.patch deleted file mode 100644 index 1a0243c..0000000 --- a/dhcp-4.2.1-P1-CVE-2011-0997.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up dhcp-4.2.1-P1/client/dhclient.c.CVE-2011-0997 dhcp-4.2.1-P1/client/dhclient.c ---- dhcp-4.2.1-P1/client/dhclient.c.CVE-2011-0997 2011-04-06 20:21:43.000000000 +0200 -+++ dhcp-4.2.1-P1/client/dhclient.c 2011-04-06 20:22:31.000000000 +0200 -@@ -4545,11 +4545,11 @@ static int check_option_values(struct un - if ((universe == NULL) || (universe == &dhcp_universe)) { - switch(opt) { - case DHO_HOST_NAME: -- case DHO_DOMAIN_NAME: - case DHO_NIS_DOMAIN: - case DHO_NETBIOS_SCOPE: - return check_domain_name(ptr, len, 0); - break; -+ case DHO_DOMAIN_NAME: /* accept a list for compatibiliy */ - case DHO_DOMAIN_SEARCH: - return check_domain_name_list(ptr, len, 0); - break; diff --git a/dhcp-4.2.1-invalid-dhclient-conf.patch b/dhcp-4.2.1-invalid-dhclient-conf.patch deleted file mode 100644 index eeeea84..0000000 --- a/dhcp-4.2.1-invalid-dhclient-conf.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up dhcp-4.2.1b1/client/dhclient.conf.supersede dhcp-4.2.1b1/client/dhclient.conf ---- dhcp-4.2.1b1/client/dhclient.conf.supersede 2010-09-15 01:03:56.000000000 +0200 -+++ dhcp-4.2.1b1/client/dhclient.conf 2011-01-27 18:38:28.000000000 +0100 -@@ -4,7 +4,7 @@ send dhcp-lease-time 3600; - supersede domain-search "fugue.com", "home.vix.com"; - prepend domain-name-servers 127.0.0.1; - request subnet-mask, broadcast-address, time-offset, routers, -- domain-name, domain-name-servers, host-name; -+ domain-search, domain-name-servers, host-name; - require subnet-mask, domain-name-servers; - timeout 60; - retry 60; diff --git a/dhcp-4.2.3-paranoia.patch b/dhcp-4.2.3-paranoia.patch index 4139ce9..e6c1576 100644 --- a/dhcp-4.2.3-paranoia.patch +++ b/dhcp-4.2.3-paranoia.patch @@ -1,48 +1,7 @@ -diff -up dhcp-4.2.3/server/dhcpd.c.paranoia dhcp-4.2.3/server/dhcpd.c ---- dhcp-4.2.3/server/dhcpd.c.paranoia 2011-10-26 19:10:08.162925489 +0200 -+++ dhcp-4.2.3/server/dhcpd.c 2011-10-26 19:12:34.541095509 +0200 -@@ -699,11 +699,11 @@ main(int argc, char **argv) { - - group_write_hook = group_writer; - -- /* Start up the database... */ -- db_startup (lftest); -- -- if (lftest) -+ if (lftest) { -+ /* Start up the database... */ -+ db_startup (lftest); - exit (0); -+ } - - /* Discover all the network interfaces and initialize them. */ - discover_interfaces(DISCOVER_SERVER); -@@ -743,24 +743,6 @@ main(int argc, char **argv) { - #if defined (TRACING) - trace_seed_stash (trace_srandom, seed + cur_time); - #endif -- postdb_startup (); -- --#ifdef DHCPv6 -- /* -- * Set server DHCPv6 identifier. -- * See dhcpv6.c for discussion of setting DUID. -- */ -- if (set_server_duid_from_option() == ISC_R_SUCCESS) { -- write_server_duid(); -- } else { -- if (!server_duid_isset()) { -- if (generate_new_server_duid() != ISC_R_SUCCESS) { -- log_fatal("Unable to set server identifier."); -- } -- write_server_duid(); -- } -- } --#endif /* DHCPv6 */ - - #ifndef DEBUG - if (daemon) { -@@ -771,22 +753,6 @@ main(int argc, char **argv) { +diff -up dhcp-4.2.3-P1/server/dhcpd.c.paranoia dhcp-4.2.3-P1/server/dhcpd.c +--- dhcp-4.2.3-P1/server/dhcpd.c.paranoia 2011-12-20 18:02:26.000000000 +0100 ++++ dhcp-4.2.3-P1/server/dhcpd.c 2011-12-20 18:03:43.840037108 +0100 +@@ -771,22 +771,6 @@ main(int argc, char **argv) { exit (0); } @@ -65,7 +24,7 @@ diff -up dhcp-4.2.3/server/dhcpd.c.paranoia dhcp-4.2.3/server/dhcpd.c /* * Deal with pid files. If the user told us * not to write a file we don't read one either -@@ -823,6 +789,42 @@ main(int argc, char **argv) { +@@ -823,6 +807,22 @@ main(int argc, char **argv) { } } @@ -85,26 +44,6 @@ diff -up dhcp-4.2.3/server/dhcpd.c.paranoia dhcp-4.2.3/server/dhcpd.c + } +#endif /* PARANOIA */ + -+ db_startup(lftest); -+ postdb_startup (); -+ -+#ifdef DHCPv6 -+ /* -+ * Set server DHCPv6 identifier. -+ * See dhcpv6.c for discussion of setting DUID. -+ */ -+ if (set_server_duid_from_option() == ISC_R_SUCCESS) { -+ write_server_duid(); -+ } else { -+ if (!server_duid_isset()) { -+ if (generate_new_server_duid() != ISC_R_SUCCESS) { -+ log_fatal("Unable to set server identifier."); -+ } -+ write_server_duid(); -+ } -+ } -+#endif /* DHCPv6 */ -+ /* If we were requested to log to stdout on the command line, keep doing so; otherwise, stop. */ if (log_perror == -1) diff --git a/dhcp.spec b/dhcp.spec index a268520..031e939 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -19,7 +19,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.2.3 -Release: 5.%{patchver}%{?dist} +Release: 6.%{patchver}%{?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. @@ -28,7 +28,7 @@ Epoch: 12 License: ISC Group: System Environment/Daemons URL: http://isc.org/products/DHCP/ -Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{VERSION}.tar.gz +Source0: ftp://ftp.isc.org/isc/dhcp/%{VERSION}/dhcp-%{VERSION}.tar.gz Source1: dhcpd.init Source2: dhcpd6.init Source3: dhcrelay.init @@ -641,6 +641,12 @@ fi %{_initddir}/dhcrelay %changelog +* Mon Jan 23 2012 Jiri Popelka - 12:4.2.3-6.P2 +- revert change made in 4.2.3-2 because of failing failover inicialization (#765967) + the procedure is now: + init lease file, init failover, init PID file, change effective user/group ID +- dhclient-script: allow static route with a 0.0.0.0 next-hop address (#769463) + * Fri Jan 13 2012 Jiri Popelka - 12:4.2.3-5.P2 - 4.2.3-P2: fix for CVE-2011-4868 (#781246)