diff -ruN e-smith-ntp-2.2.0.old/root/etc/e-smith/templates/var/service/ntpd/env/MEMLIMIT e-smith-ntp-2.2.0/root/etc/e-smith/templates/var/service/ntpd/env/MEMLIMIT --- e-smith-ntp-2.2.0.old/root/etc/e-smith/templates/var/service/ntpd/env/MEMLIMIT 2005-08-31 14:27:23.000000000 -0700 +++ e-smith-ntp-2.2.0/root/etc/e-smith/templates/var/service/ntpd/env/MEMLIMIT 2013-02-02 22:07:02.000000000 -0800 @@ -1 +1,14 @@ -{ $OUT = ($ntpd{MemLimit} > "6000000") ? $ntpd{MemLimit} : "6000000" } +{ + # memory limit to catch any memory leak before it kills the system + use constant MIN_MEMORY_LIMIT => 35000000; + + # If there is a memory limit in the database and it is below the minimum, delete it. + if (defined $ntpd{MemLimit} && $ntpd{MemLimit} < MIN_MEMORY_LIMIT) + { + $DB->get_prop_and_delete('ntpd','MemLimit'); + delete $ntpd{MemLimit}; + } + + $OUT = $ntpd{MemLimit} || MIN_MEMORY_LIMIT; +} + diff -ruN e-smith-ntp-2.4.0.old/root/etc/e-smith/db/configuration/defaults/ntpd/MemLimit e-smith-ntp-2.4.0/root/etc/e-smith/db/configuration/defaults/ntpd/MemLimit --- e-smith-ntp-2.4.0.old/root/etc/e-smith/db/configuration/defaults/ntpd/MemLimit 2008-10-07 10:36:26.000000000 -0700 +++ e-smith-ntp-2.4.0/root/etc/e-smith/db/configuration/defaults/ntpd/MemLimit 1969-12-31 16:00:00.000000000 -0800 @@ -1 +0,0 @@ -12000000 diff -ruN e-smith-ntp-2.4.0.old/root/etc/e-smith/db/configuration/migrate/ntpMemLimit e-smith-ntp-2.4.0/root/etc/e-smith/db/configuration/migrate/ntpMemLimit --- e-smith-ntp-2.4.0.old/root/etc/e-smith/db/configuration/migrate/ntpMemLimit 2008-10-07 10:36:26.000000000 -0700 +++ e-smith-ntp-2.4.0/root/etc/e-smith/db/configuration/migrate/ntpMemLimit 1969-12-31 16:00:00.000000000 -0800 @@ -1,5 +0,0 @@ -{ - my $ntpd = $DB->get('ntpd'); - return unless $ntpd; - $ntpd->set_prop('MemLimit', 12000000) if $ntpd->prop('MemLimit') < 12000000; -}