Commit Diff
Diff:
0bd2b4e3b038c9d5edd5bf42287e4344cb053801
d1829f8664291dcc4303f3e2b62bfc7855cdf918
Commit:
d1829f8664291dcc4303f3e2b62bfc7855cdf918
Tree:
5b44e9020384d6d84ceacf7d454b57eeb19e9210
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Fri Dec 27 15:16:52 2019 UTC
Message:
remove option -B, it doesn't do anything, update manpage dddctl.8 to show options for query.
blob - b417ee6d92931e5ccce65f83ca796e4438c37cb5
blob + 28564cc116a8682d84a7f3d9f9d2843cf59e2cd1
--- dddctl.8
+++ dddctl.8
@@ -1,4 +1,4 @@
-.\" $Id: dddctl.8,v 1.8 2019/12/06 16:38:44 pjp Exp $
+.\" $Id: dddctl.8,v 1.9 2019/12/27 15:16:52 pjp Exp $
.\" In parts copyright (template) by:
.\"
.\" $OpenBSD: vmctl.8,v 1.39 2018/02/24 13:14:09 jmc Exp $
@@ -18,7 +18,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: December 6 2019 $
+.Dd $Mdocdate: December 27 2019 $
.Dt DDDCTL 8
.Os
.Sh NAME
@@ -55,6 +55,37 @@ provides an in-binary help. Alternatively you can spe
to provide help for. Ie.
.Nm
help sign.
+.It Xo Cm query
+.Op Fl DITZ
+.Op Fl @ Ar server
+.Op Fl P Ar port
+.Op Fl p Ar file
+.Op Fl Q Ar server
+.Op Fl y Ar keyname:password
+.Xc
+performs rudamentary query operations on a DNS server.
+.Bl -tag -width "-I iterations"
+.It Fl D
+output in DNSSEC-style format
+.It Fl I
+indent output.
+.It Fl T
+TCP format.
+.It Fl Z
+output in delphinusdnsd zonefile format.
+.It Fl @ Ar server
+queries the specified server (in IPv4 IP).
+.It Fl P Ar port
+query on the specified port.
+.It Fl p Ar file
+output/pipe to the specified file.
+.It Fl Q Ar server
+queries the specified server (is synonymous with -@).
+.It Fl y Ar keyname:password
+Use a TSIG keyname and password. The keyname is plaintext in a DNS name format
+, the password is in BASE64. This differs from dig in that the leading HMAC
+type is omitted because it's always type 'hmac-sha256'.
+.El
.It Xo Cm sign
.Op Fl KXZ
.Op Fl a Ar algorithm
blob - 6617b2921f345855678a43d48f9f3a5606af3120
blob + dd0be7209d42ae708cd24f29b0296dd1e31d1cca
--- dddctl.c
+++ dddctl.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: dddctl.c,v 1.93 2019/12/27 15:09:56 pjp Exp $
+ * $Id: dddctl.c,v 1.94 2019/12/27 15:16:52 pjp Exp $
*/
#include <sys/param.h>
@@ -6314,9 +6314,8 @@ usage(int argc, char *argv[])
fprintf(stderr, "\t-z ZSK\t\tuse provided ZSK zone-signing keyname\n");
return 0;
} else if (argc == 2 && strcmp(argv[1], "query") == 0) {
- fprintf(stderr, "usage: dddctl query [-BDITZ] [-@ server] [-P port] [-p file] [-Q server]\n\t\t[-y keyname:password] name command\n");
+ fprintf(stderr, "usage: dddctl query [-DITZ] [-@ server] [-P port] [-p file] [-Q server]\n\t\t[-y keyname:password] name command\n");
fprintf(stderr, "\t-@ server\t\tUse server ip.\n");
- fprintf(stderr, "\t-B\t\t\tOutput as a BIND file.\n");
fprintf(stderr, "\t-D\t\t\tUse DNSSEC (DO bit) lookup.\n");
fprintf(stderr, "\t-I\t\t\tIndent output.\n");
fprintf(stderr, "\t-T\t\t\tUse TCP.\n");
@@ -6333,7 +6332,7 @@ usage(int argc, char *argv[])
fprintf(stderr, "usage: command [arg ...]\n");
fprintf(stderr, "\tbindfile zonename zonefile\n");
fprintf(stderr, "\tconfigtest [-cn] [configfile]\n");
- fprintf(stderr, "\tquery [-BDITZ] [-@ server] [-P port] [-p file] [-Q server]\n\t\t[-y keyname:password] name command\n");
+ fprintf(stderr, "\tquery [-DITZ] [-@ server] [-P port] [-p file] [-Q server]\n\t\t[-y keyname:password] name command\n");
fprintf(stderr, "\thelp [command]\n");
fprintf(stderr, "\tsign [-KXZ] [-a algorithm] [-B bits] [-e seconds]\n\t\t[-I iterations] [-i inputfile] [-k KSK] [-m mask] [-n zonename]\n\t\t[-o output] [-S pid] [-s salt] [-t ttl] [-x serial] [-z ZSK]\n");
fprintf(stderr, "\tsshfp hostname [-k keyfile] [-t ttl]\n");
@@ -6366,14 +6365,11 @@ dig(int argc, char *argv[])
int answers = 0;
int additionalcount = 0;
- while ((ch = getopt(argc, argv, "@:BDIP:TZp:Q:y:")) != -1) {
+ while ((ch = getopt(argc, argv, "@:DIP:TZp:Q:y:")) != -1) {
switch (ch) {
case '@':
case 'Q':
nameserver = optarg;
- break;
- case 'B':
- format |= BIND_FORMAT;
break;
case 'D':
format |= DNSSEC_FORMAT;
repomaster@centroid.eu