~ubuntu-branches/ubuntu/natty/ntp/natty

« back to all changes in this revision

Viewing changes to libntp/lib_strbuf.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-11-30 11:14:31 UTC
  • mfrom: (4.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20101130111431-7r00o0ck9qzwmm9f
Tags: 1:4.2.6.p2+dfsg-1ubuntu1
* Merge from debian unstable, remaining changes are:
  + debian/ntp.conf, debian/ntpdate.default: Change default server to
    ntp.ubuntu.com.
  + debian/ntpdate.ifup: Stop ntp before running ntpdate when an interface
    comes up, then start again afterwards.
  + debian/ntp.init, debian/rules: Only stop when entering single user mode.
  + Add enforcing AppArmor profile (LP: #382905):
    - debian/control: add Conflicts/Replaces on apparmor-profiles <
      2.3.1+1403-0ubuntu10 (since we are now shipping usr.sbin.ntpd) and
      apparmor < 2.3.1+1403-0ubuntu10 (since we are now shipping tunables/ntpd)
    - debian/control: add Suggests on apparmor
    - debian/ntp.dirs: add apparmor directories
    - debian/ntp.preinst: force complain on certain upgrades
    - debian/ntp.postinst: reload apparmor profile
    - debian/ntp.postrm: remove the force-complain file
    - add debian/apparmor-profile*
    - debian/rules: install apparmor-profile and apparmor-profile.tunable
    - debian/README.Debian: add note on AppArmor
  + debian/{control,rules}: add and enable hardened build for PIE
    (Debian bug 542721).
  + debian/apparmor-profile: adjust location of drift files (LP: #456308)
  + debian/rules, debian/ntp.dirs, debian/source_ntp.py: Add apport hook.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * lib_strbuf - library string storage
3
3
 */
 
4
#ifdef HAVE_CONFIG_H
 
5
#include <config.h>
 
6
#endif
4
7
 
 
8
#include <isc/net.h>
 
9
#include <isc/result.h>
5
10
#include "ntp_stdlib.h"
6
11
#include "lib_strbuf.h"
7
12
 
10
15
 */
11
16
char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
12
17
int lib_nextbuf;
 
18
int ipv4_works;
 
19
int ipv6_works;
13
20
int lib_inited = 0;
14
21
 
15
22
/*
19
26
init_lib(void)
20
27
{
21
28
        lib_nextbuf = 0;
 
29
        ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4());
 
30
        ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6());
22
31
        lib_inited = 1;
23
32
}