mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-15 08:41:00 -04:00
Restore seperator values
strtok_r is destructive. Restore the seperators so that the command
line can be properly displayed.
(cherry picked from commit 609d96aa12)
This commit is contained in:
parent
747a19bc00
commit
b9a4b97367
1 changed files with 10 additions and 0 deletions
|
|
@ -1827,6 +1827,9 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||
extra = strtok_r(NULL, "\0",
|
||||
&last);
|
||||
save_opt(lookup, code, extra);
|
||||
if (extra != NULL) {
|
||||
extra[-1] = ':';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
|
|
@ -2555,6 +2558,9 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||
fprintf(stderr, "Invalid option: +%s\n", option);
|
||||
usage();
|
||||
}
|
||||
if (value != NULL) {
|
||||
value[-1] = '=';
|
||||
}
|
||||
return (lookup);
|
||||
|
||||
#if !TARGET_OS_IPHONE
|
||||
|
|
@ -2826,6 +2832,10 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||
/* XXXONDREJ: FIXME */
|
||||
strlcpy(keynametext, ptr, sizeof(keynametext));
|
||||
strlcpy(keysecret, ptr2, sizeof(keysecret));
|
||||
if (ptr3 != NULL) {
|
||||
ptr[-1] = ':';
|
||||
}
|
||||
ptr2[-1] = ':';
|
||||
return (value_from_next);
|
||||
case 'x':
|
||||
if (*need_clone) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue