Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/dhcp/dst fix some cases where the EREPORT macro defined...
details: https://anonhg.NetBSD.org/src/rev/ff1e3139c3b4
branches: trunk
changeset: 751137:ff1e3139c3b4
user: drochner <drochner%NetBSD.org@localhost>
date: Mon Jan 25 20:33:57 2010 +0000
description:
fix some cases where the EREPORT macro defined to null (as in the NetBSD
build) could change the behaviour of the code in unexpected ways
diffstat:
dist/dhcp/dst/dst_api.c | 11 +++++++----
dist/dhcp/dst/prandom.c | 5 +++--
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (68 lines):
diff -r 2f9a80da7350 -r ff1e3139c3b4 dist/dhcp/dst/dst_api.c
--- a/dist/dhcp/dst/dst_api.c Mon Jan 25 20:09:15 2010 +0000
+++ b/dist/dhcp/dst/dst_api.c Mon Jan 25 20:33:57 2010 +0000
@@ -1,5 +1,5 @@
#ifndef LINT
-static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_api.c,v 1.5 2005/08/11 17:13:21 drochner Exp $";
+static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_api.c,v 1.6 2010/01/25 20:33:57 drochner Exp $";
#endif
/*
@@ -684,9 +684,10 @@
if (key_st->dk_func->from_dns_key(key_st, &rdata[start],
len - start) > 0)
return (key_st);
- } else
+ } else {
EREPORT(("dst_dnskey_to_public_key(): unsuppored alg %d\n",
alg));
+ }
SAFE_FREE(key_st);
return (key_st);
@@ -745,9 +746,10 @@
return (enc_len + loc);
else
return (-1);
- } else
+ } else {
EREPORT(("dst_key_to_dnskey(): Unsupported ALG %d\n",
key->dk_alg));
+ }
return (-1);
}
@@ -877,10 +879,11 @@
EREPORT(("dst_s_read_private_key_file(): Unknown keyfile %d.%d version for %s\n",
file_major, file_minor, name));
goto fail;
- } else if (file_major > major || file_minor > minor)
+ } else if (file_major > major || file_minor > minor) {
EREPORT((
"dst_s_read_private_key_file(): Keyfile %s version higher than mine %d.%d MAY FAIL\n",
name, file_major, file_minor));
+ }
while (*p++ != '\n') ; /* skip to end of line */
diff -r 2f9a80da7350 -r ff1e3139c3b4 dist/dhcp/dst/prandom.c
--- a/dist/dhcp/dst/prandom.c Mon Jan 25 20:09:15 2010 +0000
+++ b/dist/dhcp/dst/prandom.c Mon Jan 25 20:33:57 2010 +0000
@@ -1,5 +1,5 @@
#ifndef LINT
-static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/prandom.c,v 1.4 2005/08/11 17:13:21 drochner Exp $";
+static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/prandom.c,v 1.5 2010/01/25 20:33:57 drochner Exp $";
#endif
/*
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
@@ -850,8 +850,9 @@
i = dst_sign_data(SIG_MODE_ALL, my_key, NULL,
(u_char *) counter, hb_size,
semi_old, sizeof(semi_old));
- if (i != hb_size)
+ if (i != hb_size) {
EREPORT(("HMAC SIGNATURE FAILURE %d\n", i));
+ }
cnt++;
if (size - out < i) /* Not all data is needed */
semi_loc = i = size - out;
Home |
Main Index |
Thread Index |
Old Index