security/zkt tweaks:

- https homepage
- time_t printf
- fix stray semicolon in if
- stop using dnssec-keygen -r, it was removed after BIND 9.12.
I don't have a working setup to validate things so I'm not sure if this
is enough to fix with the current version of bind+tools in ports so more
work maybe needed, but at least it can't work without this.
This commit is contained in:
sthen 2020-02-20 11:21:13 +00:00
parent 876d688b84
commit 5977fb9091
9 changed files with 116 additions and 18 deletions

View File

@ -1,12 +1,13 @@
# $OpenBSD: Makefile,v 1.15 2019/07/17 14:39:42 danj Exp $
# $OpenBSD: Makefile,v 1.16 2020/02/20 11:21:13 sthen Exp $
COMMENT= DNSsec Zone Key Tool
DISTNAME= zkt-1.1.4
CATEGORIES= security
REVISION= 1
REVISION= 2
HOMEPAGE= http://www.hznet.de/dns/zkt/
# also https://github.com/hzuleger/ZKT http://www.zonekeytool.de/
HOMEPAGE= https://www.hznet.de/dns/zkt/
# BSD
PERMIT_PACKAGE= Yes

View File

@ -0,0 +1,41 @@
$OpenBSD: patch-dki_c,v 1.1 2020/02/20 11:21:13 sthen Exp $
patch away use of -r, previously used to set the path to a /dev/random-like file,
but not supported in dnssec-keygen after BIND 9.12
Index: dki.c
--- dki.c.orig
+++ dki.c
@@ -242,7 +242,6 @@ dki_t *dki_new (const char *dir, const char *name, int
{
char cmdline[511+1];
char fname[254+1];
- char randfile[254+1];
FILE *fp;
int len;
char *flag = "";
@@ -252,20 +251,16 @@ dki_t *dki_new (const char *dir, const char *name, int
if ( ksk )
flag = "-f KSK";
- randfile[0] = '\0';
- if ( rfile && *rfile )
- snprintf (randfile, sizeof (randfile), "-r %.250s ", rfile);
-
#if defined(BIND_VERSION) && BIND_VERSION < 90902
if ( algo == DK_ALGO_RSA || algo == DK_ALGO_RSASHA1 || algo == DK_ALGO_RSASHA256 || algo == DK_ALGO_RSASHA512 )
expflag = "-e ";
#endif
if ( dir && *dir )
- snprintf (cmdline, sizeof (cmdline), "cd %s ; %s %s%s%s-n ZONE -a %s -b %d %s %s 2>&1",
- dir, KEYGENCMD, KEYGEN_COMPMODE, randfile, expflag, dki_algo2str(algo), bitsize, flag, name);
+ snprintf (cmdline, sizeof (cmdline), "cd %s ; %s %s%s-n ZONE -a %s -b %d %s %s 2>&1",
+ dir, KEYGENCMD, KEYGEN_COMPMODE, expflag, dki_algo2str(algo), bitsize, flag, name);
else
- snprintf (cmdline, sizeof (cmdline), "%s %s%s%s-n ZONE -a %s -b %d %s %s 2>&1",
- KEYGENCMD, KEYGEN_COMPMODE, randfile, expflag, dki_algo2str(algo), bitsize, flag, name);
+ snprintf (cmdline, sizeof (cmdline), "%s %s%s-n ZONE -a %s -b %d %s %s 2>&1",
+ KEYGENCMD, KEYGEN_COMPMODE, expflag, dki_algo2str(algo), bitsize, flag, name);
dbg_msg (cmdline);

View File

@ -1,6 +1,8 @@
$OpenBSD: patch-man_dnssec-zkt_8,v 1.2 2010/06/20 14:01:35 jakob Exp $
--- man/dnssec-zkt.8.orig Fri Jun 11 11:21:14 2010
+++ man/dnssec-zkt.8 Fri Jun 11 11:22:06 2010
$OpenBSD: patch-man_dnssec-zkt_8,v 1.3 2020/02/20 11:21:13 sthen Exp $
Index: man/dnssec-zkt.8
--- man/dnssec-zkt.8.orig
+++ man/dnssec-zkt.8
@@ -443,12 +443,12 @@ Specifies the name of the default global configuration
.SH FILES

View File

@ -1,6 +1,8 @@
$OpenBSD: patch-man_zkt-conf_8,v 1.1 2010/06/20 14:01:35 jakob Exp $
--- man/zkt-conf.8.orig Fri Jun 11 10:48:56 2010
+++ man/zkt-conf.8 Fri Jun 11 11:21:50 2010
$OpenBSD: patch-man_zkt-conf_8,v 1.2 2020/02/20 11:21:13 sthen Exp $
Index: man/zkt-conf.8
--- man/zkt-conf.8.orig
+++ man/zkt-conf.8
@@ -64,7 +64,7 @@ b)
The side wide config file or the file specified with option -c
overloads the built-in vars.

View File

@ -1,6 +1,8 @@
$OpenBSD: patch-man_zkt-keyman_8,v 1.1 2010/06/20 14:01:35 jakob Exp $
--- man/zkt-keyman.8.orig Fri Jun 11 10:49:01 2010
+++ man/zkt-keyman.8 Fri Jun 11 11:21:54 2010
$OpenBSD: patch-man_zkt-keyman_8,v 1.2 2020/02/20 11:21:13 sthen Exp $
Index: man/zkt-keyman.8
--- man/zkt-keyman.8.orig
+++ man/zkt-keyman.8
@@ -282,12 +282,12 @@ Specifies the name of the default global configuration
.SH FILES

View File

@ -1,6 +1,8 @@
$OpenBSD: patch-man_zkt-ls_8,v 1.2 2012/04/20 20:04:34 gonzalo Exp $
--- man/zkt-ls.8.orig Tue Aug 3 12:20:37 2010
+++ man/zkt-ls.8 Thu Apr 5 19:47:00 2012
$OpenBSD: patch-man_zkt-ls_8,v 1.3 2020/02/20 11:21:13 sthen Exp $
Index: man/zkt-ls.8
--- man/zkt-ls.8.orig
+++ man/zkt-ls.8
@@ -251,12 +251,12 @@ Specifies the name of the default global configuration
.SH FILES

View File

@ -1,6 +1,8 @@
$OpenBSD: patch-man_zkt-signer_8,v 1.2 2012/04/20 20:04:34 gonzalo Exp $
--- man/zkt-signer.8.orig Sat Nov 27 16:13:04 2010
+++ man/zkt-signer.8 Thu Apr 5 19:47:00 2012
$OpenBSD: patch-man_zkt-signer_8,v 1.3 2020/02/20 11:21:13 sthen Exp $
Index: man/zkt-signer.8
--- man/zkt-signer.8.orig
+++ man/zkt-signer.8
@@ -225,7 +225,7 @@ Print out the online help.
.SH SAMPLE USAGE
.TP

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-misc_c,v 1.1 2020/02/20 11:21:13 sthen Exp $
Index: misc.c
--- misc.c.orig
+++ misc.c
@@ -946,21 +946,21 @@ char *age2str (time_t sec)
len += snprintf (str+len, strsize - len, " ");
if ( sec / DAYSEC > 0 )
{
- len += snprintf (str+len, strsize - len, "%2lud", sec / (ulong)DAYSEC);
+ len += snprintf (str+len, strsize - len, "%2lud", (ulong) sec / DAYSEC);
sec %= DAYSEC;
}
else
len += snprintf (str+len, strsize - len, " ");
if ( sec / HOURSEC > 0 )
{
- len += snprintf (str+len, strsize - len, "%2luh", sec / (ulong)HOURSEC);
+ len += snprintf (str+len, strsize - len, "%2luh", (ulong) sec / HOURSEC);
sec %= HOURSEC;
}
else
len += snprintf (str+len, strsize - len, " ");
if ( sec / MINSEC > 0 )
{
- len += snprintf (str+len, strsize - len, "%2lum", sec / (ulong)MINSEC);
+ len += snprintf (str+len, strsize - len, "%2lum", (ulong) sec / MINSEC);
sec %= MINSEC;
}
else

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-zconf_c,v 1.1 2020/02/20 11:21:13 sthen Exp $
Index: zconf.c
--- zconf.c.orig
+++ zconf.c
@@ -746,9 +746,7 @@ zconf_t *dupconfig (const zconf_t *conf)
*****************************************************************/
zconf_t *freeconfig (zconf_t *conf)
{
- if (conf != NULL);
- free (conf);
-
+ free (conf);
return (zconf_t *)NULL;
}