Commit Graph

67 Commits

Author SHA1 Message Date
Paul Wayper
f59e9f8ad4 Allow the log timestamp format to be set
This allows the timestamp format in log output to be set by a function.

Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-09-01 18:43:56 +10:00
Paul Wayper
5e87c44469 Merge turn_log_func_default and vrtpprintf
The function `turn_log_func_default` calls the function `vrtpprintf` to print to syslog
or the log file.  The latter does exactly the same string formatting as the former, so
here we merge the two functions into one to do the string formatting once.  This also
makes sure that the log line is consistent on all outputs.

Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-09-01 18:35:01 +10:00
Paul Wayper
16eeb53e07 Allow new log format to be turned on if required
This provides the 'use_new_timestamp_log_format' variable in `ns_turn_utils.h`.  By
default it is set to 0 and the old 'seconds since daemon was started' timestamp will
be emitted.  However, if it is set to 1 or any 'true' number the new date and time
timestamp format will be used instead.

This has also resulted in a small clean-up of some of the string length handling.

Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-08-31 22:34:54 +10:00
Paul Wayper
762ee23482 Fixing a few errors - C still coming back to me
Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-08-26 21:05:08 +10:00
Paul Wayper
599a61eea6 Print full date and time in logs
Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-08-25 21:46:15 +10:00
Mészáros Mihály
991a82e104
Merge branch 'master' into master 2020-04-28 09:47:20 +02:00
Mészáros Mihály
4722697645 Fix compiler warnings
* Changed type from int to size_t to avoid warning
  warning: comparison between signed and unsigned integer expressions
* Fixed string truncation warning
2020-03-03 15:26:01 +01:00
Bertold Van den Bergh
ace903fd07 Add support for loadbalanced TCP connections (haproxy protocol v2) 2020-02-13 01:56:43 +01:00
chanduthedev
25338fa1c0 added null check for second char 2019-11-11 15:01:14 +08:00
Mészáros Mihály
8c8af9ec85
Merge pull request #442 from chanduthedev/ssh-length
Updated incorrect string length check for 'ssh'
2019-10-22 13:17:32 +02:00
Robert Scheck
cfdb99dc72 Append only to log files rather to override them (fixes #416) 2019-10-22 11:40:26 +02:00
chanduthedev
9b0e53c18a
Updated incorrect string length check for 'ssh'
ssh length should be 3, but checking for 4. So updated memcmp method to 3 instead of 4.
2019-09-27 14:36:03 +08:00
islamoglus
82fbde71bd using SSL_get_version method for BoringSSL compatibility 2019-04-22 16:00:57 +03:00
Mészáros Mihály
8e4db32259 Fix free hiredis_libevent2.c 2019-03-11 11:35:09 +01:00
Bradley T. Hughes
d2ee3ac291 Remove [su]{08,16,32,64}bits type defines
Do not overload the standard types with #defines, just use them
directly.
2019-03-08 09:08:30 +01:00
Bradley T. Hughes
7663167dff Remove pointer debugging machinery
There are tools and debugging options that can be used instead. Do not
reinvent the wheel with our own pointer tracking/debugging code.
2019-03-07 08:39:20 +01:00
Bradley T. Hughes
7a43aae7c3 Remove ns_bzero(), ns_bcopy(), and ns_bcmp()
Do not overload bzero(), bcopy(), and bcmp() from strings.h
2019-03-07 08:39:20 +01:00
Bradley T. Hughes
043b102e38 Remove turn_strdup()
Do not overload strdup() from string.h
2019-03-07 08:00:08 +01:00
Bradley T. Hughes
abab870070 Remove turn_calloc()
Do not overload calloc() from stdlib.h
2019-03-07 07:59:04 +01:00
Bradley T. Hughes
b50fc77124 Remote turn_free()
Do not overload free() with a different API.
2019-03-07 07:58:12 +01:00
Bradley T. Hughes
31033c3ffa Remote turn_realloc()
Do not overload realloc() with a different API.
2019-03-07 07:57:35 +01:00
Bradley T. Hughes
fef016901e Remove turn_malloc()
Do not overload malloc() from stdlib.h
2019-03-06 23:38:20 +01:00
Bradley T. Hughes
ed91d4bc17 Remove turn_free_simple
Do not overload free() from stdlib.h
2019-03-06 23:34:25 +01:00
Mészáros Mihály
e4d6b57abc Realm not sanitized against sql statements 2018-12-07 13:48:05 +01:00
Mészáros Mihály
bb821cee2e refactor is_secure_username 2018-09-12 10:29:30 +02:00
Oleg Moskalenko
6aa8b7685b code cleaning 2017-03-26 20:11:03 -07:00
Richard Garnier
5a24333eaa max lifetime parameters 2016-09-20 13:57:31 +09:00
Oleg Moskalenko
a2c17748af cleaning 2016-08-27 20:18:42 -07:00
Oleg Moskalenko
79aed7d8b7 libreSSL compatibility 2016-08-27 16:49:26 -07:00
Oleg Moskalenko
2ad38333ea cleaning 2016-08-20 20:41:09 -07:00
Oleg Moskalenko
eec7e0cac9 basic OpenSSL 1.1.0 support 2016-08-20 18:49:30 -07:00
Oleg Moskalenko
51ca693359 SSLv3 support removed 2015-11-15 14:58:45 -08:00
Oleg Moskalenko
bd7937cb45 working on openssl compatibility without SSLv3 2015-10-11 18:51:26 -07:00
Oleg Moskalenko
6378b8b93f ALPN warnings fixed 2015-09-20 00:42:28 -07:00
Oleg Moskalenko
dbc9dee42b working on multi-tenant server based upon oauth 2015-09-14 00:16:13 -07:00
Oleg Moskalenko
25000742f4 issue 19 fixed 2015-08-28 22:55:34 -07:00
mom040267
cfe61ab284 fixing SQL injection problem 2015-06-28 06:02:34 +00:00
mom040267
153b2d1d41 fixing a security hole 2015-06-28 05:37:28 +00:00
mom040267
7a7faa6c5c Issues 11 and 12 fixed. 2015-05-28 06:27:32 +00:00
mom040267
6dbee00b74 working on new third-party auth draft 2015-04-19 07:37:12 +00:00
mom040267
86f40b4bd9 working on third-party auth 2015-04-19 06:18:28 +00:00
mom040267
948a61d250 SCTP fixes. 2015-04-03 06:54:10 +00:00
mom040267
8662de6d73 sctp fixes 2015-04-02 05:32:46 +00:00
mom040267
0496635edd fixing SCTP on Linux 2015-03-15 21:08:31 +00:00
mom040267
2e0b8aefcc TOS fixed 2015-02-04 06:14:11 +00:00
mom040267
3c40c14f40 working on new dual-allocation implementation 2015-01-31 23:25:45 +00:00
mom040267
b3098cd71d ssl2 removed 2015-01-10 23:29:08 +00:00
mom040267
ec0472bfde Redis read message queu bug fixed; 2014-12-15 03:53:15 +00:00
mom040267
4dfa8248a1 iauto ecdh curve parameters; docs. 2014-12-14 07:26:38 +00:00
mom040267
94c3c57456 DTLS code cleaning 2014-12-12 10:23:18 +00:00