History log of /openbsd-current/sbin/isakmpd/log.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.65 28-Apr-2024 florian

gmtime(3) / locatime(3) can fail when timestamps are way off.

Add missing error checks to all calls under sbin/

Input & OK millert


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.64 15-Jan-2018 mpi

Spacing, no object change.


# 1.63 04-Jan-2018 mpi

space -> tab

No object change.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.62 25-Oct-2014 lteo

Remove unnecessary netinet/in_systm.h include.

ok millert@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.61 16-Apr-2011 sthen

Allow -v (verbose logging) to work if a -D option is supplied.
Previously, a specific check was made for any -D log option being
used and, if so, *no* -v log entries are made, losing potentially
useful log entries. ok lum@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.60 02-Jun-2007 pvalchev

safer snprintf construct with more paranoid length calculation
ok millert


Revision tags: OPENBSD_4_1_BASE
# 1.59 19-Sep-2006 otto

Use S_IS* macros insted of masking with S_IF* flags. The latter may
have multiple bits set, which leads to surprising results. Spotted by/partly
from Paul Stoeber, more to come. ok ho@ miod@ hshoexer@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.58 26-May-2005 moritz

add log_errorx() which doesn't print the errno value. ok hshoexer@


# 1.57 03-May-2005 hshoexer

provide log_fatalx() function, that does not print an error string (like err
vs. errx). Not used yet.

ok moritz@


# 1.56 08-Apr-2005 deraadt

USE_DEBUG is bye bye


# 1.55 08-Apr-2005 deraadt

nat-traversal always


# 1.54 08-Apr-2005 deraadt

privsep always


# 1.53 08-Apr-2005 deraadt

kill HAVE_PCAP


# 1.52 04-Apr-2005 deraadt

spacing; ok cloder


Revision tags: OPENBSD_3_7_BASE
# 1.51 27-Feb-2005 hshoexer

where possible, use bzero instead of memset

ok cloder henning


# 1.50 08-Nov-2004 hshoexer

make lint happy and honor const.

ok ho@


Revision tags: OPENBSD_3_6_BASE
# 1.49 08-Aug-2004 deraadt

spacing


# 1.48 25-Jun-2004 hshoexer

Narrow down privsep interface. Remove ui_init to monitor. So we can get rid of
monitor_mkfifo.

Work in progress.

ok ho@


# 1.47 21-Jun-2004 ho

Don't write too much IKE data in packet capture


# 1.46 21-Jun-2004 ho

Packet capture should add the ESP-marker when NAT-T is active.


# 1.45 14-Jun-2004 ho

KNF, style, 80c, etc. hshoexer@ ok


# 1.44 23-May-2004 hshoexer

More KNF. Mainly spaces and line-wraps, no binary change.

ok ho@


# 1.43 15-Apr-2004 deraadt

partial move to KNF. More to come. This has happened because there
are a raft of source code auditors who are willing to help improve this
code only if this is done, and hey, isakmpd does need our standard
auditing process. ok ho hshoexer


# 1.42 07-Apr-2004 ho

-Wsign-compare nits. hshoexer@ ok.


Revision tags: OPENBSD_3_5_BASE
# 1.41 19-Mar-2004 hshoexer

Add missing bits to make already present privsep code work. Enable privsep.

ok ho@ deraadt@ markus@


# 1.40 25-Feb-2004 hshoexer

Add and document configuration options Logverbose and Loglevel. As log.c now
depends on conf.c and some regression tests use log.c, add conf.c to
Makefiles where necessary.

ok ho@


# 1.39 19-Feb-2004 ho

With -d, SIGINT should do a clean shutdown.
Without -d, logs should be sent to syslog, level LOG_INFO.


# 1.38 16-Jan-2004 hshoexer

Added -v option. Enables logging of successful exchange completion.
ok ho@


# 1.37 14-Dec-2003 ho

Log the actual port for src and dst, don't assume it's always 500.


# 1.36 06-Nov-2003 ho

Style nits.


Revision tags: OPENBSD_3_4_BASE
# 1.35 10-Jun-2003 deraadt

boring cleanups


# 1.34 03-Jun-2003 ho

Remove clauses 3 and 4. With approval from Niklas Hallqvist and
Niels Provos.


# 1.33 03-Jun-2003 ho

Cleanup. Use 'sizeof variable' instead of magic constants.


# 1.32 18-May-2003 ho

More isakmpd privsep work. X509 private keys are now kept in the privileged
process only. Various cleanup and bugfixes.
markus@ ok


# 1.31 15-May-2003 ho

Start of privilege separation for isakmpd.
There are some kinks left, so keep it default disabled for now.
markus@ says ok to commit.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.30 08-Aug-2002 ho

Append to the packet log file, don't overwrite. Requested by pb@.


# 1.29 09-Jun-2002 todd

rm trailing whitespace


# 1.28 10-May-2002 ho

Use DLT_LOOP instead of DLT_NULL for pcap, to keep track of changes in
tcpdump(8). This repairs the '-L' (cleartext packet capture) option.


Revision tags: OPENBSD_3_1_BASE
# 1.27 19-Feb-2002 millert

branches: 1.27.2;
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.26 23-Jan-2002 ho

the last few sprintf -> snprintf


# 1.25 03-Jan-2002 ho

str[n]{cpy,cat} -> strl{cpy,cat}, sprintf -> snprintf


Revision tags: OPENBSD_3_0_BASE
# 1.24 05-Oct-2001 ho

Extend the FIFO ui with the 'D A <level>' (to set all debug levels) and
'D T' (to toggle all logging on and off) commands. niklas@ ok.


# 1.23 02-Oct-2001 deraadt

change timeval to bpf_timeval; 32 bit in size, permitting much greater portability


# 1.22 18-Aug-2001 deraadt

careful with snprintf() == -1; ho, provos


# 1.21 10-Jul-2001 ho

(c)-2001


# 1.20 10-Jul-2001 ho

Rewrite packet capture to handle IPv6 addresses.


# 1.19 10-Jul-2001 markus

htonl() for null.null_family, ok niels@, ho@


Revision tags: OPENBSD_2_9_BASE
# 1.18 15-Apr-2001 ho

Style.


# 1.17 09-Apr-2001 ho

isakmpd can now capture un-encrypted IKE negotiation packets to a
file. In pcap(3) format, so tcpdump(8) can read it.
Idea by Tim Newsham <newsham@lava.net>, work by him and me.
Ok angelos@, niklas@


# 1.16 27-Jan-2001 niklas

(c) 2001


# 1.15 26-Jan-2001 niklas

Pedantic style police


# 1.14 12-Dec-2000 todd

pids are useful in syslog; ok angelos@


Revision tags: OPENBSD_2_8_BASE
# 1.13 07-Oct-2000 niklas

branches: 1.13.2;
Merge with EOM 1.30

author: niklas
no need for sysdep.h in here. This promotes reuse of the log
module in other environments

author: ho
(c)-2000


# 1.12 03-Aug-2000 niklas

Merge with EOM 1.28

author: niklas
From OpenBSD: be paranoid about the syslog format parameter


# 1.11 29-Jun-2000 deraadt

use %s when calling syslog


Revision tags: OPENBSD_2_7_BASE
# 1.10 07-Apr-2000 niklas

branches: 1.10.2;
Merge with EOM 1.27

author: ho
Add log_init() to properly initialize log_output variable.


# 1.9 25-Feb-2000 niklas

regress/crypto/Makefile: Merge with EOM 1.5
regress/dh/Makefile: Merge with EOM 1.7
regress/group/Makefile: Merge with EOM 1.9
regress/prf/Makefile: Merge with EOM 1.4
regress/rsakeygen/Makefile: Merge with EOM 1.8
regress/x509/Makefile: Merge with EOM 1.10
Makefile: Merge with EOM 1.62
attribute.c: Merge with EOM 1.10
sa.c: Merge with EOM 1.99
conf.c: Merge with EOM 1.20
crypto.c: Merge with EOM 1.28
isakmpd.c: Merge with EOM 1.45
connection.c: Merge with EOM 1.19
doi.h: Merge with EOM 1.28
field.c: Merge with EOM 1.11
exchange.c: Merge with EOM 1.116
ike_auth.c: Merge with EOM 1.44
pf_key_v2.c: Merge with EOM 1.37
ike_phase_1.c: Merge with EOM 1.22
ipsec.c: Merge with EOM 1.118
isakmp_doi.c: Merge with EOM 1.40
log.c: Merge with EOM 1.26
log.h: Merge with EOM 1.18
math_group.c: Merge with EOM 1.23
message.c: Merge with EOM 1.144
pf_encap.c: Merge with EOM 1.70
policy.c: Merge with EOM 1.18
timer.c: Merge with EOM 1.13
transport.c: Merge with EOM 1.41
udp.c: Merge with EOM 1.47
ui.c: Merge with EOM 1.37
x509.c: Merge with EOM 1.36

author: niklas
Made debug logging a compile time selectable feature


Revision tags: OPENBSD_2_6_BASE
# 1.8 26-Aug-1999 niklas

Merge with EOM 1.25

author: niklas
Ouch ho, that was ugly, make code portable


# 1.7 07-Jul-1999 niklas

Merge with EOM 1.24

author: ho
Release lock(s) on logfile when write fails.


# 1.6 19-Apr-1999 niklas

./log.c: Merge with EOM 1.23

Style

Make an attempt to handle failures in logging; disk full, etc.
We fallback to syslog(), which in turn has a fallback to /dev/console.

Move LOG_SIZE to log.h

Add LOG_REPORT to always go to logchannel regardless of level; misc small fixes

I did not need to do this but... style nits

Add class and level to debug messages

log time on -d mode

1999 copyrights


Revision tags: OPENBSD_2_5_BASE
# 1.5 26-Feb-1999 niklas

Merge from the Ericsson repository
| revision 1.15
| date: 1999/02/25 11:39:10; author: niklas; state: Exp; lines: +3 -1
| include sysdep.h everywhere
| ----------------------------


# 1.4 21-Dec-1998 niklas

Last months worth of work on isakmpd, lots done


# 1.3 17-Nov-1998 niklas

Add RCS Ids from the EOM repository


# 1.2 15-Nov-1998 niklas

openBSD RCS IDs


# 1.1 15-Nov-1998 niklas

branches: 1.1.1;
Initial revision


# 1.64 15-Jan-2018 mpi

Spacing, no object change.


# 1.63 04-Jan-2018 mpi

space -> tab

No object change.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.62 25-Oct-2014 lteo

Remove unnecessary netinet/in_systm.h include.

ok millert@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.61 16-Apr-2011 sthen

Allow -v (verbose logging) to work if a -D option is supplied.
Previously, a specific check was made for any -D log option being
used and, if so, *no* -v log entries are made, losing potentially
useful log entries. ok lum@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.60 02-Jun-2007 pvalchev

safer snprintf construct with more paranoid length calculation
ok millert


Revision tags: OPENBSD_4_1_BASE
# 1.59 19-Sep-2006 otto

Use S_IS* macros insted of masking with S_IF* flags. The latter may
have multiple bits set, which leads to surprising results. Spotted by/partly
from Paul Stoeber, more to come. ok ho@ miod@ hshoexer@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.58 26-May-2005 moritz

add log_errorx() which doesn't print the errno value. ok hshoexer@


# 1.57 03-May-2005 hshoexer

provide log_fatalx() function, that does not print an error string (like err
vs. errx). Not used yet.

ok moritz@


# 1.56 08-Apr-2005 deraadt

USE_DEBUG is bye bye


# 1.55 08-Apr-2005 deraadt

nat-traversal always


# 1.54 08-Apr-2005 deraadt

privsep always


# 1.53 08-Apr-2005 deraadt

kill HAVE_PCAP


# 1.52 04-Apr-2005 deraadt

spacing; ok cloder


Revision tags: OPENBSD_3_7_BASE
# 1.51 27-Feb-2005 hshoexer

where possible, use bzero instead of memset

ok cloder henning


# 1.50 08-Nov-2004 hshoexer

make lint happy and honor const.

ok ho@


Revision tags: OPENBSD_3_6_BASE
# 1.49 08-Aug-2004 deraadt

spacing


# 1.48 25-Jun-2004 hshoexer

Narrow down privsep interface. Remove ui_init to monitor. So we can get rid of
monitor_mkfifo.

Work in progress.

ok ho@


# 1.47 21-Jun-2004 ho

Don't write too much IKE data in packet capture


# 1.46 21-Jun-2004 ho

Packet capture should add the ESP-marker when NAT-T is active.


# 1.45 14-Jun-2004 ho

KNF, style, 80c, etc. hshoexer@ ok


# 1.44 23-May-2004 hshoexer

More KNF. Mainly spaces and line-wraps, no binary change.

ok ho@


# 1.43 15-Apr-2004 deraadt

partial move to KNF. More to come. This has happened because there
are a raft of source code auditors who are willing to help improve this
code only if this is done, and hey, isakmpd does need our standard
auditing process. ok ho hshoexer


# 1.42 07-Apr-2004 ho

-Wsign-compare nits. hshoexer@ ok.


Revision tags: OPENBSD_3_5_BASE
# 1.41 19-Mar-2004 hshoexer

Add missing bits to make already present privsep code work. Enable privsep.

ok ho@ deraadt@ markus@


# 1.40 25-Feb-2004 hshoexer

Add and document configuration options Logverbose and Loglevel. As log.c now
depends on conf.c and some regression tests use log.c, add conf.c to
Makefiles where necessary.

ok ho@


# 1.39 19-Feb-2004 ho

With -d, SIGINT should do a clean shutdown.
Without -d, logs should be sent to syslog, level LOG_INFO.


# 1.38 16-Jan-2004 hshoexer

Added -v option. Enables logging of successful exchange completion.
ok ho@


# 1.37 14-Dec-2003 ho

Log the actual port for src and dst, don't assume it's always 500.


# 1.36 06-Nov-2003 ho

Style nits.


Revision tags: OPENBSD_3_4_BASE
# 1.35 10-Jun-2003 deraadt

boring cleanups


# 1.34 03-Jun-2003 ho

Remove clauses 3 and 4. With approval from Niklas Hallqvist and
Niels Provos.


# 1.33 03-Jun-2003 ho

Cleanup. Use 'sizeof variable' instead of magic constants.


# 1.32 18-May-2003 ho

More isakmpd privsep work. X509 private keys are now kept in the privileged
process only. Various cleanup and bugfixes.
markus@ ok


# 1.31 15-May-2003 ho

Start of privilege separation for isakmpd.
There are some kinks left, so keep it default disabled for now.
markus@ says ok to commit.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.30 08-Aug-2002 ho

Append to the packet log file, don't overwrite. Requested by pb@.


# 1.29 09-Jun-2002 todd

rm trailing whitespace


# 1.28 10-May-2002 ho

Use DLT_LOOP instead of DLT_NULL for pcap, to keep track of changes in
tcpdump(8). This repairs the '-L' (cleartext packet capture) option.


Revision tags: OPENBSD_3_1_BASE
# 1.27 19-Feb-2002 millert

branches: 1.27.2;
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.26 23-Jan-2002 ho

the last few sprintf -> snprintf


# 1.25 03-Jan-2002 ho

str[n]{cpy,cat} -> strl{cpy,cat}, sprintf -> snprintf


Revision tags: OPENBSD_3_0_BASE
# 1.24 05-Oct-2001 ho

Extend the FIFO ui with the 'D A <level>' (to set all debug levels) and
'D T' (to toggle all logging on and off) commands. niklas@ ok.


# 1.23 02-Oct-2001 deraadt

change timeval to bpf_timeval; 32 bit in size, permitting much greater portability


# 1.22 18-Aug-2001 deraadt

careful with snprintf() == -1; ho, provos


# 1.21 10-Jul-2001 ho

(c)-2001


# 1.20 10-Jul-2001 ho

Rewrite packet capture to handle IPv6 addresses.


# 1.19 10-Jul-2001 markus

htonl() for null.null_family, ok niels@, ho@


Revision tags: OPENBSD_2_9_BASE
# 1.18 15-Apr-2001 ho

Style.


# 1.17 09-Apr-2001 ho

isakmpd can now capture un-encrypted IKE negotiation packets to a
file. In pcap(3) format, so tcpdump(8) can read it.
Idea by Tim Newsham <newsham@lava.net>, work by him and me.
Ok angelos@, niklas@


# 1.16 27-Jan-2001 niklas

(c) 2001


# 1.15 26-Jan-2001 niklas

Pedantic style police


# 1.14 12-Dec-2000 todd

pids are useful in syslog; ok angelos@


Revision tags: OPENBSD_2_8_BASE
# 1.13 07-Oct-2000 niklas

branches: 1.13.2;
Merge with EOM 1.30

author: niklas
no need for sysdep.h in here. This promotes reuse of the log
module in other environments

author: ho
(c)-2000


# 1.12 03-Aug-2000 niklas

Merge with EOM 1.28

author: niklas
From OpenBSD: be paranoid about the syslog format parameter


# 1.11 29-Jun-2000 deraadt

use %s when calling syslog


Revision tags: OPENBSD_2_7_BASE
# 1.10 07-Apr-2000 niklas

branches: 1.10.2;
Merge with EOM 1.27

author: ho
Add log_init() to properly initialize log_output variable.


# 1.9 25-Feb-2000 niklas

regress/crypto/Makefile: Merge with EOM 1.5
regress/dh/Makefile: Merge with EOM 1.7
regress/group/Makefile: Merge with EOM 1.9
regress/prf/Makefile: Merge with EOM 1.4
regress/rsakeygen/Makefile: Merge with EOM 1.8
regress/x509/Makefile: Merge with EOM 1.10
Makefile: Merge with EOM 1.62
attribute.c: Merge with EOM 1.10
sa.c: Merge with EOM 1.99
conf.c: Merge with EOM 1.20
crypto.c: Merge with EOM 1.28
isakmpd.c: Merge with EOM 1.45
connection.c: Merge with EOM 1.19
doi.h: Merge with EOM 1.28
field.c: Merge with EOM 1.11
exchange.c: Merge with EOM 1.116
ike_auth.c: Merge with EOM 1.44
pf_key_v2.c: Merge with EOM 1.37
ike_phase_1.c: Merge with EOM 1.22
ipsec.c: Merge with EOM 1.118
isakmp_doi.c: Merge with EOM 1.40
log.c: Merge with EOM 1.26
log.h: Merge with EOM 1.18
math_group.c: Merge with EOM 1.23
message.c: Merge with EOM 1.144
pf_encap.c: Merge with EOM 1.70
policy.c: Merge with EOM 1.18
timer.c: Merge with EOM 1.13
transport.c: Merge with EOM 1.41
udp.c: Merge with EOM 1.47
ui.c: Merge with EOM 1.37
x509.c: Merge with EOM 1.36

author: niklas
Made debug logging a compile time selectable feature


Revision tags: OPENBSD_2_6_BASE
# 1.8 26-Aug-1999 niklas

Merge with EOM 1.25

author: niklas
Ouch ho, that was ugly, make code portable


# 1.7 07-Jul-1999 niklas

Merge with EOM 1.24

author: ho
Release lock(s) on logfile when write fails.


# 1.6 19-Apr-1999 niklas

./log.c: Merge with EOM 1.23

Style

Make an attempt to handle failures in logging; disk full, etc.
We fallback to syslog(), which in turn has a fallback to /dev/console.

Move LOG_SIZE to log.h

Add LOG_REPORT to always go to logchannel regardless of level; misc small fixes

I did not need to do this but... style nits

Add class and level to debug messages

log time on -d mode

1999 copyrights


Revision tags: OPENBSD_2_5_BASE
# 1.5 26-Feb-1999 niklas

Merge from the Ericsson repository
| revision 1.15
| date: 1999/02/25 11:39:10; author: niklas; state: Exp; lines: +3 -1
| include sysdep.h everywhere
| ----------------------------


# 1.4 21-Dec-1998 niklas

Last months worth of work on isakmpd, lots done


# 1.3 17-Nov-1998 niklas

Add RCS Ids from the EOM repository


# 1.2 15-Nov-1998 niklas

openBSD RCS IDs


# 1.1 15-Nov-1998 niklas

branches: 1.1.1;
Initial revision