* Build ntpq and libntpq.a with NTP_HARD_*FLAGS. perlinger@ntp.org
* Fix bug in the override portion of the compiler hardening macro. HStenn.
* record_raw_stats(): Log entire packet. Log writes. HStenn.
+* sntp: tweak key file logging. HStenn.
---
(4.2.8p10) 2017/03/21 Released by Harlan Stenn <stenn@ntp.org>
{
FILE *keyf = fopen(keyfile, "r");
struct key *prev = NULL;
- int scan_cnt, line_cnt = 0;
+ int scan_cnt, line_cnt = 1;
char kbuf[200];
char keystring[129];
}
}
act->typei = keytype_from_text(act->typen, NULL);
- if (0 == act->typei)
+ if (0 == act->typei) {
+ printf("%s: line %d: key %d, %s not supported - ignoring\n",
+ keyfile, line_cnt,
+ act->key_id, act->typen);
goodline = 0; /* it's bad */
+ }
}
if (goodline) {
act->next = NULL;
prev = act;
key_cnt++;
} else {
- msyslog(LOG_DEBUG, "auth_init: scanf %d items, skipping line %d.",
- scan_cnt, line_cnt);
+ if (debug) {
+ printf("auth_init: scanf %d items, skipping line %d.",
+ scan_cnt, line_cnt);
+ }
free(act);
}
line_cnt++;
{
struct addrinfo hints; /* Local copy is OK */
struct dns_ctx *ctx;
- long l;
char * name_copy;
size_t name_sz;
size_t octets;
ctx->key_id = OPT_VALUE_AUTHENTICATION;
get_key(ctx->key_id, &ctx->key);
if (NULL == ctx->key) {
- fprintf(stderr, "%s: Authentication with keyID %d requested, but no matching keyID found in <%s>!",
+ fprintf(stderr, "%s: Authentication with keyID %d requested, but no matching keyID found in <%s>!\n",
progname, ctx->key_id, OPT_ARG(KEYFILE));
exit(1);
}