summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/isakmpd/cert.c5
-rw-r--r--sbin/isakmpd/connection.c5
-rw-r--r--sbin/isakmpd/ike_phase_1.c9
-rw-r--r--sbin/isakmpd/ike_quick_mode.c40
-rw-r--r--sbin/isakmpd/math_group.c8
-rw-r--r--sbin/isakmpd/message.c4
-rw-r--r--sbin/isakmpd/pf_key_v2.c25
-rw-r--r--sbin/isakmpd/prf.c5
-rw-r--r--sbin/isakmpd/sa.c9
9 files changed, 62 insertions, 48 deletions
diff --git a/sbin/isakmpd/cert.c b/sbin/isakmpd/cert.c
index c1a06620f3c..e1c3434b128 100644
--- a/sbin/isakmpd/cert.c
+++ b/sbin/isakmpd/cert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cert.c,v 1.20 2002/06/01 07:44:21 deraadt Exp $ */
+/* $OpenBSD: cert.c,v 1.21 2002/06/06 02:15:27 ho Exp $ */
/* $EOM: cert.c,v 1.18 2000/09/28 12:53:27 niklas Exp $ */
/*
@@ -133,7 +133,8 @@ certreq_decode (u_int16_t type, u_int8_t *data, u_int32_t datalen)
ret = malloc (sizeof aca);
if (!ret)
{
- log_error ("certreq_decode: malloc (%lu) failed", (unsigned long)sizeof aca);
+ log_error ("certreq_decode: malloc (%lu) failed",
+ (unsigned long)sizeof aca);
handler->free_aca (aca.data);
return 0;
}
diff --git a/sbin/isakmpd/connection.c b/sbin/isakmpd/connection.c
index b2c9655ff5d..f82cd2f4018 100644
--- a/sbin/isakmpd/connection.c
+++ b/sbin/isakmpd/connection.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: connection.c,v 1.23 2002/06/01 07:44:21 deraadt Exp $ */
+/* $OpenBSD: connection.c,v 1.24 2002/06/06 02:15:27 ho Exp $ */
/* $EOM: connection.c,v 1.28 2000/11/23 12:21:18 niklas Exp $ */
/*
@@ -287,7 +287,8 @@ connection_setup (char *name)
conn = calloc (1, sizeof *conn);
if (!conn)
{
- log_error ("connection_setup: calloc (1, %ld) failed", sizeof *conn);
+ log_error ("connection_setup: calloc (1, %lu) failed",
+ (unsigned long)sizeof *conn);
goto fail;
}
diff --git a/sbin/isakmpd/ike_phase_1.c b/sbin/isakmpd/ike_phase_1.c
index dc304d5dda6..4d9925890e0 100644
--- a/sbin/isakmpd/ike_phase_1.c
+++ b/sbin/isakmpd/ike_phase_1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ike_phase_1.c,v 1.32 2002/06/01 07:44:21 deraadt Exp $ */
+/* $OpenBSD: ike_phase_1.c,v 1.33 2002/06/06 02:15:27 ho Exp $ */
/* $EOM: ike_phase_1.c,v 1.31 2000/12/11 23:47:56 niklas Exp $ */
/*
@@ -1022,7 +1022,8 @@ ike_phase_1_recv_ID (struct message *msg)
*id = malloc (*id_len);
if (!*id)
{
- log_error ("ike_phase_1_recv_ID: malloc (%lu) failed", *id_len);
+ log_error ("ike_phase_1_recv_ID: malloc (%lu) failed",
+ (unsigned long)*id_len);
return -1;
}
memcpy (*id, payload->p + ISAKMP_GEN_SZ, *id_len);
@@ -1249,7 +1250,7 @@ attribute_unacceptable (u_int16_t type, u_int8_t *value, u_int16_t len,
if (!node)
{
log_error ("attribute_unacceptable: malloc (%lu) failed",
- sizeof *node);
+ (unsigned long)sizeof *node);
return 1;
}
node->type = type;
@@ -1354,7 +1355,7 @@ attribute_unacceptable (u_int16_t type, u_int8_t *value, u_int16_t len,
if (!node)
{
log_error ("attribute_unacceptable: malloc (%lu) failed",
- sizeof *node);
+ (unsigned long)sizeof *node);
return 1;
}
node->type = type;
diff --git a/sbin/isakmpd/ike_quick_mode.c b/sbin/isakmpd/ike_quick_mode.c
index 142fe7158c4..51461f392c2 100644
--- a/sbin/isakmpd/ike_quick_mode.c
+++ b/sbin/isakmpd/ike_quick_mode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ike_quick_mode.c,v 1.60 2002/06/01 07:44:21 deraadt Exp $ */
+/* $OpenBSD: ike_quick_mode.c,v 1.61 2002/06/06 02:15:27 ho Exp $ */
/* $EOM: ike_quick_mode.c,v 1.139 2001/01/26 10:43:17 niklas Exp $ */
/*
@@ -248,8 +248,8 @@ check_policy (struct exchange *exchange, struct sa *sa, struct sa *isakmp_sa)
if (!principal[0])
{
log_error ("check_policy: calloc (%lu, %lu) failed",
- (unsigned long)strlen (isakmp_sa->keynote_key),
- (unsigned long)sizeof (char));
+ (unsigned long)strlen (isakmp_sa->keynote_key),
+ (unsigned long)sizeof (char));
goto policydone;
}
#endif
@@ -261,7 +261,7 @@ check_policy (struct exchange *exchange, struct sa *sa, struct sa *isakmp_sa)
if (!principal)
{
log_error ("check_policy: calloc (2, %lu) failed",
- (unsigned long)sizeof *principal);
+ (unsigned long)sizeof *principal);
goto policydone;
}
@@ -294,7 +294,7 @@ check_policy (struct exchange *exchange, struct sa *sa, struct sa *isakmp_sa)
if (!principal[1])
{
log_error ("check_policy: calloc (%d, %lu) failed", len,
- (unsigned long)sizeof (char));
+ (unsigned long)sizeof (char));
goto policydone;
}
@@ -486,7 +486,8 @@ initiator_send_HASH_SA_NONCE (struct message *msg)
{
log_error ("initiator_send_HASH_SA_NONCE: "
"realloc (%p, %lu) failed",
- proposal, prop_cnt * (unsigned long)sizeof *proposal);
+ proposal,
+ prop_cnt * (unsigned long)sizeof *proposal);
goto bail_out;
}
proposal = new_proposal;
@@ -509,7 +510,8 @@ initiator_send_HASH_SA_NONCE (struct message *msg)
{
log_error ("initiator_send_HASH_SA_NONCE: "
"realloc (%p, %lu) failed",
- transform, prop_cnt * (unsigned long)sizeof *transform);
+ transform,
+ prop_cnt * (unsigned long)sizeof *transform);
goto bail_out;
}
transform = new_transform;
@@ -520,7 +522,8 @@ initiator_send_HASH_SA_NONCE (struct message *msg)
{
log_error ("initiator_send_HASH_SA_NONCE: "
"realloc (%p, %lu) failed",
- transform_cnt, prop_cnt * (unsigned long)sizeof *transform_cnt);
+ transform_cnt,
+ prop_cnt * (unsigned long)sizeof *transform_cnt);
goto bail_out;
}
transform_cnt = new_transform_cnt;
@@ -561,7 +564,8 @@ initiator_send_HASH_SA_NONCE (struct message *msg)
{
log_error ("initiator_send_HASH_SA_NONCE: "
"calloc (%d, %lu) failed",
- transform_cnt[prop_no], (unsigned long)sizeof **transform);
+ transform_cnt[prop_no],
+ (unsigned long)sizeof **transform);
goto bail_out;
}
@@ -571,7 +575,8 @@ initiator_send_HASH_SA_NONCE (struct message *msg)
{
log_error ("initiator_send_HASH_SA_NONCE: "
"calloc (%d, %lu) failed",
- transform_cnt[prop_no], (unsigned long)sizeof **transform_len);
+ transform_cnt[prop_no],
+ (unsigned long)sizeof **transform_len);
goto bail_out;
}
@@ -745,7 +750,7 @@ initiator_send_HASH_SA_NONCE (struct message *msg)
{
log_error ("initiator_send_HASH_SA_NONCE: "
"calloc (1, %lu) failed",
- (unsigned long)doi->proto_size);
+ (unsigned long)doi->proto_size);
goto bail_out;
}
}
@@ -779,7 +784,7 @@ initiator_send_HASH_SA_NONCE (struct message *msg)
if (!sa_buf)
{
log_error ("initiator_send_HASH_SA_NONCE: malloc (%lu) failed",
- (unsigned long)sa_len);
+ (unsigned long)sa_len);
goto bail_out;
}
SET_ISAKMP_SA_DOI (sa_buf, IPSEC_DOI_IPSEC);
@@ -901,7 +906,7 @@ initiator_send_HASH_SA_NONCE (struct message *msg)
if (!id)
{
log_error ("initiator_send_HASH_SA_NONCE: malloc(%lu) failed",
- (unsigned long)sz);
+ (unsigned long)sz);
return -1;
}
@@ -1344,8 +1349,9 @@ post_quick_mode (struct message *msg)
if (!iproto->keymat[i])
{
log_error ("post_quick_mode: malloc (%lu) failed",
- (((unsigned long)ie->keymat_len + prf->blocksize - 1)
- / prf->blocksize) * prf->blocksize);
+ (((unsigned long)ie->keymat_len +
+ prf->blocksize - 1) / prf->blocksize) *
+ prf->blocksize);
/* XXX What more to do? */
free (prf);
continue;
@@ -1777,7 +1783,7 @@ responder_send_HASH_SA_NONCE (struct message *msg)
if (!id)
{
log_error ("responder_send_HASH_SA_NONCE: malloc (%lu) failed",
- (unsigned long)sz);
+ (unsigned long)sz);
return -1;
}
memcpy (id, ie->id_ci, sz);
@@ -1794,7 +1800,7 @@ responder_send_HASH_SA_NONCE (struct message *msg)
if (!id)
{
log_error ("responder_send_HASH_SA_NONCE: malloc (%lu) failed",
- (unsigned long)sz);
+ (unsigned long)sz);
return -1;
}
memcpy (id, ie->id_cr, sz);
diff --git a/sbin/isakmpd/math_group.c b/sbin/isakmpd/math_group.c
index 03e0c2440d8..b951adfa2e4 100644
--- a/sbin/isakmpd/math_group.c
+++ b/sbin/isakmpd/math_group.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: math_group.c,v 1.14 2002/06/01 07:44:21 deraadt Exp $ */
+/* $OpenBSD: math_group.c,v 1.15 2002/06/06 02:15:27 ho Exp $ */
/* $EOM: math_group.c,v 1.25 2000/04/07 19:53:26 niklas Exp $ */
/*
@@ -289,7 +289,8 @@ modp_clone (struct group *new, struct group *clone)
new_grp = malloc (sizeof *new_grp);
if (!new_grp)
{
- log_print ("modp_clone: malloc (%lu) failed", (unsigned long)sizeof *new_grp);
+ log_print ("modp_clone: malloc (%lu) failed",
+ (unsigned long)sizeof *new_grp);
free (new);
return 0;
}
@@ -390,7 +391,8 @@ ec2n_clone (struct group *new, struct group *clone)
new_grp = malloc (sizeof *new_grp);
if (!new_grp)
{
- log_error ("ec2n_clone: malloc (%lu) failed", (unsigned long)sizeof *new_grp);
+ log_error ("ec2n_clone: malloc (%lu) failed",
+ (unsigned long)sizeof *new_grp);
free (new);
return 0;
}
diff --git a/sbin/isakmpd/message.c b/sbin/isakmpd/message.c
index d9432522209..8661b74322c 100644
--- a/sbin/isakmpd/message.c
+++ b/sbin/isakmpd/message.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: message.c,v 1.51 2002/06/01 07:44:21 deraadt Exp $ */
+/* $OpenBSD: message.c,v 1.52 2002/06/06 02:15:27 ho Exp $ */
/* $EOM: message.c,v 1.156 2000/10/10 12:36:39 provos Exp $ */
/*
@@ -248,7 +248,7 @@ message_parse_payloads (struct message *msg, struct payload *p, u_int8_t next,
do
{
LOG_DBG ((LOG_MESSAGE, 50,
- "message_parse_payloads: offset %p payload %s",
+ "message_parse_payloads: offset %d payload %s",
buf - (u_int8_t *)msg->iov[0].iov_base,
constant_name (isakmp_payload_cst, next)));
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c
index d5df1a8c790..1854befc3a3 100644
--- a/sbin/isakmpd/pf_key_v2.c
+++ b/sbin/isakmpd/pf_key_v2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_key_v2.c,v 1.102 2002/06/01 07:44:22 deraadt Exp $ */
+/* $OpenBSD: pf_key_v2.c,v 1.103 2002/06/06 02:15:27 ho Exp $ */
/* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */
/*
@@ -302,7 +302,8 @@ pf_key_v2_read (u_int32_t seq)
if (!fds)
{
log_error ("pf_key_v2_read: calloc (%lu, %lu) failed",
- (unsigned long)howmany (pf_key_v2_socket + 1, NFDBITS),
+ (unsigned long)howmany (pf_key_v2_socket + 1,
+ NFDBITS),
(unsigned long)sizeof (fd_mask));
goto cleanup;
}
@@ -333,8 +334,7 @@ pf_key_v2_read (u_int32_t seq)
if (n != sizeof hdr)
{
log_error ("pf_key_v2_read: recv (%d, ...) returned short packet "
- "(%lu bytes)",
- pf_key_v2_socket, n);
+ "(%lu bytes)", pf_key_v2_socket, (unsigned long)n);
goto cleanup;
}
@@ -357,8 +357,7 @@ pf_key_v2_read (u_int32_t seq)
if ((size_t)n != hdr.sadb_msg_len * PF_KEY_V2_CHUNK)
{
log_print ("pf_key_v2_read: read (%d, ...) returned short packet "
- "(%lu bytes)",
- pf_key_v2_socket, (unsigned long)n);
+ "(%lu bytes)", pf_key_v2_socket, (unsigned long)n);
goto cleanup;
}
@@ -435,7 +434,7 @@ pf_key_v2_write (struct pf_key_v2_msg *pmsg)
if (!iov)
{
log_error ("pf_key_v2_write: malloc (%lu) failed",
- cnt * (unsigned long)sizeof *iov);
+ cnt * (unsigned long)sizeof *iov);
return 0;
}
@@ -479,8 +478,8 @@ pf_key_v2_write (struct pf_key_v2_msg *pmsg)
}
if ((size_t)n != len)
{
- log_error ("pf_key_v2_write: writev (%d, ...) returned prematurely (%lu)",
- pf_key_v2_socket, (unsigned long)n);
+ log_error ("pf_key_v2_write: writev (%d, ...) returned prematurely "
+ "(%lu)", pf_key_v2_socket, (unsigned long)n);
goto cleanup;
}
free (iov);
@@ -3795,7 +3794,8 @@ pf_key_v2_acquire (struct pf_key_v2_msg *pmsg)
if (!authm)
{
log_error ("pf_key_v2_set_spi: malloc (%lu) failed",
- sauth->sadb_x_cred_len - (unsigned long)sizeof *sauth + 1);
+ sauth->sadb_x_cred_len -
+ (unsigned long)sizeof *sauth + 1);
conf_end (af, 0);
goto fail;
}
@@ -3836,8 +3836,9 @@ pf_key_v2_acquire (struct pf_key_v2_msg *pmsg)
if (!authm)
{
log_print ("pf_key_v2_set_spi: failed to convert "
- "private key to printable format (size %lu)",
- sauth->sadb_x_cred_len - (unsigned long)sizeof *sauth);
+ "private key to printable format (size %lu)",
+ sauth->sadb_x_cred_len -
+ (unsigned long)sizeof *sauth);
conf_end (af, 0);
goto fail;
}
diff --git a/sbin/isakmpd/prf.c b/sbin/isakmpd/prf.c
index 2586cc3087a..da1768e4731 100644
--- a/sbin/isakmpd/prf.c
+++ b/sbin/isakmpd/prf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prf.c,v 1.8 2002/06/01 07:44:22 deraadt Exp $ */
+/* $OpenBSD: prf.c,v 1.9 2002/06/06 02:15:27 ho Exp $ */
/* $EOM: prf.c,v 1.7 1999/05/02 12:50:29 niklas Exp $ */
/*
@@ -110,7 +110,8 @@ prf_alloc (enum prfs type, int subtype, char *shared, int sharedsize)
prfctx = malloc (sizeof *prfctx);
if (!prfctx)
{
- log_error ("prf_alloc: malloc (%lu) failed", (unsigned long)sizeof *prfctx);
+ log_error ("prf_alloc: malloc (%lu) failed",
+ (unsigned long)sizeof *prfctx);
goto cleanprf;
}
prf->prfctx = prfctx;
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c
index b3b73214a5a..c169e027f99 100644
--- a/sbin/isakmpd/sa.c
+++ b/sbin/isakmpd/sa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa.c,v 1.57 2002/06/01 07:44:22 deraadt Exp $ */
+/* $OpenBSD: sa.c,v 1.58 2002/06/06 02:15:27 ho Exp $ */
/* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */
/*
@@ -367,7 +367,8 @@ sa_create (struct exchange *exchange, struct transport *t)
sa = calloc (1, sizeof *sa);
if (!sa)
{
- log_error ("sa_create: calloc (1, %lu) failed", (unsigned long)sizeof *sa);
+ log_error ("sa_create: calloc (1, %lu) failed",
+ (unsigned long)sizeof *sa);
return -1;
}
sa->transport = t;
@@ -386,7 +387,7 @@ sa_create (struct exchange *exchange, struct transport *t)
if (!sa->data)
{
log_error ("sa_create: calloc (1, %lu) failed",
- (unsigned long)sa->doi->sa_size);
+ (unsigned long)sa->doi->sa_size);
free (sa);
return -1;
}
@@ -827,7 +828,7 @@ sa_add_transform (struct sa *sa, struct payload *xf, int initiator,
proto = calloc (1, sizeof *proto);
if (!proto)
log_error ("sa_add_transform: calloc (1, %lu) failed",
- (unsigned long)sizeof *proto);
+ (unsigned long)sizeof *proto);
}
else
/* Find the protection suite that were chosen. */