Skip to content

Fix a few cosmetic issues with `rndc managed-keys`

Tony Finch requested to merge fanf/bind9:u/fanf2/rndc-managed-keys into master

The handling of class and view arguments was broken, because the code didn't realise that next_token() would overwrite the class name when it parsed the view name. The code was trying to implement a syntax like refresh [[class] view], but it was documented to have a syntax like refresh [class [view]]. The latter is consistent with other rndc commands, so that is how I have fixed it.

Before:

$ rndc managed-keys refresh in rec
rndc: 'managed-keys' failed: unknown class/type
unknown class 'rec'

After:

$ rndc managed-keys refresh in rec
refreshing managed keys for 'rec'

There were missing newlines in the output from rndc managed-keys refresh and rndc managed-keys destroy.

Before:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'refreshing managed keys for 'auth'

After:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'
refreshing managed keys for 'auth'
Edited by Tony Finch

Merge request reports