Portable build framework for OpenNTPD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

8 years ago
8 years ago
8 years ago
  1. From 00fff5a8c36c3b3574abf8bd4bb1a558d1f8232d Mon Sep 17 00:00:00 2001
  2. From: Brent Cook <busterb@gmail.com>
  3. Date: Thu, 1 Jan 2015 07:18:11 -0600
  4. Subject: [PATCH 06/12] allow overriding default user and file locations
  5. Allow the build process to override the default ntpd file paths and
  6. default user.
  7. ---
  8. src/usr.sbin/ntpd/ntpd.h | 18 +++++++++++++++---
  9. 1 file changed, 15 insertions(+), 3 deletions(-)
  10. diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h
  11. index 1d46c6c..dfcaf33 100644
  12. --- a/src/usr.sbin/ntpd/ntpd.h
  13. +++ b/src/usr.sbin/ntpd/ntpd.h
  14. @@ -35,10 +35,20 @@
  15. #define MAXIMUM(a, b) ((a) > (b) ? (a) : (b))
  16. +#ifndef NTPD_USER
  17. #define NTPD_USER "_ntp"
  18. -#define CONFFILE "/etc/ntpd.conf"
  19. -#define DRIFTFILE "/var/db/ntpd.drift"
  20. -#define CTLSOCKET "/var/run/ntpd.sock"
  21. +#endif
  22. +
  23. +#ifndef SYSCONFDIR
  24. +#define SYSCONFDIR "/etc"
  25. +#endif
  26. +#define CONFFILE SYSCONFDIR "/ntpd.conf"
  27. +
  28. +#ifndef LOCALSTATEDIR
  29. +#define LOCALSTATEDIR "/var"
  30. +#endif
  31. +#define DRIFTFILE LOCALSTATEDIR "/db/ntpd.drift"
  32. +#define CTLSOCKET LOCALSTATEDIR "/run/ntpd.sock"
  33. #if defined(SO_SETFIB)
  34. #define SO_RTABLE SO_SETFIB
  35. @@ -86,7 +96,9 @@
  36. #define CONSTRAINT_PORT "443" /* HTTPS port */
  37. #define CONSTRAINT_MAXHEADERLENGTH 8192
  38. #define CONSTRAINT_PASSFD (STDERR_FILENO + 1)
  39. +#ifndef CONSTRAINT_CA
  40. #define CONSTRAINT_CA "/etc/ssl/cert.pem"
  41. +#endif
  42. enum client_state {
  43. STATE_NONE,
  44. --
  45. 2.7.0