patch-clients_upsstats_c 675 B

12345678910111213141516171819202122
  1. $OpenBSD: patch-clients_upsstats_c,v 1.8 2010/03/31 22:11:11 sthen Exp $
  2. --- clients/upsstats.c.orig Thu Feb 11 21:43:13 2010
  3. +++ clients/upsstats.c Sat Mar 20 23:18:11 2010
  4. @@ -844,7 +844,7 @@ static void display_template(const char *tfn)
  5. {
  6. char fn[SMALLBUF], buf[LARGEBUF];
  7. - snprintf(fn, sizeof(fn), "%s/%s", confpath(), tfn);
  8. + snprintf(fn, sizeof(fn), "%s/%s", cgiconfpath(), tfn);
  9. tf = fopen(fn, "r");
  10. @@ -964,7 +964,7 @@ static void load_hosts_conf(void)
  11. char fn[SMALLBUF];
  12. PCONF_CTX_t ctx;
  13. - snprintf(fn, sizeof(fn), "%s/hosts.conf", CONFPATH);
  14. + snprintf(fn, sizeof(fn), "%s/hosts.conf", cgiconfpath());
  15. pconf_init(&ctx, upsstats_hosts_err);