File ntp-4.2.4-w32-time-authentification.fix.patch of Package ntp
Index: libntp/authreadkeys.c
===================================================================
--- libntp/authreadkeys.c (revision 3367)
+++ libntp/authreadkeys.c (working copy)
@@ -150,7 +150,7 @@
} else {
switch(keytype) {
case KEY_TYPE_MD5:
- if (!authsetkey(keyno, keytype,
+ if (!keyfile_authprov_setkey(be, keyno, keytype,
(u_char *)token, strlen(token), 0))
msyslog(LOG_ERR,
"format/parity error for MD5 key %ld, not used",
Index: libntp/authkeys.c
===================================================================
--- libntp/authkeys.c (revision 3367)
+++ libntp/authkeys.c (working copy)
@@ -479,6 +479,19 @@
return (1);
}
+int
+keyfile_authprov_setkey(
+ struct authkey_be *be,
+ keyid_t keyno,
+ int type,
+ const u_char *key,
+ const int len,
+ u_long trust
+ )
+{
+ return internal_authprov_setkey(be, keyno, type, key, len, trust);
+}
+
/*
* keyfile_authprov_init - constructor for keyfile provider
*/
@@ -503,7 +516,7 @@
keyfile_be->be.havekey = internal_authprov_havekey;
keyfile_be->be.trust = internal_authprov_trust;
keyfile_be->be.istrusted = internal_authprov_istrusted;
- keyfile_be->be.setkey = internal_authprov_setkey;
+ keyfile_be->be.setkey = keyfile_authprov_setkey;
keyfile_be->be.refresh = keyfile_authprov_refresh;
keyfile_be->be.stats = internal_authprov_stats;
keyfile_be->be.reset_stats = internal_authprov_reset_stats;
Index: include/ntp_authprov.h
===================================================================
--- include/ntp_authprov.h (revision 3367)
+++ include/ntp_authprov.h (working copy)
@@ -61,6 +61,7 @@
extern struct authkey_be *keyfile_authprov_init P((int, int, const char *[]));
extern void keyfile_authprov_delkeys P((struct authkey_be *be));
extern int keyfile_authprov_readkeys P((struct authkey_be *be, const char *file));
+extern int keyfile_authprov_setkey P((struct authkey_be *be, keyid_t keyno, int type, const u_char *key, const int len, u_long trust));
/*
* Internal autokey authentication provider