Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
BIND
Commits
f73816ff
Commit
f73816ff
authored
Jan 23, 2019
by
Mark Andrews
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
error out if there are extra command line options
parent
acfbf1ae
Pipeline
#9634
passed with stages
in 16 minutes and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
CHANGES
CHANGES
+3
-0
bin/dig/nslookup.c
bin/dig/nslookup.c
+20
-0
No files found.
CHANGES
View file @
f73816ff
5157. [bug] Nslookup now errors out if there are extra command
line arguments. [GL #207]
--- 9.13.6 released ---
5156. [doc] Extended and refined the section of the ARM describing
...
...
bin/dig/nslookup.c
View file @
f73816ff
...
...
@@ -879,6 +879,23 @@ get_next_command(void) {
isc_mem_free
(
mctx
,
buf
);
}
ISC_PLATFORM_NORETURN_PRE
static
void
usage
(
void
)
ISC_PLATFORM_NORETURN_POST
;
static
void
usage
(
void
)
{
fprintf
(
stderr
,
"Usage:
\n
"
);
fprintf
(
stderr
,
" nslookup [-opt ...] # interactive mode using default server
\n
"
);
fprintf
(
stderr
,
" nslookup [-opt ...] - server # interactive mode using 'server'
\n
"
);
fprintf
(
stderr
,
" nslookup [-opt ...] host # just look up 'host' using default server
\n
"
);
fprintf
(
stderr
,
" nslookup [-opt ...] host server # just look up 'host' using 'server'
\n
"
);
exit
(
1
);
}
static
void
parse_args
(
int
argc
,
char
**
argv
)
{
bool
have_lookup
=
false
;
...
...
@@ -900,6 +917,9 @@ parse_args(int argc, char **argv) {
in_use
=
true
;
addlookup
(
argv
[
0
]);
}
else
{
if
(
argv
[
1
]
!=
NULL
)
{
usage
();
}
set_nameserver
(
argv
[
0
]);
check_ra
=
false
;
}
...
...
Mark Andrews
@marka
mentioned in commit
42458336
·
Feb 07, 2019
mentioned in commit
42458336
mentioned in commit 42458336e404a265da9e8172f589377ebeb97eff
Toggle commit list
Mark Andrews
@marka
mentioned in commit
9e89c1f8
·
Feb 07, 2019
mentioned in commit
9e89c1f8
mentioned in commit 9e89c1f898c55e0d5b445c21ce0f9e9d95fcff3c
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment