Maciej Slodczyk [Fri, 25 May 2018 19:41:29 +0000 (21:41 +0200)]
testsuite: add more descriptive output
Change-Id: I5d9555fa2f476f4f62da6cf9e5ee93ad17abaa7f
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Fri, 25 May 2018 18:24:55 +0000 (20:24 +0200)]
testsuite: add sorting test scripts
Change-Id: Ia91e649af6c0aa191b9034445813ccca6fd2fd6e
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Fri, 25 May 2018 18:01:00 +0000 (20:01 +0200)]
testsuite: introduce reliable cleanup
Handles both usual and abnormal exits.
Change-Id: Ic28753e00d23beb5bfa4ddbbaf267a6bb12c754e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 28 May 2018 11:39:20 +0000 (13:39 +0200)]
testsuite: now has its own folder
Running inside the /tmp folder is a potential security issue.
Change-Id: I540deabb722a828a522adc52982056d2690524d9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 20 Apr 2018 14:45:42 +0000 (16:45 +0200)]
pipe: remove padding for odd-length messages
Since
154c5eaaf1ecf6224de0bcafc872c4952ffdae9b, the padding
is no longer needed as the daemon handles odd lengths correctly.
Change-Id: I722efc2e5e73f26f1896510da857a42bbfebed9c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Maciej Slodczyk [Mon, 23 Apr 2018 09:09:28 +0000 (11:09 +0200)]
shared: fix wrong payload size when parsing android logger message
There's priority in the first byte of payload which was stripped
off but the payload size was not correctly adjusted to take this
fact into account. Now the size is calculated correctly.
Change-Id: I66227d65ca7198190419df92da8a59b9099db091
Karol Lewandowski [Fri, 20 Apr 2018 15:18:46 +0000 (15:18 +0000)]
Merge "shared: hot fix for wrong computing of message length" into tizen
Adrian Szyndela [Fri, 20 Apr 2018 14:22:02 +0000 (16:22 +0200)]
shared: hot fix for wrong computing of message length
log_format_log_line() in its final stage (starting from line 804),
adds prefix and suffix for each line. To prepare for it,
it computes lineLen by iterating to next end-of-line. Then it
simply substracts two pointers.
The iterating condition checks only if the iteration goes beyond
the message and characters are not end-of-line. However,
sometimes the total length of the message in log_entry is larger than
actual message (TODO! Check why! It is not OK!). In such case
computed line length may be larger than actual string length.
Then, strings are concatenated (up to NUL bytes), but the destination
buffer pointer is moved by too large value, effectively skipping
trailing NUL.
This patch corrects the computation of line length, taking into
account that there may actually be (potentially rogue) NUL byte
hidden somewhere inside the message.
Change-Id: Iadd04045d28c67e947e6f0066f592196f53d9781
Michal Bloch [Fri, 20 Apr 2018 11:19:44 +0000 (11:19 +0000)]
Merge "logger: a bunch of fixes for memory leaks" into tizen
Adrian Szyndela [Fri, 20 Apr 2018 10:09:54 +0000 (12:09 +0200)]
logger: a bunch of fixes for memory leaks
Change-Id: Id519bb6489a9ba52e3a8b32cdce2c144bab08217
Karol Lewandowski [Thu, 19 Apr 2018 13:55:41 +0000 (13:55 +0000)]
Merge "pipe: Do not wait for pipe_fd indefinitely" into tizen
Karol Lewandowski [Thu, 19 Apr 2018 11:12:21 +0000 (13:12 +0200)]
pipe: Do not wait for pipe_fd indefinitely
In the case of dlog_logger crash dlog clients
will try to reconnect to server and receive pipe_fd
for logging again. However, if dlog_logger is being
dumped (in Tizen - by crash-worker), clients will be
able to connect to the socket and request the new
pipe_fd, but recv() for fd will make client block
forever.
This commit works around this problem by introducing
finite timeout for which recv can wait.
Change-Id: Iddbbe668a084a2d0f4fcb2c34b80737d8c4c7eb6
Hyotaek Shim [Mon, 16 Apr 2018 04:43:13 +0000 (13:43 +0900)]
Add .gitignore
Change-Id: Ibea939edeb45994de2c9b2eadfa1e4d3f2653f8b
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Wook Song [Fri, 13 Apr 2018 06:29:54 +0000 (15:29 +0900)]
shared: Fix issue with pointer casting on 64bit system
The type casting from the pointer of a signed int value to the pointer
of a signed long value (time_t, especially in this patch) could provide
unintended result in 64bit system. This patch fixes this issue related
to using the localtime/localtime_r function.
Change-Id: Ief46cc079a64e628c1219dc7638a494264583af5
Signed-off-by: Wook Song <wook16.song@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Hyotaek Shim [Wed, 11 Apr 2018 08:56:02 +0000 (17:56 +0900)]
Fix build error with HAVE_LOCALTIME_R
Change-Id: Ia276b3728b7a42d5813fac2ba27d0315b2ed2fe8
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Maciej Slodczyk [Tue, 3 Apr 2018 11:11:17 +0000 (13:11 +0200)]
Remove unnecessary log_entry struct
After removal of unnecessary entry parsing between
two formats it is pointless to keep the log_entry
struct.
Change-Id: I5eb84554a5be299d6aeb2f47d7ae02f7f54bd8c1
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Maciej Slodczyk [Tue, 27 Mar 2018 10:11:23 +0000 (12:11 +0200)]
Storage format keeps cached priority
Change-Id: I2b60fe7909b60883133fd9ff7bb39879e8548253
Michal Bloch [Wed, 4 Apr 2018 13:58:29 +0000 (15:58 +0200)]
dlog_logger daemon: handle epoll dynamically
The daemon used to have a static array for 1024 FDs (ie. the default
file descriptor limit). This was both wasteful in the usual case, as
usually this value is not reached, and incorrect otherwise, because
this limit can be increased, causing any extra FDs to starve.
Change-Id: Ifc61a2cecbfb1b78fcf00abe9655f02147f8316f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Adrian Szyndela [Mon, 9 Apr 2018 11:38:06 +0000 (13:38 +0200)]
logger: fix leaking log_storage_readers
log_storage_reader was not freed at all...
Credit for finding to MichaĆ Bloch <m.bloch@samsung.com>.
Change-Id: I9af873a563f47919cc61b21ac226d7e8ceccaac5
Adrian Szyndela [Mon, 9 Apr 2018 09:55:14 +0000 (11:55 +0200)]
logger: fix for use-after-free in log storage
A report from ASAN build has shown a bug while freeing a storage.
When a dumping reader was created with no available logs it
was disconnected from storage, but put into waiting_readers.
This commit changes log_storage_new_reader() in a way that
a reader is added to waiting_readers only if it is connected
to the storage.
Change-Id: Id6033fe73e86674384feb2fafb9b3814f0f0b73e
Michal Bloch [Fri, 6 Apr 2018 13:57:42 +0000 (15:57 +0200)]
util: fix dump mode not ending
An important bit of code sat inside a snippet only otherwise useful with
binary files and accidentally got culled alongside them during their
recent removal (cf.
31655fb8b716991ecfdc8e2422a0bb3e05305b1b)
Change-Id: I69e8b329edc62248df2a23a114c099720bc15d09
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 4 Apr 2018 13:04:32 +0000 (15:04 +0200)]
util: remove dynamic sort vector growth
This reverts
f9b568e5484d85d373033b2bf6857ef39cfc5c39.
Dynamic growth was originally implemented to help improve sorting quality.
However, it removes the bound on memory usage and was discovered to cause
starvation in case of a constant flow of logs. The need for very large
vectors has also recently been reduced with the implementation of sorting
in the daemon (cf. commit
e937e788bfcf4d4e791dac47099f998c778dd4fc,
"logger: inserting logs in ordered way to the buffers").
Change-Id: I6d0c89531ea7aca28b9062a4054b9975e25f0d36
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 4 Apr 2018 12:52:31 +0000 (14:52 +0200)]
util: fix a crash on -u 0 and -u 1
The sorting vector was not allocated in those cases
since it was not actually needed, but an assumption
had erroneously been introduced that it always exists.
Change-Id: I231be3cc80975792a5b5cbf6a668cd8308e43a31
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Maciej Slodczyk [Mon, 26 Mar 2018 12:07:18 +0000 (14:07 +0200)]
Remove unnecessary entry parsing
Change-Id: Ia79f67e5f42702ef70ed64b2e8b76f963d63b99b
Maciej Slodczyk [Wed, 28 Mar 2018 13:47:13 +0000 (15:47 +0200)]
remove unused callback function
struct log_file has a callback function pointer, set by
logfile_open() and used when handling binary files in
daemon. Since binary files support is removed, it is no
longer needed.
Change-Id: Idee02b1f2c3e9af2cad26c68f10ae0fb903f9730
Maciej Slodczyk [Thu, 22 Mar 2018 15:18:38 +0000 (16:18 +0100)]
util: remove binary files support, plaintext only
Binary files support is no longer needed as log entries
are now sorted by daemon.
Change-Id: Ia24712bb23b45606e477c43fa036e2904a2f45ee
Maciej Slodczyk [Thu, 22 Mar 2018 15:16:08 +0000 (16:16 +0100)]
daemon: don't create binary files, plaintext only
Binary files support is no longer needed as log entries
are now sorted by daemon.
Change-Id: I84dee5b25af358ad9de73a6209e7969b7d892b98
Michal Bloch [Tue, 20 Mar 2018 11:08:01 +0000 (12:08 +0100)]
Storage format keeps cached tag length
It has to be done at some point anyway, so do it once and be
done with it forever (previously each util reparsed the message
on its own). It's also progress towards unifying the two "entry"
structures.
Change-Id: I17f7ef2675070c228c764743a53e0a64892dd2cb
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 23 Mar 2018 13:11:57 +0000 (14:11 +0100)]
KMSG parser: refactor
Remove some variables that are no longer needed now that extended-kmsg
has been removed. Add commentary.
Change-Id: Ica194fca05694216bbd3b3d6d6f733122feafbfa
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 20 Mar 2018 13:56:38 +0000 (14:56 +0100)]
Remove inplace KMSG parsing
KMSG messages were parsed in-place, which made the process fragile
and prone to break in case the log format was changed.
Change-Id: Ie3517e172806bd54cdb3164578065cf9ab848426
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Tue, 27 Mar 2018 08:49:19 +0000 (10:49 +0200)]
logconfig: Remove dead code
Remove functions that were created for dlogctrl
utility, removed from codebase in commit 06d8039.
Change-Id: I2ff44899e60abe58c5b7bc33d9eee90c0a1a1464
Adrian Szyndela [Thu, 1 Mar 2018 14:40:58 +0000 (15:40 +0100)]
logger: inserting logs in ordered way to the buffers
This commit introduces new storage for log entries.
It sorts incoming log entries by their time on the fly.
Change-Id: I4f498d67ca03950d0424fbb3fc28b9187e0bfe51
Michal Bloch [Tue, 27 Mar 2018 09:55:30 +0000 (09:55 +0000)]
Merge "logger: refactor print_out_logs - extracted for single log" into tizen
Adrian Szyndela [Fri, 16 Mar 2018 13:35:32 +0000 (14:35 +0100)]
logger: refactor print_out_logs - extracted for single log
This patch extracts printing out of a single log entry
from print_out_logs() to a separate function
reader_print_out_single_log().
This is going to be used in further development.
Change-Id: I5ca8290e15bbda1b3512e5ac508b8d94827303eb
Maciej Slodczyk [Fri, 23 Mar 2018 11:42:49 +0000 (12:42 +0100)]
util: fix possible buffer overflows
Change-Id: I3f6b411fa03e9301f627e19f36c72546b58a7ab0
Michal Bloch [Tue, 20 Mar 2018 11:01:49 +0000 (11:01 +0000)]
Merge "shared: const correctness" into tizen
Michal Bloch [Tue, 20 Mar 2018 11:01:34 +0000 (11:01 +0000)]
Merge "Fix cast to enum" into tizen
Michal Bloch [Fri, 16 Mar 2018 12:37:40 +0000 (13:37 +0100)]
shared: const correctness
An unneeded line was preventing a handful of functions from being const.
Change-Id: I34f288f828505f4fd1a133efaaf3cb1f0d7656e1
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 16 Mar 2018 13:48:10 +0000 (14:48 +0100)]
Fix cast to enum
Checks against values outside the enum range are legal for the compiler
to optimize out, ergo they have to be done before the cast.
Change-Id: I3059b3a16e6331c3a3a1389f0a4acfbae1d3a16f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 16 Mar 2018 09:03:10 +0000 (10:03 +0100)]
packaging: Hardcode udev rules directory location to avoid cyclic dependency
DLog did build-depend on udev devel package, as it does provide information
where udev rules are located on the system in the form of RPM macros (_udevrulesdir).
udev is part of systemd, which caused libsystemd-devel package to be installed
for the build.
In situations where someone wants to use dlog in a library that is
required by systemd this would create a cyclic build dependency:
systemd -> dlog -> library -> systemd.
Change-Id: Ia8c929ccffe169bfcb08b84ad3d273b4edd38ab5
Michal Bloch [Fri, 16 Mar 2018 11:37:10 +0000 (12:37 +0100)]
packaging: fix path convention
Be safe and assume path macros do not necessarily end with '/'.
Change-Id: I5302500d92724b86e27ae782aa621456c5bb1ce7
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 13 Mar 2018 13:34:04 +0000 (14:34 +0100)]
Handle payload sizes correctly
Change-Id: Ie809ace9b5463025caeefdbbda9d8d237bb318b9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 12 Mar 2018 11:05:50 +0000 (12:05 +0100)]
util: add license to recently added files
Change-Id: Idb96f30717ae0a9e3274a09d903cfcd1e08e029f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Thu, 8 Mar 2018 10:33:23 +0000 (10:33 +0000)]
Merge "dlogutil: add pid and tid based filtering" into tizen
Maciej Slodczyk [Thu, 15 Feb 2018 12:29:46 +0000 (13:29 +0100)]
dlogutil: add pid and tid based filtering
Add dlogutil command line options to specify pid and tid
list to be passed to daemon and filter log output by.
Change-Id: Icf233d8e01fec32a25ca2ec28791bf4e7642222f
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Michal Bloch [Fri, 2 Mar 2018 09:12:14 +0000 (10:12 +0100)]
util: standarize output destination
Errors used to end up either in stdout or stderr without any apparent
pattern. All errors will now end up in stderr, with stdout being used
only for actual logs (or, in case of -g, the size).
Additionally, rename the _E and _D macros to ERR and DBG respectively
since there is a convention in application code that that these are
for sending logs to dlog itself.
Change-Id: Ie53fc55d4ad47a1d7cf28278d5b5392e58d9be1e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 7 Mar 2018 12:53:28 +0000 (13:53 +0100)]
util: fix wrong errno being reported
If an Android Logger ioctl failed, and then the debug message produced due to
this failure also failed, the errno reported would be the one from the debug,
not the one from the ioctl.
Change-Id: Iae1a3a40e20ebc6f4823252a111804a043665e02
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 7 Mar 2018 13:04:40 +0000 (14:04 +0100)]
util: don't consider -h an execution failure
Explicitly requesting help is no longer considered a program execution failure.
Being shown the help due to invalid parameters is still considered a failure.
Change-Id: Iacfbbcd8249926ec9607dee84299ea48c5aa13f3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
lokilee73 [Mon, 5 Mar 2018 09:18:54 +0000 (18:18 +0900)]
Fix typing error
Change-Id: Id541effe76d4aec610f2105a14522531d15cb1d5
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Michal Bloch [Tue, 27 Feb 2018 11:19:04 +0000 (12:19 +0100)]
util: handle epoll fd correctly
Handle creation failure and close after use.
Change-Id: Iafaf888e18183f09ea9990c535cdec1ff9fd4f50
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 27 Feb 2018 09:43:21 +0000 (10:43 +0100)]
util: fix premature exit in dump mode
The program would end when epoll reported no ready file descriptors.
This was incorrect as data could still be awaiting to be put into
the fd when dlogutil read data from a pipe faster than dlog_logger
could feed it. Android Logger relied on this behaviour to exit when
there were no logs to read as there would not be a read() to trigger
the exit through its regular "log_len quota filled" exit path, but is
otherwise unaffected.
Change-Id: I58abc94dba9d161de684a73fe585b3efa764d0f8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 26 Feb 2018 13:35:59 +0000 (14:35 +0100)]
util: workaround an Android Logger driver bug
GET_LOG_LEN always returns as if the connection were using protocol version 2,
even if the connection is actually using version 1. Since read does not suffer
from this problem, there is a mismatch between the total sum accumulated over
multiple reads and value reported by GET_LOG_LEN, which results in more logs
being read than is necessary. The reason it appears to work correctly when no
extra logs are present to make up the difference is that util also ends when
epoll returns zero ready file descriptors, which is an incorrect behaviour as
it can happen even with more data awaiting, for example when dlog_logger daemon
cannot keep up and fills a pipe slower than util can read it.
Change-Id: I3e48cedbc4a73d778316c1ebfeb555aa97e7d8b3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 22 Feb 2018 13:42:02 +0000 (13:42 +0000)]
Merge "replace inplace android log entry parsing" into tizen
Maciej Slodczyk [Tue, 13 Feb 2018 12:25:15 +0000 (13:25 +0100)]
replace inplace android log entry parsing
android_logger_entry was parsed to logger_entry inplace
and caused problems when the latter was extended. Allocate
separate memory for each other so that they don't overlap.
Change-Id: I9ec9c47b9709e3a1c5a6deba5da97a91be6492db
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Michal Bloch [Thu, 15 Feb 2018 13:03:49 +0000 (14:03 +0100)]
util: minor mainloop refactor
Change-Id: Ia02b4866857eb0328eb6a22a53fc2986e6046265
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 8 Feb 2018 14:58:16 +0000 (15:58 +0100)]
util: getsize now asks the appropriate device
Additionally, the GETSIZE request now explicitly uses a 32 bit type
so that the protocol does not leave the width undefined.
Change-Id: I1189f2734c670ee68ca76448b8efc410939df952
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 8 Feb 2018 14:16:32 +0000 (15:16 +0100)]
util: unify external request handling
Change-Id: I3b970acba37904c9a175185a68c0c0820d44f27b
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 8 Feb 2018 13:12:09 +0000 (14:12 +0100)]
util: add buffer ops
Change-Id: Id0fee76de71e46565afde89afaf906d3f11a34b7
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 9 Feb 2018 14:07:41 +0000 (14:07 +0000)]
Merge "Improve filtering capabilities of filterspecs" into tizen
Radoslaw Bartosiak [Wed, 31 Jan 2018 12:56:06 +0000 (13:56 +0100)]
Improve filtering capabilities of filterspecs
Add tag prefix specifier (prefix*) to show messages
with tags starting with given prefix
Add equals specifier (=E) to show only given priority messages
Change-Id: I85ad96b13da20f8c11ce28dacbeea179b39f1f1b
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
Michal Bloch [Wed, 7 Feb 2018 19:06:18 +0000 (20:06 +0100)]
util: handle filters correctly
* for pipe-backend, do not create a filter locally as the daemon
already does that.
* do not disable sorting based on filter count as it is orthogonal
to sorting (it is possible for many processes to share a tag).
Change-Id: I21932344861b3c8d418e39c569ace62e8cb454c0
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 7 Feb 2018 16:09:33 +0000 (17:09 +0100)]
util: extract fd_info to subfiles
Change-Id: I79569ea5bd91cc23a6b9a168f66de337a518a6f1
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 7 Feb 2018 15:30:00 +0000 (16:30 +0100)]
util: extract sort_vector to a separate file
Change-Id: Id18abbaefc2ca317802944ebebb6a1c150071ca4
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Thu, 8 Feb 2018 11:26:05 +0000 (11:26 +0000)]
Merge "packaging: fix post-script requirements" into tizen
Michal Bloch [Thu, 8 Feb 2018 11:09:16 +0000 (11:09 +0000)]
Merge "Fix missing nullptr check after call to malloc" into tizen
Michal Bloch [Thu, 8 Feb 2018 10:55:40 +0000 (10:55 +0000)]
Merge "shared: add a way to receive control msg reply" into tizen
Michal Bloch [Thu, 8 Feb 2018 10:55:09 +0000 (10:55 +0000)]
Merge "Fix variable shadowing." into tizen
Radoslaw Bartosiak [Thu, 8 Feb 2018 07:42:45 +0000 (08:42 +0100)]
Fix missing nullptr check after call to malloc
Change-Id: If4753a68897e2780b162c22bee6a9c2b0b826cb6
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
Michal Bloch [Wed, 7 Feb 2018 17:39:14 +0000 (18:39 +0100)]
Fix a missing header include
`[f]printf` requires `stdio.h`
Change-Id: I80437216477480abcf3511b4b77f5a29aeea2bb9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 7 Feb 2018 15:04:31 +0000 (16:04 +0100)]
Fix variable shadowing.
Change-Id: Icb88cd9a624d0f1e85e784d716898b291c3b9608
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 29 Jan 2018 10:26:35 +0000 (11:26 +0100)]
shared: add a way to receive control msg reply
Change-Id: Ice96f49aaf8982c73747c05e351a16abcabec15e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 5 Feb 2018 15:39:08 +0000 (16:39 +0100)]
packaging: fix post-script requirements
Change-Id: I4034d0affd64f73de37ceb74c317125bec6765fa
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 2 Feb 2018 13:02:49 +0000 (14:02 +0100)]
Fix a missing header include
`int32_t` requires `stdint.h`.
Change-Id: Ibdbadcdd6ead5f3e2c32a8cc46b4ee85edcd337c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 26 Jan 2018 09:05:24 +0000 (10:05 +0100)]
Release 0.7
This release brings numerous changes and incompatibilities, including:
- incompatible change of dlogutil->dlog_loggger protocol (to be able
to signal errors),
- server will now drop privileges automatically to log:log
(user:group), consequently --no-drop-privileges cmd line option and
"owner" fields in configs have been dropped,
- backend configuration files moved to dlog.conf.d, allowing to
remove hacky %post* scripts.
Additionally:
- logsend enhancements - send each message multiple times; print stats,
- new GETSIZE command support in server to get buffer size from util
added,
- libdlog code unification (with no functional change),
- change in util behaviour - it will now warn if specified buffer is
unavailable,
- moved configuration options to configure.ac,
- cleaned up packaging.
Lastly, update autoconf.ac with current contact points and add
AUTHORS, listing known major contributors.
Change-Id: I4d14790d54b0b1adab0398fc5f9b00466ce7bfb1
Karol Lewandowski [Thu, 25 Jan 2018 13:55:45 +0000 (14:55 +0100)]
logutil: warn when it was not possible to access specified buffer
Additionally, fail if it wasn't to possible to access at least one buffer.
Change-Id: I4ff103b119b57d726f9ed3475d23f180c7236dc5
Karol Lewandowski [Tue, 23 Jan 2018 15:22:14 +0000 (16:22 +0100)]
Rework per-backend package setup
This commit makes dlog use of the new "dlog.conf.d" extensible
configuration mechanism to select desired backend by installing
appropriate configuration to (/opt/)etc/dlog.conf.d.
Change-Id: I4a0db1ac3a6d708a457edb0b232f9a540cb54378
Karol Lewandowski [Fri, 26 Jan 2018 10:55:40 +0000 (10:55 +0000)]
Merge "Pass configuration paths directly from configure" into tizen
Karol Lewandowski [Fri, 26 Jan 2018 10:55:34 +0000 (10:55 +0000)]
Merge "libdlog: Unify common parts of dlog API" into tizen
Karol Lewandowski [Tue, 23 Jan 2018 15:20:11 +0000 (16:20 +0100)]
Pass configuration paths directly from configure
This change removes duplicated definitions of paths,
that are now defined in just one place - configure.ac.
Change-Id: If759c41ba32b4ed728bbf9f98b46bcdfbac57715
Karol Lewandowski [Thu, 25 Jan 2018 14:37:41 +0000 (15:37 +0100)]
libdlog: Unify common parts of dlog API
This commit reworks logic behind (__)dlog_(v)print
family of functions, removing copy paste code.
Change-Id: I76cdb39c6831c325427383f00f027bb4d6fe27bf
Michal Bloch [Wed, 24 Jan 2018 12:19:45 +0000 (12:19 +0000)]
Merge "util: extract getopt from main" into tizen
Michal Bloch [Wed, 24 Jan 2018 10:39:21 +0000 (10:39 +0000)]
Merge "logsend: send each message multiple times; print statistics" into tizen
Adrian Szyndela [Tue, 23 Jan 2018 08:33:10 +0000 (09:33 +0100)]
logsend: send each message multiple times; print statistics
This commit adds two simple features:
1. Sending each message multiple times.
This is aimed to help with testing dlog performance;
2. Printing statistics.
Prints time taken by each sending operation.
Change-Id: I1c1dc935ea93e7e1ea9aa5cbbc5c4399c2efb171
Karol Lewandowski [Mon, 22 Jan 2018 09:29:03 +0000 (10:29 +0100)]
libdlog: Add missing static for __dlog_fatal_assert
Change-Id: I7d571900947c3c6a456900d8ce3e91d94c981a42
INSUN PYO [Wed, 17 Jan 2018 07:08:22 +0000 (16:08 +0900)]
spec: change uid, gid and permision of /usr/lib/tmpfiles.d/dlog-run.conf
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I7ae8d05b0c03871117bcc790557012b7a4dc0791
Karol Lewandowski [Thu, 18 Jan 2018 15:55:21 +0000 (16:55 +0100)]
logger: Drop privileges to build-time settings as early as possible
Change-Id: If8972bcb5e9c7bfbc13c5ff88e45f0acfa4f1546
Karol Lewandowski [Thu, 18 Jan 2018 15:47:57 +0000 (16:47 +0100)]
logger: Drop ability to specify sockets' owner and group
Server will run with reduced privileges and changing these
will not be possible anymore.
Change-Id: Ie26b888ab6366196f9008133b2efbad0a51344ae
Karol Lewandowski [Thu, 18 Jan 2018 15:40:10 +0000 (16:40 +0100)]
Revert "logger: add --no-drop-privileges" and partially "logger: set starting credentials to log:log"
This reverts commit
4ab20e23751ab0da5abbeee8be338844139c05c6.
Additionally, it reverts parts of
0fc4cf8f874c3ace41f9b5de4e0347a8c738ef43,
which added --no-drop-privileges flag. This is done once to avoid
dlog_server failing to start .
Change-Id: I1050f24b1f001e2667f030e375eaf55a3ec8c714
Karol Lewandowski [Thu, 18 Jan 2018 15:36:05 +0000 (16:36 +0100)]
logger: Move dlog_logger's user and group definition to one place
It's now possible to set with which user and group dlog_server will
run using configure's --enable-server-user= and --enable-server-group=
options.
Change-Id: I5f4e1605280c80dfa143856c87a852ebf96a9e7c
Karol Lewandowski [Thu, 18 Jan 2018 11:52:26 +0000 (12:52 +0100)]
Move service configuration under control of automake
This is necessary service configuration and it needs
to be kept together with rest of dlog. Additionally,
it will be needed in further commits to pre-process
the service files according to ./configure flags/conf.
Change-Id: Ia52d395406135c9a14310e2fad5d9d653e472968
Karol Lewandowski [Thu, 18 Jan 2018 11:33:51 +0000 (12:33 +0100)]
dlog_logger: service: Drop invalid dloginit.service reference
dloginit.service was used with kmsg backed, which was removed in commit
29550842a ("[4.0] kmsg-backend removed").
Change-Id: I9905eceb0082a8f1fb3ed5189d7325e745274fa7
Karol Lewandowski [Thu, 18 Jan 2018 11:25:38 +0000 (12:25 +0100)]
packaging: Drop duplicate manifest files
Change-Id: I930622898dde9566af7e0daed1ff3f4fd548bbf4
Michal Bloch [Fri, 5 Jan 2018 16:17:48 +0000 (17:17 +0100)]
logger: add get size request
Change-Id: I082213f0b46d24583d3cd0ae9208e32001552246
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 12 Jan 2018 15:49:19 +0000 (16:49 +0100)]
logger: always reply to pipe requests
Even on failure
Change-Id: Ifc69fc0161fa236fbc27eb5e823969d1d2edf0bf
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 9 Jan 2018 10:20:02 +0000 (11:20 +0100)]
Refactor control messages
* remove flags (present implicitly, unused explicitly)
* add request result
Change-Id: Ib751ddf85e9aec9286dda78cf27cc2aad8fcb8d3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 5 Jan 2018 14:14:37 +0000 (15:14 +0100)]
util: extract getopt from main
Change-Id: I66f219bf5324fc5ade188afe060598379ac82a34
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 5 Jan 2018 13:26:40 +0000 (13:26 +0000)]
Merge "New pipe input format to reduce redundancy" into tizen
Michal Bloch [Wed, 6 Dec 2017 15:10:33 +0000 (16:10 +0100)]
New pipe input format to reduce redundancy
The new format does not send (ignored) reception timestamps.
Change-Id: Iaa804253552d080254a5dd1a4c72913e5a9b9d09
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Hyotaek Shim [Fri, 22 Dec 2017 07:13:03 +0000 (16:13 +0900)]
Add Capabilities=cap_syslog=i for dlog_logger
When CONFIG_SECURITY_DMESG_RESTRICT is enabled in the kernel(/dev/kmsg),
CAP_SYSLOG is required for access.
Change-Id: I65d6a682f25020ed34a1d0972551633d1b9f1730
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Michal Bloch [Tue, 19 Dec 2017 11:14:34 +0000 (12:14 +0100)]
logger: set starting credentials to log:log
Change-Id: I03094e9f0b90a07c5ded7789ecd061021523d270
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Michal Bloch <m.bloch@samsung.com>