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>
Michal Bloch [Tue, 19 Dec 2017 10:32:56 +0000 (11:32 +0100)]
logger: add --no-drop-privileges
For use when the daemon is not run as root.
Change-Id: I8060f70105bfce6cc5439c1e2aae6493a53cd339
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Dawid Kuczma [Tue, 12 Dec 2017 09:44:34 +0000 (10:44 +0100)]
dlogsend: add logging from standard input
Use
dlogsend
dlogsend --
to log from standard input.
Change-Id: If8f1ae86f9a0e67f941a47fc93c18e11b84be247
Michal Bloch [Fri, 1 Dec 2017 10:07:28 +0000 (11:07 +0100)]
config: remove syslog log source
Currently syslog handling is disabled in the daemon,
because it is not needed in Tizen.
Change-Id: Id8b446d9c336622adb29706eb593f08e10105560
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 15 Nov 2017 14:57:36 +0000 (15:57 +0100)]
logger: use named pipes w/ User::App:Shared label
Unnamed pipes use the daemon's label which is `System::Run`,
preventing dlogutil from accessing them when ran without root.
Change-Id: I2f58b6bf0fb1572bfffdf5fe74b9596ee40688d9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 3 Nov 2017 15:40:28 +0000 (16:40 +0100)]
util: remove unused variables
Change-Id: Ic1aacc425325374a72fb8199f3b69581f3370118
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 3 Nov 2017 09:58:02 +0000 (09:58 +0000)]
Merge "Extract log pushing out of the main loop." into tizen
Karol Lewandowski [Fri, 3 Nov 2017 09:57:13 +0000 (09:57 +0000)]
Merge "fcntl SETFL wrappers return the error value" into tizen
INSUN PYO [Fri, 27 Oct 2017 07:44:02 +0000 (16:44 +0900)]
Coverity fixes.
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Ie70d8bfb57ee7be291f326b3a5cafb26d9d79907
Michal Bloch [Fri, 27 Oct 2017 15:54:34 +0000 (17:54 +0200)]
Extract log pushing out of the main loop.
Change-Id: Ic9ebb1eee62f08e612ca9b3f70288784e193ad9c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 27 Oct 2017 10:22:17 +0000 (12:22 +0200)]
fcntl SETFL wrappers return the error value
Change-Id: I401a22f30707b8cc0643c6d26cb22620ab7b5bd9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 27 Oct 2017 12:02:35 +0000 (12:02 +0000)]
Merge changes I99afed7f,Ib0dacc9f into tizen
* changes:
Fix string null termination.
Replace a magic constant.
Karol Lewandowski [Fri, 27 Oct 2017 12:01:54 +0000 (12:01 +0000)]
Merge "logger: type correctness" into tizen
Karol Lewandowski [Fri, 27 Oct 2017 12:01:36 +0000 (12:01 +0000)]
Merge "Fix a documentation generation warning" into tizen
INSUN PYO [Fri, 27 Oct 2017 04:58:14 +0000 (13:58 +0900)]
Coverity fixes.
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I2db14f6046ad3d65bab4a720b19e0577e1e02aed
Michal Bloch [Wed, 13 Sep 2017 11:59:29 +0000 (13:59 +0200)]
logger: type correctness
Reduce the amount of implicit type conversions for better type safety.
Change-Id: I534cdf16ddef6bf3b8e0b4a4a5d69814dcee9350
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 24 Oct 2017 10:16:47 +0000 (12:16 +0200)]
Fix string null termination.
Change-Id: I99afed7f160f4839dd790ea2f989bb491e84223f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 25 Oct 2017 13:20:10 +0000 (15:20 +0200)]
Replace a magic constant.
Change-Id: Ib0dacc9f113b34298785d6fee1c1db3fb2ef50d8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 24 Oct 2017 11:17:24 +0000 (13:17 +0200)]
Fix a documentation generation warning
Fixes "end of file while inside a group", accidentally
introduced in
0746fc5da519e290b67e96f75fc4c315fc44bd98
Change-Id: I00321fcff21b0dc24cbf48ef4c9546453269ec45
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Tue, 24 Oct 2017 10:23:43 +0000 (10:23 +0000)]
Merge "logger: simplify signal handling" into tizen
Karol Lewandowski [Tue, 24 Oct 2017 10:19:56 +0000 (10:19 +0000)]
Merge changes I6a86ce01,I03d9457d,I35d21d71,I39a487e8,I0e5cf156 into tizen
* changes:
util: dynamic growth for the sorting container
util: use dynamic containers for log source lists
shared: expand the list interface
util: change enabled buffer list to bitflags
util: extract functions out of the main loop
sanghyeok.oh [Mon, 16 Oct 2017 07:59:56 +0000 (16:59 +0900)]
Coverity fix
Change-Id: I872bc5ad2e838a72d5a6de7b68ea664c3d4d7410
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
Michal Bloch [Thu, 28 Sep 2017 15:30:43 +0000 (17:30 +0200)]
Remove `atoi_check_numeric` in favour of `sscanf`
Let's not reinvent the wheel.
Change-Id: I75874d1c6c9cc0054def2e85525a28fbd2c227e8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
INSUN PYO [Tue, 10 Oct 2017 08:26:54 +0000 (17:26 +0900)]
Coverity fix
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Ie31a0b06a8afb94c46ca59fdb75b0beef7241176
Michal Bloch [Thu, 14 Sep 2017 11:22:21 +0000 (13:22 +0200)]
util: dynamic growth for the sorting container
* the sorting container now grows as needed
* size parameters now set initial size
Change-Id: I6a86ce01702fe11186fd6b77559e38d50ef327ea
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 29 Sep 2017 10:46:18 +0000 (12:46 +0200)]
util: use dynamic containers for log source lists
Fixes a crash when >16 --dumpfile passed.
Change-Id: I03d9457d66efbceb26fe2e1fb1809458d19f5693
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 15 Sep 2017 13:20:24 +0000 (15:20 +0200)]
shared: expand the list interface
* list_clear
* list_at
* list_next
Change-Id: I35d21d71e3af007222bee859d482265eb93726c3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 27 Sep 2017 16:42:05 +0000 (18:42 +0200)]
util: change enabled buffer list to bitflags
Fixes a crash when >16 -b options are specified.
Change-Id: I39a487e80d25127515b98a39bfaa20a0f0d88310
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 26 Sep 2017 13:38:03 +0000 (15:38 +0200)]
util: extract functions out of the main loop
Change-Id: I0e5cf15678b8886cbec7a65fbf3bbb0c64301d42
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 22 Sep 2017 15:26:11 +0000 (17:26 +0200)]
Fix SVACE issues.
Change-Id: I0499a41c47fb89b333f2642b31c21272e9f4e993
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 26 Sep 2017 15:55:34 +0000 (17:55 +0200)]
logger: simplify signal handling
Change-Id: Ide15ed5fc9c652a86b60b234f4dc16ea8ef12fa0
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Tue, 19 Sep 2017 10:21:59 +0000 (10:21 +0000)]
Merge "shared: fix android logger entry parsing" into tizen
Michal Bloch [Wed, 13 Sep 2017 15:12:05 +0000 (17:12 +0200)]
util: extract fdi_free
Change-Id: Ie936b495e501684a33428d5a8194c0332dfbd887
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 15 Sep 2017 12:54:44 +0000 (14:54 +0200)]
shared: fix android logger entry parsing
Also fixes max payload size on pipe backend being 16 bytes lower than supposed to.
Change-Id: I6a3b429b3603102bfd87c96b0a0bcad4b86e1a21
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 15 Sep 2017 10:21:12 +0000 (10:21 +0000)]
Merge "util: disallow -b and --dumpfile together" into tizen
Michal Bloch [Thu, 17 Aug 2017 10:27:43 +0000 (12:27 +0200)]
logger: reader keeps buffer by ptr instead of id
Change-Id: I074c4cfe12f5cdd208e4bb635ddbb5faed78295d
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 7 Sep 2017 16:37:02 +0000 (18:37 +0200)]
util: disallow -b and --dumpfile together
No known valid use case.
Removal allows code simplification.
Change-Id: I86be0c3c7edb5a643690eec1e9e154eda078c9d6
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Fri, 8 Sep 2017 15:03:06 +0000 (15:03 +0000)]
Merge "dlog_test: Drop bashisms" into tizen
Youngjae Shin [Fri, 8 Sep 2017 05:57:32 +0000 (14:57 +0900)]
remove build warning
Change-Id: I6ee67ce1bf32aff1c26b4e043173cfd0712f8849
Karol Lewandowski [Thu, 7 Sep 2017 16:32:15 +0000 (16:32 +0000)]
Merge "dlogctrl: drop" into tizen
Karol Lewandowski [Thu, 7 Sep 2017 16:31:21 +0000 (16:31 +0000)]
Merge changes Ie62eadbc,I62184bdf into tizen
* changes:
logger: improve poor variable naming
logger: remove g_file_buffer
Karol Lewandowski [Thu, 7 Sep 2017 16:27:44 +0000 (16:27 +0000)]
Merge "shared: make headers C++ friendly" into tizen
Karol Lewandowski [Fri, 25 Aug 2017 11:11:52 +0000 (13:11 +0200)]
dlog_test: Drop bashisms
Change-Id: I6bca400bc4be272265d0e54756f5526945021fa3
Michal Bloch [Mon, 4 Sep 2017 15:08:47 +0000 (17:08 +0200)]
dlogctrl: drop
dlogctrl was used to edit main dlog config file. This functionality
was superseded by "Extensible config" (
1554eb9f3), which allows adding
configuration snippets to configuration directory (by default it is at
/etc/dlog.conf.d, additionally controlled by DLOG_CONFIG_PATH env var).
Change-Id: I061c73064a6192cedcdc171ec45528cebbe94a96
Michal Bloch [Wed, 6 Sep 2017 14:47:06 +0000 (16:47 +0200)]
logger: improve poor variable naming
"Buffer" used to be used for two different things.
Change-Id: Ie62eadbc81d2334934d6531c0a5b51e2423d8052
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 21 Aug 2017 17:29:49 +0000 (19:29 +0200)]
shared: make headers C++ friendly
Change-Id: I93578a9cd54fdf97e3faf7de40c5c5c4da9d2881
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Wed, 6 Sep 2017 10:50:56 +0000 (12:50 +0200)]
logger: remove g_file_buffer
There is no evidence this buffering was ever needed.
We can also use fwrite instead should the need arise.
Change-Id: I62184bdf1a7a4529b48a8ee40a1e9c17a202332e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Wed, 6 Sep 2017 10:31:28 +0000 (12:31 +0200)]
logger: Fix -h option handling
Commit
a7f94864f ("[4.0] logger: Major initialization refactor") broken
-h option handling.
This commit restores original behaviour - -h makes server exit after
printing help screen.
Change-Id: If5084bece8eb4e2a182ffaaf7d09a2073576d5eb
Karol Lewandowski [Tue, 5 Sep 2017 21:52:43 +0000 (21:52 +0000)]
Merge "Revert "Add Android logger backend configuration file."" into tizen
Karol Lewandowski [Tue, 5 Sep 2017 16:31:52 +0000 (16:31 +0000)]
Merge changes I387ff0bf,I7c687a7b,I0688f428,I58dc8880,I8278bca1 into tizen
* changes:
logger: introduce buffering defaults
logger: decouple epoll and buffering timeouts
logger: make byte-based buffering per-reader
logger: add reader helper functions
logger: refactor circular buffer helpers
Michal Bloch [Thu, 17 Aug 2017 11:46:54 +0000 (13:46 +0200)]
logger: introduce buffering defaults
Change-Id: I387ff0bf745325a946260e12628effb8906fbf0f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 17 Aug 2017 14:56:06 +0000 (16:56 +0200)]
logger: decouple epoll and buffering timeouts
Change-Id: I7c687a7bf7246f5301ad245471b4545c787ca8f5
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 17 Aug 2017 14:56:06 +0000 (16:56 +0200)]
logger: make byte-based buffering per-reader
Change-Id: I0688f428adeb5a40c225237585feef4ee7683573
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 17 Aug 2017 15:07:33 +0000 (17:07 +0200)]
logger: add reader helper functions
Change-Id: I58dc8880cb8d2aae575a80bddd83cdf94ac41c26
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 17 Aug 2017 15:06:46 +0000 (17:06 +0200)]
logger: refactor circular buffer helpers
* make data types unsigned when conceptually appropriate
* extract circular distance calculation (for use in further changes)
Change-Id: I8278bca1cc06c4bc9fb3efb9b37a50bf86205593
Karol Lewandowski [Tue, 29 Aug 2017 15:31:29 +0000 (17:31 +0200)]
logutil: pipe: Raise sorting buffer sizes
To sort messages in order sort buffer size must be >= size of sorted
log messages.
This commit raises the defaults and limits to ensure that sort buffer
is big enough.
Change-Id: I596133cb8aa5a442b074d340464293b4a1400f6b
Karol Lewandowski [Fri, 25 Aug 2017 10:59:46 +0000 (12:59 +0200)]
Revert "Add Android logger backend configuration file."
This reverts commit
1d2ee4c83384c11bba81044b8722d8f3a41b6d4b.
Originally it meant to support RPi3-specific kernel logger
configuration change, but it was not accepted in the kernel
itself.
Change-Id: I3da8cc3ec43fc8bfafb81c514fda340a44e6553b
Karol Lewandowski [Fri, 25 Aug 2017 12:31:45 +0000 (12:31 +0000)]
Merge "logutil: move a generic function to logcommon" into tizen
Michal Bloch [Fri, 18 Aug 2017 15:42:17 +0000 (17:42 +0200)]
logutil: move a generic function to logcommon
Change-Id: I85de720e8784a4a8650e7b597e5877dfdebacc09
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 21 Aug 2017 13:44:19 +0000 (15:44 +0200)]
logger: remove nonexistent `-k` option
Change-Id: I9d34270419b3de01d4575fe4b48fab5b3a74c757
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Yunmi Ha [Fri, 18 Aug 2017 08:11:17 +0000 (17:11 +0900)]
Modify 3.0 to 4.0 upgrade script
Change-Id: I13d8b9002b453630df16c89a4b2da71f1bf0de44
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Karol Lewandowski [Fri, 18 Aug 2017 09:01:15 +0000 (09:01 +0000)]
Merge "Fix: logutil: pipe: Do not depend on snprintf() return value for calculations" into tizen
Karol Lewandowski [Thu, 17 Aug 2017 12:51:04 +0000 (12:51 +0000)]
Merge "logutil: pipe: Do not send rotation parameters" into tizen
Karol Lewandowski [Thu, 17 Aug 2017 12:50:36 +0000 (12:50 +0000)]
Merge "logutil: pipe: Do not send buffer name directly" into tizen
Karol Lewandowski [Thu, 17 Aug 2017 08:13:31 +0000 (10:13 +0200)]
Fix: logutil: pipe: Do not depend on snprintf() return value for calculations
snprintf() can return numers of characters that "would have been
written if buffer would be large enough", not actual characters
written.
This commits reworks logger request command construction to
avoid snprintf().
Problem pointed out by κΉμμ <won0.kim@samsung.com> (thank you!)
Change-Id: I664cc0ce779eaff3c004e47fd5102b0576295630
Karol Lewandowski [Wed, 16 Aug 2017 14:41:57 +0000 (14:41 +0000)]
Merge "logger: handle logs of odd length correctly" into tizen
Karol Lewandowski [Wed, 16 Aug 2017 13:54:38 +0000 (15:54 +0200)]
logutil: pipe: Do not send rotation parameters
These parameters are interpreted locally by dlogutil and must not
be transferred to the server.
Change-Id: Iafed8915c16afb05d721a139f8e7baaf86a70128
Michal Bloch [Wed, 16 Aug 2017 12:08:19 +0000 (14:08 +0200)]
logger: handle logs of odd length correctly
If there was only one byte left before the buffer wraps around,
the length field, which consists of 2 bytes, would end up torn apart,
yielding garbage on naive read attempts.
While libdlog did ensure to write only even-length logs, this could
not be relied upon when not using it: this includes kmsg and, potentially,
malicious users.
Change-Id: I7ec3777d650ec2642812b27e87de5e16e0dd72fc
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Wed, 16 Aug 2017 10:55:38 +0000 (12:55 +0200)]
logutil: pipe: Do not send buffer name directly
For pipe backend, in order to get logs from particular buffer
we need to connect to appropriate socket. Sending buffer name
over wire is unnecessary and potentially dangerous.
Change-Id: Ibe18292b627bfbec277dd0dbf378ce054e0c9f54
Karol Lewandowski [Wed, 16 Aug 2017 10:42:13 +0000 (12:42 +0200)]
logutil: pipe: Rework logutil request
This commit introduces iovec+writev() usage to construct logutil
request instead of malloc. This allows us to simplify error handling
a bit.
Additionally, fix dlog_control_msg payload length calculation -
it needs to have at most MAX_LOGGER_REQUEST_LEN (including
terminating null byte).
Change-Id: Ib9ab85355a6760a26a9250b20f4ea0dc1b1b2532
Karol Lewandowski [Wed, 16 Aug 2017 10:36:24 +0000 (12:36 +0200)]
logutil: pipe: Simplify clear command
Change-Id: I0c14ec2e05d62e8d197f37dd655a5892b32bb0ba
Karol Lewandowski [Tue, 8 Aug 2017 15:58:45 +0000 (17:58 +0200)]
logutil: Move sorting vector initialization out of main
Change-Id: Id1cb99838dc24ccdb04a3e7dc00508b4f883d7fe
Michal Bloch [Fri, 4 Aug 2017 14:45:36 +0000 (16:45 +0200)]
Refactor libdlog initialisation
Change-Id: Ifda65c610c5496fa270a826eac3dc2cc8217dd57
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Karol Lewandowski [Thu, 10 Aug 2017 12:09:14 +0000 (14:09 +0200)]
logger: Print warning when dlogutil config line did not come with -f (required)
Change-Id: I8d317c258950fc5e3ec3adcf0372ef49fe90d4ee