Daniel Richard G
1c0c923ad1
Split g_file_open() into _ro() and _rw() variants
...
Rename g_file_open() to g_file_open_rw(), and add a new g_file_open_ro()
call that wraps the common g_file_open_ex(file, 1, 0, 0, 0) idiom. This
will make the file access mode more explicit in the code.
Change all calls to g_file_open() to the _ro() or _rw() variant as
appropriate, and replace g_file_open_ex(file, 1, 0, 0, 0) with the _ro()
call.
Lastly, add tests for the two new calls to test_os_calls.c (code
courteously provided by matt335672).
2023-05-15 17:38:31 -04:00
matt335672
1c798cee47
Logging: Add LOG_DEVEL_LOG_LEAKING_FDS
2023-04-24 14:20:14 +01:00
matt335672
b811fdb36b
os_calls: Add g_file_{get,set}_cloexec() functions
...
Allows us to avoid file descriptor leaks when running a new executable
2023-04-24 11:11:04 +01:00
Koichiro IWAO
ec2f165af4
log: fix syslog glitch after #2386
...
The tail of new datetime format was sticking out.
2023-02-09 17:09:28 +09:00
Alexander Pevzner
79d6219d9d
Code formatting fixed
2022-11-04 22:18:02 +03:00
Alexander Pevzner
d6e888cf38
Use LogFile=<stdiut> instead of LogFile=- to redirect log to stdout
2022-11-03 14:44:58 +03:00
Alexander Pevzner
59ca0e1c58
LogFile=- redirects log to stdout, which is useful for debugging
2022-11-02 17:00:44 +03:00
Koichiro IWAO
662011a757
log: add some more comments
2022-10-11 09:56:40 +09:00
Koichiro IWAO
db96239982
log: quit using lrint and -lm
2022-10-11 09:56:36 +09:00
Koichiro IWAO
aca05c4f2e
log: change date format to ISO8601-like
...
Former format: "[20221007-16:36:02] "
New format: "[2022-10-07T16:36:04.357+0900] "
2022-10-11 09:55:33 +09:00
matt335672
2484928a5a
Change 3rd parameter of log_start() to flags field
2022-03-04 11:37:45 +00:00
matt335672
a94ddce0bd
logging : Remove processing for unused variables
2022-03-03 17:02:18 +00:00
Nexarian
a0f4d94cfe
Fix NPEs in log.c
...
Multiple NPEs can happen in the internal_log_config_copy procedure,
and we need to address this before we merge in changes for egfx.
2022-02-14 14:45:43 -05:00
matt335672
b0f3b13cff
Fix minor memory leaks
2021-10-11 19:30:47 +01:00
Alexandre Quesnel
52707ac686
Fixing formatting with astyle
2021-05-08 16:58:11 +00:00
Alexandre Quesnel
b8d02823d1
Extracting bytes_to_hexdump function from logging implementation
2021-03-26 13:58:27 +00:00
matt335672
1e13533048
Remove output on stdout by default on daemon startuip
2021-01-07 10:50:16 +00:00
Alexandre Quesnel
a4f3471707
Fixing code location log level filtering
2020-12-23 03:56:23 +00:00
matt335672
5523847540
Allow FuseMountName for chansrv to be absolute path
2020-12-21 12:36:31 +00:00
matt335672
633716bbad
sesrun improvements and doc fixes
2020-12-09 11:44:17 +00:00
matt335672
8d994a547d
Add log_config_init_for_console() for utilities
2020-11-30 11:04:21 +00:00
Alexandre Quesnel
0c61a15fc5
Migrating logging to LOG() and LOG_DEVEL() in sesman/*
2020-11-30 00:36:20 +00:00
Jay Sorg
f3b47b33cd
build fix for older gcc
2020-11-12 23:22:23 -08:00
Alexandre Quesnel
a9ec1ebd99
Unifying logging in chanserv
...
This commit adds:
* replace multiple logging macros with LOG and LOG_DEVEL
* logging configuration for chanserv
* logging configuration for console output
* logging configuration for per file or method log level filtering for
debug builds
* file, line, and method name in log message for debug builds
2020-10-19 05:10:47 +00:00
matt335672
ebc21fe180
Added -c / --config to xrdp
2020-10-16 10:55:23 +01:00
matt335672
61b9a42fc5
Fixed compiler warnings about snprintf truncations
2020-09-02 10:32:38 +01:00
matt335672
27653f97f2
Code changes for cppcheck 2.1 warnings
2020-06-19 11:07:23 +01:00
daixj
31ef2552c4
log: revert permission
2018-02-13 16:44:37 +09:00
daixj
ea6bb62410
log: fix fd checking
2018-02-13 16:44:37 +09:00
daixj
551bb185c5
log: remove unused code and fix potential memory leak
2018-02-13 16:44:37 +09:00
Koichiro IWAO
d0c27a2904
common: suppress log when closing log files
...
because if xrdp is running 'fork=yes' mode, the log message
'shutting down log subsystem...' is logged everytime when the child
process is exitting. In other words, everytime when clients are
disconnecting. This is a little bit too vebose.
2017-11-30 15:13:18 +09:00
Koichiro IWAO
2411a0be14
log: add log level TRACE
...
TRACE means more verbose than DEBUG. syslog doesn't have more verbose
level than DEBUG, map TRACE to DEBUG for syslog.
2017-10-13 15:09:33 +09:00
Pavel Roskin
6ed4c969f4
Eliminate APP_CC and DEFAULT_CC
2017-03-14 00:21:48 -07:00
Pavel Roskin
b2d3dcf169
Include config_ac.h from all source files
2017-03-04 00:52:34 -08:00
Jay Sorg
e0ac84aaa4
change some casts to long long
2017-02-22 20:39:56 -08:00
Jay Sorg
7825246d7a
fix warning new since stdint.h change
2017-02-22 20:39:56 -08:00
Pavel Roskin
6fef1e4eb5
Use const pointers in function arguments when possible
2016-10-17 08:54:07 -07:00
Pavel Roskin
5829323ad8
Use g_new or g_new0 when C++ compiler would complain about implicit cast
2016-07-08 04:29:49 +00:00
Pavel Roskin
951e632757
Make program_name constant, don't duplicate or free it
2016-07-08 04:27:07 +00:00
Pavel Roskin
ca9cbcafc8
Typo fixes
2016-05-04 23:33:30 -07:00
Jay Sorg
89f449aa01
common: set log file fd to close on exec
2015-09-27 01:25:07 -07:00
Jay Sorg
7695f3d87b
common: fix logic for internal_log_end
2015-09-27 01:24:14 -07:00
Jay Sorg
2cb2de7277
common: log, g_ prefix for global
2014-07-25 22:42:07 -07:00
Laxmikant Rashinkar
3bb31876e7
coverity: fixed resolution leak issues
2014-07-19 11:56:00 -07:00
Jay Sorg
374633e63f
common: no logic change, update comments
2014-03-01 23:26:40 -08:00
Jay Sorg
1a616a1b46
move text2bool to os_calls
2013-08-24 22:41:44 -07:00
Jay Sorg
c6fa03102f
copyright year update
2013-06-08 10:51:53 -07:00
ArvidNorr
fe69d2f07b
Comments and debug when blocking channels added. Fix for potential vulnerability in log.c
2013-02-01 10:00:39 +01:00
LawrenceK
e47a9cea97
Allow for any non 0 and the string to also be true. These are the tests used elsewhere in the xrdp code.
2013-01-17 11:31:01 +00:00
Laxmikant Rashinkar
1123323fda
o moved from GNU General Public License to Apache License, Version 2.0
...
o applied new coding standards to all .c files
o moved some files around
2012-09-19 20:51:34 -07:00