~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

Viewing changes to debian/ntpdate.if-up

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-01-05 21:10:03 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090105211003-mh6zc3um4k1uhsj7
Tags: 1:4.2.4p4+dfsg-8
It did not properly check the return value of EVP_VerifyFinal
which results in an malformed DSA signature being treated as
a good signature rather than as an error.  (CVE-2009-0021)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
6
 
 
7
# This is a heuristic:  The idea is that if a static interface is brought
 
8
# up, that is a major event, and we can put in some extra effort to fix
 
9
# the system time.  Feel free to change this, especially if you regularly
 
10
# bring up new network interfaces.
 
11
if [ "$METHOD" = static ]; then
 
12
        OPTS="-b"
 
13
fi
 
14
 
 
15
if [ "$METHOD" = loopback ]; then
 
16
        exit 0
 
17
fi
 
18
 
 
19
# Check whether ntpdate was removed but not purged; it's useless to wait for 
 
20
# it in that case.
 
21
if [ ! -x /usr/sbin/ntpdate-debian ] && [ -d /usr/sbin ]; then
 
22
        exit 0
 
23
fi
 
24
 
 
25
(
 
26
 
 
27
# This is for the case that /usr will be mounted later.
 
28
if [ -r /lib/udev/hotplug.functions ]; then
 
29
        . /lib/udev/hotplug.functions
 
30
        wait_for_file /usr/sbin/ntpdate-debian
 
31
fi
 
32
 
 
33
LOCKFILE=/var/lock/ntpdate
 
34
 
 
35
# Avoid running more than one at a time
 
36
if [ -x /usr/bin/lockfile-create ]; then
 
37
        lockfile-create $LOCKFILE
 
38
        lockfile-touch $LOCKFILE &
 
39
        LOCKTOUCHPID="$!"
 
40
fi
 
41
 
 
42
/usr/sbin/ntpdate-debian -s $OPTS 2>/dev/null || :
 
43
 
 
44
if [ -x /usr/bin/lockfile-create ] ; then
 
45
        kill $LOCKTOUCHPID
 
46
        lockfile-remove $LOCKFILE
 
47
fi
 
48
 
 
49
) &