mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-22 18:19:42 +00:00
logging changes.
This commit is contained in:
parent
df03463a37
commit
db503b6daf
@ -17,7 +17,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dnssec-keygen.c,v 1.41 2000/09/21 17:18:14 bwelling Exp $ */
|
/* $Id: dnssec-keygen.c,v 1.42 2000/09/26 22:11:20 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -390,8 +390,7 @@ main(int argc, char **argv) {
|
|||||||
isc_mem_free(mctx, prog);
|
isc_mem_free(mctx, prog);
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
|
|
||||||
if (log != NULL)
|
cleanup_logging(&log);
|
||||||
isc_log_destroy(&log);
|
|
||||||
cleanup_entropy(&ectx);
|
cleanup_entropy(&ectx);
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
if (verbose > 10)
|
if (verbose > 10)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dnssec-makekeyset.c,v 1.40 2000/09/12 11:50:45 bwelling Exp $ */
|
/* $Id: dnssec-makekeyset.c,v 1.41 2000/09/26 22:11:21 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -396,8 +396,7 @@ main(int argc, char *argv[]) {
|
|||||||
isc_mem_put(mctx, savedname, sizeof(dns_name_t));
|
isc_mem_put(mctx, savedname, sizeof(dns_name_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log != NULL)
|
cleanup_logging(&log);
|
||||||
isc_log_destroy(&log);
|
|
||||||
cleanup_entropy(&ectx);
|
cleanup_entropy(&ectx);
|
||||||
|
|
||||||
isc_mem_free(mctx, output);
|
isc_mem_free(mctx, output);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dnssec-signkey.c,v 1.36 2000/09/12 11:50:46 bwelling Exp $ */
|
/* $Id: dnssec-signkey.c,v 1.37 2000/09/26 22:11:22 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -420,8 +420,7 @@ main(int argc, char *argv[]) {
|
|||||||
isc_mem_put(mctx, keynode, sizeof(keynode_t));
|
isc_mem_put(mctx, keynode, sizeof(keynode_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log != NULL)
|
cleanup_logging(&log);
|
||||||
isc_log_destroy(&log);
|
|
||||||
|
|
||||||
isc_mem_free(mctx, output);
|
isc_mem_free(mctx, output);
|
||||||
cleanup_entropy(&ectx);
|
cleanup_entropy(&ectx);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dnssec-signzone.c,v 1.99 2000/09/12 11:33:14 bwelling Exp $ */
|
/* $Id: dnssec-signzone.c,v 1.100 2000/09/26 22:11:23 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -1447,8 +1447,7 @@ main(int argc, char *argv[]) {
|
|||||||
if (free_output)
|
if (free_output)
|
||||||
isc_mem_free(mctx, output);
|
isc_mem_free(mctx, output);
|
||||||
|
|
||||||
if (log != NULL)
|
cleanup_logging(&log);
|
||||||
isc_log_destroy(&log);
|
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
cleanup_entropy(&ectx);
|
cleanup_entropy(&ectx);
|
||||||
if (verbose > 10)
|
if (verbose > 10)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dnssectool.c,v 1.21 2000/09/08 08:38:58 bwelling Exp $ */
|
/* $Id: dnssectool.c,v 1.22 2000/09/26 22:11:24 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -178,6 +178,21 @@ setup_logging(int verbose, isc_mem_t *mctx, isc_log_t **logp) {
|
|||||||
*logp = log;
|
*logp = log;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cleanup_logging(isc_log_t **logp) {
|
||||||
|
isc_log_t *log;
|
||||||
|
|
||||||
|
REQUIRE(logp != NULL);
|
||||||
|
|
||||||
|
log = *logp;
|
||||||
|
if (log == NULL)
|
||||||
|
return;
|
||||||
|
isc_log_destroy(&log);
|
||||||
|
isc_log_setcontext(NULL);
|
||||||
|
dns_log_setcontext(NULL);
|
||||||
|
logp = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
kbdstart(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
|
kbdstart(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
|
||||||
isc_keyboard_t *kbd = (isc_keyboard_t *)arg;
|
isc_keyboard_t *kbd = (isc_keyboard_t *)arg;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dnssectool.h,v 1.11 2000/09/08 08:38:59 bwelling Exp $ */
|
/* $Id: dnssectool.h,v 1.12 2000/09/26 22:11:25 bwelling Exp $ */
|
||||||
|
|
||||||
#ifndef DNSSECTOOL_H
|
#ifndef DNSSECTOOL_H
|
||||||
#define DNSSECTOOL_H 1
|
#define DNSSECTOOL_H 1
|
||||||
@ -53,6 +53,9 @@ key_format(const dst_key_t *key, char *cp, unsigned int size);
|
|||||||
void
|
void
|
||||||
setup_logging(int verbose, isc_mem_t *mctx, isc_log_t **logp);
|
setup_logging(int verbose, isc_mem_t *mctx, isc_log_t **logp);
|
||||||
|
|
||||||
|
void
|
||||||
|
cleanup_logging(isc_log_t **logp);
|
||||||
|
|
||||||
void
|
void
|
||||||
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
|
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user