Browse Source

Added HTP servers verification during build.

Upgraded DHCP client, and verified DHCP requests anonimity
(in dhcpcd 5.x.x, "hostname" must not be present in dhcpcd.conf).
Maxim Kammerer 14 năm trước cách đây
mục cha
commit
cadeafa282
4 tập tin đã thay đổi với 33 bổ sung8 xóa
  1. 1 1
      conf/version
  2. 5 2
      doc/changelog.txt
  3. 5 5
      src/etc/dhcpcd.conf
  4. 22 0
      src/root/setup-copy

+ 1 - 1
conf/version

@@ -1 +1 @@
-2010.1
+2010.2

+ 5 - 2
doc/changelog.txt

@@ -1,5 +1,5 @@
-2010-05-05
-  + 2010.0 inital release
+20XX-XX-XX
+  + 2010.2 release
 
 2010-11-15
   + 2010.1 release
@@ -38,3 +38,6 @@
 
   * Applications list improvements (Evince+Postscript/DejaVu, Eboard, ...)
   * Provisional MP4[H.264+Ogg[Vorbis/Speex]] lightweight video encoding support
+
+2010-05-05
+  + 2010.0 inital release

+ 5 - 5
src/etc/dhcpcd.conf

@@ -1,10 +1,10 @@
-# NOTE: dhcpcd still insists on putting
-# a "search" in /etc/resolv.conf
+# Options for direct use of dhcpcd (NetworkManager replaces dhcpcd-run-hooks)
+# NOTE: dhcpcd still insists on putting a "search" in /etc/resolv.conf
 option domain_name_servers, ntp_servers
-#option interface_mtu
+# option interface_mtu
 
-# don't send hostname to register in DNS
-hostname
+# don't send a hostname to register in DNS
+# hostname
 
 # don't identify as dhcpcd <ver>
 vendorclassid

+ 22 - 0
src/root/setup-copy

@@ -201,6 +201,28 @@ rm -r /usr/lib/python*/
 rm -r ${dbpython}
 
 
+sinfo "Verifying HTP servers"
+htpservers=`sed -n 's/^SERVERS="\(.*\)"$/\1/p' /etc/conf.d/htpdate`
+htpdates=
+for htp in ${htpservers}; do
+    echo -ne "${htp}:\t"
+
+    # Will fail if the server doesn't provide a timestamp
+    htpdate=`curl -sI ${htp} | grep '^Date: ' | sed 's/^Date: //'`
+    echo "${htpdate}"
+
+    htpdates="${htpdates} "`date +%s -ud "${htpdate}"`
+done
+
+htpmin=`echo ${htpdates} | tr ' ' '\n' | sort -n | head -n 1`
+htpmax=`echo ${htpdates} | tr ' ' '\n' | sort -n | tail -n 1`
+
+if [ $[${htpmax} - ${htpmin}] -gt 60 ]; then
+    echo "HTP servers disagreement > 1min, fix /etc/conf.d/htpdate"
+    false
+fi
+
+
 # Done here because cache may be recreated after "src" phase
 sinfo "Trimming icons cache"
 find /usr/share/icons -mindepth 1 -maxdepth 1 -type d \