]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add a general note to the manpage on how file handling is changed.
authorOtto <otto.moerbeek@open-xchange.com>
Mon, 15 Feb 2021 11:06:24 +0000 (12:06 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Mon, 15 Feb 2021 11:17:33 +0000 (12:17 +0100)
Also, remove the snippets about where the files are written in
case of chroot for each file-writing command.

pdns/rec_channel_rec.cc
pdns/recursordist/docs/manpages/rec_control.1.rst

index 1b7540bcf6c7ce17a4b53134f2e79636d8054a1e..65d0c88e6f1638112cd744dbe8e6044f641333be 100644 (file)
@@ -1673,7 +1673,7 @@ RecursorControlChannel::Answer RecursorControlParser::getAnswer(int s, const str
 "                                 remove netmasks that are not allowed to be throttled. If N is '*', remove all\n"
 "clear-nta [DOMAIN]...            Clear the Negative Trust Anchor for DOMAINs, if no DOMAIN is specified, remove all\n"
 "clear-ta [DOMAIN]...             Clear the Trust Anchor for DOMAINs\n"
-"dum-cache <filename>            dump cache contents to the named file\n"
+"dump-cache <filename>            dump cache contents to the named file\n"
 "dump-edns [status] <filename>    dump EDNS status to the named file\n"
 "dump-nsspeeds <filename>         dump nsspeeds statistics to the named file\n"
 "dump-rpz <zone name> <filename>  dump the content of a RPZ zone to the named file\n"
index 54bcd2b8a5c26981ede544cd5a8f982c87ac0852..a76e4570fd6869317378ea827a2f12ff744f4c9e 100644 (file)
@@ -31,6 +31,12 @@ To dump the cache to disk, execute::
 
   # rec_control dump-cache /tmp/the-cache
 
+.. note::
+
+  Before version 4.5.0, for each command that writes to a file, :program:`pdns_recursor` would open the file to write to.
+  Starting with 4.5.0, the files are opened by the :program:`rec_control` command itself using the credentials and the current working directory of the user running :program:`rec_control`.
+  A single minus *-* can be used as a filename to write the data to the standard output stream.
+
 Options
 -------
 --help                provide this helpful message.
@@ -78,91 +84,43 @@ clear-ta [*DOMAIN*]...
 
 dump-cache *FILENAME*
     Dumps the entire cache to *FILENAME*. This file should not exist already,
-    PowerDNS will refuse to overwrite it. While dumping, the recursor will not
-    answer questions.
+    PowerDNS will refuse to overwrite it. While dumping, the recursor
+    might not answer questions.
 
     Typical PowerDNS Recursors run multiple threads, therefore you'll see
     duplicate, different entries for the same domains. The negative cache is
     also dumped to the same file. The per-thread positive and negative cache
     dumps are separated with an appropriate comment.
 
-    .. note::
-
-      :program:`pdns_recursor` often runs in a chroot. You can
-      retrieve the file using::
-
-        rec_control dump-cache /tmp/file
-        mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename
-
 dump-edns *FILENAME*
     Dumps the EDNS status to the filename mentioned. This file should not exist
     already, PowerDNS will refuse to overwrite it. While dumping, the recursor
     will not answer questions.
 
-    .. note::
-
-      :program:`pdns_recursor` often runs in a chroot. You can
-      retrieve the file using::
-
-        rec_control dump-edns /tmp/file
-        mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename
-
 dump-nsspeeds *FILENAME*
     Dumps the nameserver speed statistics to the *FILENAME* mentioned. This
     file should not exist already, PowerDNS will refuse to overwrite it. While
     dumping, the recursor will not answer questions. Statistics are kept per
     thread, and the dumps end up in the same file.
 
-    .. note::
-
-      :program:`pdns_recursor` often runs in a chroot. You can
-      retrieve the file using::
-
-        rec_control dump-nsspeeds /tmp/file
-        mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename
-
 dump-rpz *ZONE NAME* *FILE NAME*
     Dumps the content of the RPZ zone named *ZONE NAME* to the *FILENAME*
     mentioned. This file should not exist already, PowerDNS will refuse to
     overwrite it otherwise. While dumping, the recursor will not answer
     questions.
 
-    .. note::
-
-      :program:`pdns_recursor` often runs in a chroot. You can
-      retrieve the file using::
-
-        rec_control dump-rpz ZONE_NAME /tmp/file
-        mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename
-
 dump-throttlemap *FILENAME*
     Dump the contents of the throttle map to the *FILENAME* mentioned.
     This file should not exist already, PowerDNS will refuse to
     overwrite it otherwise. While dumping, the recursor will not answer
     questions.
 
-    .. note::
-
-      :program:`pdns_recursor` often runs in a chroot. You can
-      retrieve the file using::
-
-        rec_control dump-throttlemap /tmp/file
-        mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename
-
 dump-failedservers *FILENAME*
     Dump the contents of the failed server map to the *FILENAME* mentioned.
     This file should not exist already, PowerDNS will refuse to
     overwrite it otherwise. While dumping, the recursor will not answer
     questions.
 
-    .. note::
-
-      :program:`pdns_recursor` often runs in a chroot. You can
-      retrieve the file using::
-
-        rec_control dump-failedservers /tmp/file
-        mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename
-
 get *STATISTIC* [*STATISTIC*]...
     Retrieve a statistic. For items that can be queried, see
     :doc:`../metrics`