platform/core/system/crash-worker.git
2 years agoMerge branch 'tizen' into tizen_6.5 11/270511/1 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20220207.144510 accepted/tizen/6.5/unified/20220220.211457 submit/tizen/20220219.163952 submit/tizen_6.5/20220203.172658 submit/tizen_6.5/20220204.125734 submit/tizen_6.5/20220219.164008
Karol Lewandowski [Thu, 3 Feb 2022 17:22:12 +0000 (18:22 +0100)]
Merge branch 'tizen' into tizen_6.5

Change-Id: If9a4b49cfadd84ea46158ddea02bf6fa94627ba5

2 years agoFix realpath(3) memory leak 96/270496/1 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0 tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.060611 accepted/tizen/7.0/unified/hotfix/20221116.105659 accepted/tizen/unified/20220204.132338 accepted/tizen/unified/20220220.211421 submit/tizen/20220203.172140 submit/tizen/20220219.164033 tizen_7.0_m2_release
Karol Lewandowski [Thu, 3 Feb 2022 11:40:06 +0000 (12:40 +0100)]
Fix realpath(3) memory leak

Change-Id: Ic2e2264a8dab194884decfa5acb9035ea712b149

2 years agoMerge branch 'tizen' into tizen_6.5 08/269308/1 accepted/tizen/6.5/unified/20220113.123443 submit/tizen_6.5/20220112.233015
Mateusz Moscicki [Wed, 12 Jan 2022 15:17:26 +0000 (16:17 +0100)]
Merge branch 'tizen' into tizen_6.5

Change-Id: I94db8e053e4755b667d8df0cf40cede18e3b1769

2 years agoRelease 7.0.1 07/269307/1 accepted/tizen/unified/20220114.130110 submit/tizen/20220112.233041
Mateusz Moscicki [Wed, 12 Jan 2022 15:16:08 +0000 (16:16 +0100)]
Release 7.0.1

Change-Id: I4d0e812752f4d396668bbca7da1b6222c3261dff

2 years agoFix the release of ELF data resources 06/269306/1
Mateusz Moscicki [Wed, 12 Jan 2022 14:52:29 +0000 (15:52 +0100)]
Fix the release of ELF data resources

Change-Id: I66810a17c4fa04db981a6c325e6a054a334d0bfb

2 years agoMerge branch 'tizen' into tizen_6.5 06/268906/1 accepted/tizen/6.5/unified/20220105.120554 submit/tizen_6.5/20220104.145815
Mateusz Moscicki [Tue, 4 Jan 2022 14:39:55 +0000 (15:39 +0100)]
Merge branch 'tizen' into tizen_6.5

Change-Id: I67520dc1f5baa3ecb970a89422567410b94d0317

2 years agoRelease 7.0.0 03/268903/3 accepted/tizen/unified/20220105.120700 submit/tizen/20220104.145800
Mateusz Moscicki [Tue, 4 Jan 2022 13:57:30 +0000 (14:57 +0100)]
Release 7.0.0

Change-Id: Ibb09b26050346252f4c8b7caeffbb0c804a60175

2 years agoRemove 500.crash-manager-upgrade.sh 02/268902/2
Mateusz Moscicki [Tue, 4 Jan 2022 13:28:23 +0000 (14:28 +0100)]
Remove 500.crash-manager-upgrade.sh

This script prepares directories and permissions when upgrading from
Tizen 5.5 to 6.0. Therefore it is no longer needed.

Change-Id: I1c4b4baeea02c4b0c9ac4131da297352b72399ce

2 years agoRelease 6.5.22 71/264371/1 accepted/tizen/6.5/unified/20211028.114240 accepted/tizen/unified/20210917.124812 submit/tizen/20210916.121713 submit/tizen_6.5/20211028.162501 tizen_6.5.m2_release
Karol Lewandowski [Thu, 16 Sep 2021 11:44:41 +0000 (13:44 +0200)]
Release 6.5.22

Change-Id: Ib867761ec1c4089efd85f8e5f94a74f932d21683

2 years agopackaging: Drop unneeded BuildRequires 70/264370/1
Karol Lewandowski [Thu, 16 Sep 2021 11:33:44 +0000 (13:33 +0200)]
packaging: Drop unneeded BuildRequires

Not only it was in wrong section but there is already
BuildRequires: pkgconfig(diagnostics) in top section.

Change-Id: I66dac6e85a82f350c56675bd370c68a586d299bf

2 years agopackaging: Update license specifications after relicensing parts of codebase 69/264369/1
Karol Lewandowski [Thu, 16 Sep 2021 11:31:39 +0000 (13:31 +0200)]
packaging: Update license specifications after relicensing parts of codebase

Additionally, rename LICENSE to LICENSE.Apache-2.0 for clarity.

Change-Id: If2eb9621ad0808970521d64a5dfe8099913ec2b3

2 years agoAdd missing license header to crash-json2info 68/264368/1
Karol Lewandowski [Thu, 16 Sep 2021 11:29:39 +0000 (13:29 +0200)]
Add missing license header to crash-json2info

Change-Id: Id9d16738ab457a78cba9192deb64b0640d39946c

2 years agoRelicense crash-manager to MIT 33/264233/1
Karol Lewandowski [Tue, 14 Sep 2021 13:11:52 +0000 (15:11 +0200)]
Relicense crash-manager to MIT

This includes relicensing:
 - crash-manager - the standalone program, which uses libcrash-manager
 - libcrash-manager - library that contains most of the logic

After this change libcrash-manager can be safely combined with GPL-2.0
binaries.

Change-Id: I564837e3ffe7ae5291b8e92bf1199f6277e04017

2 years agosystem-tests: Fix behavior when dump directory is missing 32/253932/2
Mateusz Moscicki [Fri, 19 Feb 2021 10:41:07 +0000 (11:41 +0100)]
system-tests: Fix behavior when dump directory is missing

Since crash-manager is responsible for creating dump directory
(commit 96a11f21e013e1de3d02ee438c4291d55de56e9e), the
absence of this directory cannot be considered as an error.

Change-Id: I8db05869c951b3d9b893a223d020dc146ba9455f

2 years agoRelease 6.5.21 42/259742/1 accepted/tizen/unified/20210615.215243 submit/tizen/20210611.114327 submit/tizen/20210615.092029
Mateusz Moscicki [Fri, 11 Jun 2021 11:23:35 +0000 (13:23 +0200)]
Release 6.5.21

Change-Id: I8d58aab1e533cb1563d9f053df79a73ea72e8963

2 years agoMerge "telf: Fix uninitialized pointer read" into tizen
Mateusz Mościcki [Fri, 11 Jun 2021 10:54:11 +0000 (10:54 +0000)]
Merge "telf: Fix uninitialized pointer read" into tizen

2 years agotelf: Fix uninitialized pointer read 38/259738/1
Mateusz Moscicki [Fri, 11 Jun 2021 10:39:29 +0000 (12:39 +0200)]
telf: Fix uninitialized pointer read

Change-Id: I8bf8dbed9af82c895ec3040eeafdb03a0d74fd04

2 years agobugreport-service: fix memory leak 25/259725/1
Karol Lewandowski [Fri, 11 Jun 2021 10:20:40 +0000 (12:20 +0200)]
bugreport-service: fix memory leak

Change-Id: I8609072ca5a0eaf55c613390ece3d58b891e6d51

2 years agoRelease 6.5.20 98/258998/2 accepted/tizen/unified/20210531.130334 submit/tizen/20210528.151917
Mateusz Moscicki [Fri, 28 May 2021 15:15:21 +0000 (17:15 +0200)]
Release 6.5.20

Change-Id: I6f2ecd6a3c5ac242ae6e8783c528dd4a76cad0d5

2 years agoMerge "Continue creating a report even if an error has occured" into tizen
Karol Lewandowski [Fri, 28 May 2021 15:08:42 +0000 (15:08 +0000)]
Merge "Continue creating a report even if an error has occured" into tizen

2 years agoContinue creating a report even if an error has occured 16/258916/1
Mateusz Moscicki [Thu, 27 May 2021 20:44:40 +0000 (22:44 +0200)]
Continue creating a report even if an error has occured

If an error occurs during minicoredump or dumpsystemstate creation,
report creation is not aborted to preserve as much information about the
crash as possible.

Change-Id: I133eae76335fb0a3a2f6d676393a23576493a44c

2 years agocrash-stack: Drop dead code 11/258911/1
Karol Lewandowski [Thu, 27 May 2021 12:12:37 +0000 (14:12 +0200)]
crash-stack: Drop dead code

Change-Id: Ib463525ae36cd1db3910748e3246e327dc13533f

3 years agocrash-manager: Fix memory leak 25/258425/1
Mateusz Moscicki [Mon, 17 May 2021 10:47:57 +0000 (12:47 +0200)]
crash-manager: Fix memory leak

Change-Id: I022a378b011f1f7220f87946c85eca2e7ec8553c

3 years agoTest: remove duplicated link option 03/257903/1
INSUN PYO [Thu, 6 May 2021 07:08:46 +0000 (16:08 +0900)]
Test: remove duplicated link option

Change-Id: I38948f1902482922e5876574bfb42091cce98713

3 years agoRelease 6.5.19 91/257691/3 accepted/tizen/unified/20210505.141406 submit/tizen/20210430.131845 submit/tizen/20210505.030411
Mateusz Moscicki [Thu, 29 Apr 2021 11:30:23 +0000 (13:30 +0200)]
Release 6.5.19

Change-Id: I164d956ca37d4d87dccc1db74039cc022796702b

3 years agocrash-manager: Provide TID as optional value of an -i option 76/257776/2
Mateusz Moscicki [Fri, 30 Apr 2021 10:21:48 +0000 (12:21 +0200)]
crash-manager: Provide TID as optional value of an -i option

Since %i can only be specified in core_pattern since kernel 3.18,
crash-manager must handle the situation where no value is specified for
this parameter. This is implemented in this commit, but the value for
the -i parameter must be specified without spaces.

Change-Id: I2cc2ff5d527a638c0f52df180c3875daf6208e02

3 years agocrash-manager: Fix TID finding 90/257690/2
Mateusz Moscicki [Thu, 29 Apr 2021 10:57:55 +0000 (12:57 +0200)]
crash-manager: Fix TID finding

To find a thread ID that crashed crash-worker checked if
/proc/<pid>/tasks/<pid>/wchan contains pipe_wait or do_coredump.
Additionally it should check if pipe_write is there, because since
kernel 5.10 this content is for the thread that crashed.

Change-Id: Ic45913306d4f5b39ae704abdd58bbd79fef5e7cd

3 years agoRelease 6.5.18 15/257015/1 accepted/tizen/unified/20210423.073215 submit/tizen/20210421.201602
Karol Lewandowski [Fri, 16 Apr 2021 11:50:34 +0000 (13:50 +0200)]
Release 6.5.18

Change-Id: I8c73d1521e36364090d4ac42fd08cc9bc59a1ceb

3 years agoRevert "packaging: Package only bugreport-service and dumpsystemstate-service for TV" 14/257014/1
Karol Lewandowski [Fri, 16 Apr 2021 11:50:06 +0000 (13:50 +0200)]
Revert "packaging: Package only bugreport-service and dumpsystemstate-service for TV"

This reverts commit 15e78af58e90069dff13201dfcc89035664ba650.

Change-Id: Id7951c0beaa7322eb3db5e75865e6bb9f601312e

3 years agobugreport-service: Get bugreport based on event data 27/256827/5 accepted/tizen/unified/20210417.022231 submit/tizen/20210416.144436
Mateusz Moscicki [Fri, 9 Apr 2021 10:57:15 +0000 (12:57 +0200)]
bugreport-service: Get bugreport based on event data

A bugreport identifier is sent along with BugreportCreated event so that
client can request the details of the bugreport to which the event
related:

  static void bugreport_created_cb(diagnostics_ctx_h ctx, void *user_data)
  {
      ...
      const char *params[] = {"--type", "crash-info-json"};
      diagnostics_data_h data;
      diagnostics_get_data(ctx, params, ARRAY_SIZE(params), &data);

      size_t bytes;
      char buff[1024];
      diagnostics_data_read(data, buff, sizeof(buff), 0, &bytes);
      ...
  }

  int main()
  {
      ...
      diagnostics_set_notification_cb(bugreport_created_cb, NULL);
      diagnostics_subscribe_event("BugreportCreated", "org.tizen.bugreport-service");
      g_main_loop_run(mainloop);
      ...
  }

Change-Id: I056f16743e656504dcefe0972eae00bc4b6f58ab

3 years agobugreport-service: Add the ability to get coredump file from a report 88/256188/5
Mateusz Moscicki [Tue, 30 Mar 2021 16:32:19 +0000 (18:32 +0200)]
bugreport-service: Add the ability to get coredump file from a report

This commit adds two more report types that can be obtained:

  coredumptar  - tared coredump file
  fullreport   - zipped report

New types can only be used with a specified report, the identifier of
which must be given as the call argument.

Change-Id: I5c769224c5f5ef89c5d1cc5070a7a4af8a7e0b8a

3 years agobugreport-service: Add crash-info-json report type 87/256187/3
Mateusz Moscicki [Tue, 30 Mar 2021 16:20:56 +0000 (18:20 +0200)]
bugreport-service: Add crash-info-json report type

Change-Id: I7a3a1878085e64852fe19ca44a1045de6f71150f

3 years agoRevert "Fix build error" 70/256270/2
Hyotaek Shim [Wed, 31 Mar 2021 23:55:09 +0000 (23:55 +0000)]
Revert "Fix build error"

This reverts commit 437d159c204e5cae9b5ea6c8a7d294dc73b421af.

Change-Id: I72df3308c18fef162740c783f80c897e31c7a7fc

3 years agoRelease 6.5.17: Fix resource leaks 59/256259/4 accepted/tizen/unified/20210401.105943 submit/tizen/20210331.120928
Karol Lewandowski [Wed, 31 Mar 2021 09:54:41 +0000 (11:54 +0200)]
Release 6.5.17: Fix resource leaks

Change-Id: I3f4b6031baba78e3db2105020db3cbe24f3736e8

3 years agoFix build error 23/256223/1 accepted/tizen/unified/20210331.104644 submit/tizen/20210331.055612
Hyotaek Shim [Wed, 31 Mar 2021 05:49:20 +0000 (14:49 +0900)]
Fix build error

[  101s] /home/abuild/rpmbuild/BUILD/crash-worker-6.5.16/tests/system/utils/
libbugreport-servicetest.c:46:51: error: 'CS_ERR_NO_ERROR' undeclared (first use in this function)
[  101s]    46 |  printf("res: %s (%d)\nreport_path: %s\n", res == CS_ERR_NO_ERROR ? "true" ...
[  101s]       |                                                   ^~~~~~~~~~~~~~~

Change-Id: I5f9588ee8c3b9f9be15169a848ac6082e67ce042
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoFix memory leak and remove the unused code 06/256006/3 accepted/tizen/unified/20210330.111258 submit/tizen/20210329.082152 submit/tizen/20210329.184123
Mateusz Moscicki [Fri, 26 Mar 2021 08:58:19 +0000 (09:58 +0100)]
Fix memory leak and remove the unused code

Change-Id: Ic746786b2c76314d671a18d992a25451c564197f

3 years agoRelease 6.5.16: Various fixes 43/255943/6 submit/tizen/20210325.112955
Karol Lewandowski [Thu, 25 Mar 2021 07:38:23 +0000 (08:38 +0100)]
Release 6.5.16: Various fixes

 - Restore /opt/usr/share/crash/dump directory for tizen smoke scripts
 - Fix TV build

Change-Id: Id64d47dae3e592089ba1c02c79365af7a19791dc

3 years agobugreport-service uses the default crash_root_path when there is no config file 49/255949/2
Mateusz Moscicki [Thu, 25 Mar 2021 10:13:42 +0000 (11:13 +0100)]
bugreport-service uses the default crash_root_path when there is no config file

Change-Id: If5d6b0b0323576a27e115a407c3130a2bac2111f

3 years agoRelease 6.5.15: bugreport-service fixes 83/255883/1 submit/tizen/20210324.085352
Karol Lewandowski [Wed, 24 Mar 2021 20:26:55 +0000 (21:26 +0100)]
Release 6.5.15: bugreport-service fixes

This release fixes up two important issues with bugreport-service:
 - null-terminate array of getopt args to avoid crash on arg parsing
 - default to 'bugreport' report type when it's not specified

Change-Id: I7e99d19cfacb7f1193314a9dd4c6256b9aa25503

3 years agoRelease 6.5.14 80/255880/2
Mateusz Moscicki [Wed, 24 Mar 2021 12:59:04 +0000 (13:59 +0100)]
Release 6.5.14

Change-Id: Ib05ad5ca226f68e88d3dd9b842f8232dd359042d

3 years agoMove the bugreport library to the diagnostics repository 78/255878/3
Mateusz Moscicki [Wed, 24 Mar 2021 11:54:02 +0000 (12:54 +0100)]
Move the bugreport library to the diagnostics repository

Change-Id: I05ee9089e4fa74fa58f0a8554aa67e82a10372f2

3 years agoFix svace issues 88/255788/3
Mateusz Moscicki [Tue, 23 Mar 2021 14:32:43 +0000 (15:32 +0100)]
Fix svace issues

Change-Id: Ic4935bd22bccaa3f07f7cbd57055f5f7bfe58ff1

3 years agoChange livedump_pid() return codes 58/255758/4
Konrad Kuchciak [Tue, 23 Mar 2021 09:55:39 +0000 (10:55 +0100)]
Change livedump_pid() return codes

livedump_pid() returns 0 on success, otherwise a negative error value
TIZEN_ERROR_PERMISSION_DENIED - privilege error
TIZEN_ERROR_NO_SUCH_PROCESS - no such process
TIZEN_ERROR_IO_ERROR - other error

Change-Id: If961771e745e98212ca9ded959dfa504b197f030
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
3 years agobugreport-service: Add return error code about no process for livedump_pid() method 87/255787/2
Mateusz Moscicki [Tue, 23 Mar 2021 11:29:18 +0000 (12:29 +0100)]
bugreport-service: Add return error code about no process for livedump_pid() method

Change-Id: I9f0182b9b857c4aca685d495f568c1fbd48a8b37

3 years agoCheck dbus bugreport.admin privilege for accessing livedump_pid 86/255786/1
Mateusz Moscicki [Mon, 22 Mar 2021 13:10:46 +0000 (14:10 +0100)]
Check dbus bugreport.admin privilege for accessing livedump_pid

Change-Id: Ia41d63e1f461454cb9f9d297113624e96bdb3ca6

3 years agocrash-stack: Drop unused get_threads() 95/255695/1
Karol Lewandowski [Mon, 22 Mar 2021 15:39:07 +0000 (16:39 +0100)]
crash-stack: Drop unused get_threads()

Change-Id: I8146fe9c52889d872967dadfa12065dabb42cc3f

3 years agoRelease 6.5.13 43/255443/10 submit/tizen/20210322.183501
Mateusz Moscicki [Thu, 18 Mar 2021 10:15:58 +0000 (11:15 +0100)]
Release 6.5.13

Change-Id: Iccc7f0dd4aafcf6056282a71880b4dd8df89a3a1

3 years agoAllow to get bugreports using the diagnostics API 21/255621/3
Mateusz Moscicki [Fri, 19 Mar 2021 16:53:49 +0000 (17:53 +0100)]
Allow to get bugreports using the diagnostics API

bugreport-service registers as a org.tizen.bugreport-service and allows
to get bugreport and crash-info report by dumpsys.
For example: to get all bugreports created in the last hour run:

  dumpsys org.tizen.bugreport-service -- --type bugreport --last 3600

Supported parameters:

  --type <bugreport|crash-info>  Get specified report
  --last <sec>          Get reports created in the last <sec>
  --from <timestamp>    Get reports created after a specified time
  --to <timestamp>      Get reports created before a specified time

Change-Id: I0d3e04c34b63f3a559c8bde9af703eeabeb4e7ae

3 years agoSend diagnostics event (BugreportCreated) when new bugreport is created 20/255620/2
Mateusz Moscicki [Fri, 19 Mar 2021 16:51:35 +0000 (17:51 +0100)]
Send diagnostics event (BugreportCreated) when new bugreport is created

Change-Id: I0fe77932bec656e1abbf0a1fd79eb68ae233ea3d

3 years agolibbugreport: Drop needless -service suffix 60/255460/1 submit/tizen/20210322.215101 submit/tizen/20210324.111927
Karol Lewandowski [Thu, 18 Mar 2021 11:26:43 +0000 (12:26 +0100)]
libbugreport: Drop needless -service suffix

Change-Id: I1f7c0d4b021c5bee76d2325649c55bdc6478eac1

3 years agospec: Fix crash_root directory permission 56/255456/4
Mateusz Moscicki [Thu, 18 Mar 2021 11:57:46 +0000 (12:57 +0100)]
spec: Fix crash_root directory permission

Change-Id: Id2f1f4ac5fb2f160011d5ccb1976645f8b853d55

3 years agospec: Ensure needed crash_worker user is available during package installation 91/255291/2
Karol Lewandowski [Tue, 16 Mar 2021 08:53:01 +0000 (09:53 +0100)]
spec: Ensure needed crash_worker user is available during package installation

Some system users are created by security-config package %post script, thus
we need to ensure this package is installed and configured before we install
packages containing, in our case, crash_worker-user owned files/dirs.

Change-Id: I122e992936f4569cbb5f42f0f38f4ce9f5fb2100

3 years agoMove the libbugreport library to the separate spec 08/255308/3
Mateusz Moscicki [Tue, 16 Mar 2021 11:15:58 +0000 (12:15 +0100)]
Move the libbugreport library to the separate spec

A separate spec is needed because diagnostics depends on libbugreport,
while bugreport-service requires diagnostics.

Change-Id: I809e21be045ca6d29d5851032d135a308e816c16

3 years agoRelease 6.5.12 55/255155/4 accepted/tizen/unified/20210318.055925 submit/tizen/20210315.181414
Karol Lewandowski [Fri, 12 Mar 2021 12:21:22 +0000 (13:21 +0100)]
Release 6.5.12

* Add new dumpsystemstate-service
* Rename crash-service to bugreport-service
* Decouple bugreport-service from crash-worker dependencies
* Rework packaging to make it possible to complile out/disable crash-worker/livedumper/etc.

Change-Id: I7b3bdd9156e786d7bbba1d49ef6db36659eb7c48

3 years agospec: Santize programs' permissions 41/255241/1
Karol Lewandowski [Mon, 15 Mar 2021 14:00:47 +0000 (15:00 +0100)]
spec: Santize programs' permissions

Use default only where necessary and clearly
write the reason behind it.

Change-Id: I96b696c4b8268a9548be3f105dc827a67b436742

3 years agospec: Provide libcrash-service to ease transition to libbugreport 61/255161/2
Karol Lewandowski [Fri, 12 Mar 2021 16:44:49 +0000 (17:44 +0100)]
spec: Provide libcrash-service to ease transition to libbugreport

Change-Id: I33d83f9d5e40e6d6d1940597424bba87fcc4552d

3 years agopackaging: Package only bugreport-service and dumpsystemstate-service for TV 70/255070/3
Karol Lewandowski [Thu, 11 Mar 2021 22:00:42 +0000 (23:00 +0100)]
packaging: Package only bugreport-service and dumpsystemstate-service for TV

Change-Id: Ia2b330a71d6775821dce0db5f2076074dfe396c1

3 years agospec: redesign 58/255058/5
Karol Lewandowski [Thu, 11 Mar 2021 13:59:12 +0000 (14:59 +0100)]
spec: redesign

Change-Id: I5b2b2337413c4ea019be4c876449263d8ef72257

3 years agobugreport-service: Independence from the crash-manager 68/255068/3
Mateusz Moscicki [Wed, 10 Mar 2021 10:30:39 +0000 (11:30 +0100)]
bugreport-service: Independence from the crash-manager

The changes that this commit makes allow to install the
bugreport-service without having to install crash-manager.

Change-Id: If448436c0dff6a69f1bef6b4d249c199f549dec8

3 years agolibcrash-service: Do not export unneeded symbols 54/255054/1
Karol Lewandowski [Thu, 11 Mar 2021 11:23:33 +0000 (12:23 +0100)]
libcrash-service: Do not export unneeded symbols

Change-Id: I5584761b83f386568b869be921f667d18c6cfd3e

3 years agobugreport: Ensure library is linked to libraries we actually need 33/255033/3
Karol Lewandowski [Thu, 11 Mar 2021 09:39:18 +0000 (10:39 +0100)]
bugreport: Ensure library is linked to libraries we actually need

We always link to libcrash-manager but it might not be needed,
if livecoredump suport is disabled.

This commit prepares bugreport-service to be libcrash-manager-independent.

Change-Id: I4d506e517ce2da22daa047741187a15f91da4180

3 years agoAdd dump_systemstate-service 91/253491/10
Mateusz Moscicki [Mon, 15 Feb 2021 12:16:53 +0000 (13:16 +0100)]
Add dump_systemstate-service

The service registers with the name org.tizen.systemstate and provides
the output of defined commands via dumpsys interface. The registration
of commands is done by adding dumpsyscmd parameter to the extra program
configuration file. For example, the following configuration in
/etc/dump_systemstate.conf.d/programs/crash-worker-programs.conf:

  ...

  [buxton system]
  order=141
  cmdflag=b
  title=System configuration
  path=/usr/bin/buxton2ctl
  args=dump system
  dumpsyscmd=buxton_system
  allowdumpsysargs=yes
  ...

allows to get the output of the command:

  /usr/bin/buxton2ctl dump system

by calling:

  dumpsys org.tizen.systemstate buxton_system

The allowdumpsysargs parameter is responsible for the possibility to
provide custom parameters via dumpsys (disallowed by default).

Change-Id: Iff9569d4975ab97addfcf32ea6c22d7237275b35

3 years agodump_systemstate: Extract the function to read ini files 90/253490/5
Mateusz Moscicki [Mon, 15 Feb 2021 12:09:34 +0000 (13:09 +0100)]
dump_systemstate: Extract the function to read ini files

Change-Id: I53b79be8953bfc1d6c3c420913d8afa47cac5004

3 years agopackaging: Split packages to allow installing only bugreport-service with its deps 14/254814/3
Karol Lewandowski [Tue, 9 Mar 2021 13:55:15 +0000 (14:55 +0100)]
packaging: Split packages to allow installing only bugreport-service with its deps

Change-Id: I8e225cc465b6a6585fd7f3f292e249a27bcff898

3 years agobugreport: Ensure DLog tag is always specified 13/254813/1
Karol Lewandowski [Tue, 9 Mar 2021 11:47:59 +0000 (12:47 +0100)]
bugreport: Ensure DLog tag is always specified

Change-Id: I4ccde9340c18e9589fdfdc03ba0937c2632ff4bf

3 years agoChange the crash-service to the bugreport-service 00/254100/4
Mateusz Moscicki [Tue, 23 Feb 2021 09:40:57 +0000 (10:40 +0100)]
Change the crash-service to the bugreport-service

Change-Id: Ieea6c499a279f8bbe6c61232bbc49c4f0f768691

3 years agoCreate a report with only dump_systemstate output for PID <= 0 51/253851/6
Mateusz Moscicki [Thu, 18 Feb 2021 11:08:55 +0000 (12:08 +0100)]
Create a report with only dump_systemstate output for PID <= 0

Passing PID <= 0 to livedump_pid() API method will create a report
containing only dump_systemstate output.

Change-Id: I38dd566acb0ff2f1a0ecf0a492dbdac91343c215

3 years agoRelease 6.5.11 34/254034/1 accepted/tizen/unified/20210222.215244 submit/tizen/20210222.111341
Mateusz Moscicki [Mon, 22 Feb 2021 10:36:33 +0000 (11:36 +0100)]
Release 6.5.11

Change-Id: Ied63aff39a5c9b5d03874683e9e2ab08bab6c661

3 years agoRe-create crash_path for compatibilities. 54/253954/1
Kunhoon Baik [Sun, 21 Feb 2021 03:39:22 +0000 (12:39 +0900)]
Re-create crash_path for compatibilities.

The crash_path should be installed at image creation time for several Tizen testing infras.
Until Tizen testing infras will be modified, the crash_path should be remained.

Change-Id: Iea7166e87a2dbd3b55bb95f8d8a492d17dec50a0

3 years agoRelease 6.5.10 04/253104/6 submit/tizen/20210205.125131 submit/tizen/20210217.095429 submit/tizen/20210217.142253
Mateusz Moscicki [Thu, 4 Feb 2021 11:47:23 +0000 (12:47 +0100)]
Release 6.5.10

Change-Id: I1a7060c4c3949a28f2e7d66c31ff85063e3eb295

3 years agoSet permissions explicitly for directories and reports 02/253202/1
Mateusz Moscicki [Fri, 5 Feb 2021 10:47:31 +0000 (11:47 +0100)]
Set permissions explicitly for directories and reports

Change-Id: If01ddf2a7f73a6b808f3cd8d39f20a77c74231d3

3 years agocrash-manager, service: Set a restrictive umask 13/253113/4
Karol Lewandowski [Thu, 4 Feb 2021 15:03:15 +0000 (16:03 +0100)]
crash-manager, service: Set a restrictive umask

Setting such a mask will make any files created on ocassion (such as
temporary files) unreadable by others.

Change-Id: I6843a49cb123a663effb1ab99e8118e968786624

3 years agopackaging: Drop redundant directories 03/253103/4
Karol Lewandowski [Thu, 4 Feb 2021 11:05:22 +0000 (12:05 +0100)]
packaging: Drop redundant directories

These directories are created on-demand by crash-manager/service.

There is no need to main correct permission/label set in multiple
places.

Change-Id: Ie81cd358d9e17d4249bbdc0a2ed791b5097fa583

3 years agoMerge branch 'tizen_6.0' into tizen 20/252820/1 submit/tizen/20210202.125831
Mateusz Moscicki [Tue, 2 Feb 2021 11:14:57 +0000 (12:14 +0100)]
Merge branch 'tizen_6.0' into tizen

Change-Id: I3d8551cda3f54fd4bfa617667a54ef7238c39949

3 years agoRelease 6.0.30 11/252811/1 submit/tizen_6.0/20210202.125902
Mateusz Moscicki [Tue, 2 Feb 2021 11:13:16 +0000 (12:13 +0100)]
Release 6.0.30

Change-Id: I5480be318f6855562e7b4599be2b002d5d97ca37

3 years agodiagnostics-run.conf: fix tmpfile location in 64 bit 10/252810/1
INSUN PYO [Fri, 29 Jan 2021 03:07:55 +0000 (12:07 +0900)]
diagnostics-run.conf: fix tmpfile location in 64 bit

Change-Id: Ieda58ed71f73503127ba44b85f8bc0d6fa6e26f0

3 years agocrash-manager: Set primary group 01/252801/1
Karol Lewandowski [Tue, 2 Feb 2021 09:00:59 +0000 (10:00 +0100)]
crash-manager: Set primary group

Previously only supplementary groups were set, leaving main gid to
be 'root'.

Change-Id: I50494ca40192c985d07cf07827c4f44c4f99b1d7

3 years agoMerge branch 'tizen' into tizen_6.0 93/252093/1 accepted/tizen/6.0/unified/20210126.035401 submit/tizen_6.0/20210122.102603
Mateusz Moscicki [Fri, 22 Jan 2021 09:47:42 +0000 (10:47 +0100)]
Merge branch 'tizen' into tizen_6.0

Change-Id: Ib47738a925b7ce8f241d1f865a4ca6767013d273

3 years agoRelease 6.5.8 90/252090/1 accepted/tizen/unified/20210125.132336 submit/tizen/20210122.102631
Mateusz Moscicki [Fri, 22 Jan 2021 09:45:55 +0000 (10:45 +0100)]
Release 6.5.8

Change-Id: I4a4549b63a6ea415d8a1818d7bb1b782bebe6eea

3 years agocrash-service: Drop priv_* group from policy as these are not allowed by tizen sanity... 16/252016/2
Karol Lewandowski [Thu, 21 Jan 2021 20:07:11 +0000 (21:07 +0100)]
crash-service: Drop priv_* group from policy as these are not allowed by tizen sanity checkers

It seems priv_* groups can not be explicitly listed, as image creation fails with:

[01/21 15:50:01 UTC] FAILED(assert) at /busconfig/policy[3] : Group 'priv_*' is not allowed.
[01/21 15:50:01 UTC] Found 1 Fails
[01/21 15:50:01 UTC] Remove conf file : mv /etc/dbus-1/system.d/crash-service.conf /etc/dbus-1/system.d/crash-service.conf.fail

Change-Id: Ieea004890dfbccddf9d16ee949f55f3a02461bcc

3 years agoMerge branch 'tizen' into tizen_6.0 04/251904/1 submit/tizen_6.0/20210121.145209
Karol Lewandowski [Wed, 20 Jan 2021 15:32:37 +0000 (16:32 +0100)]
Merge branch 'tizen' into tizen_6.0

Change-Id: Iaec2734d534c06682dc3bb85b7339fc6a685e14f

3 years agoRelease 6.5.7 03/251903/1 submit/tizen/20210121.145225
Karol Lewandowski [Wed, 20 Jan 2021 15:28:46 +0000 (16:28 +0100)]
Release 6.5.7

Change-Id: Iab075746a882ac423c212f4b803fa8fa48984dfe

3 years agocrash-service: Re-add privilege <check> for livedump 33/251833/4
Karol Lewandowski [Tue, 19 Jan 2021 16:56:47 +0000 (17:56 +0100)]
crash-service: Re-add privilege <check> for livedump

dbus-daemon uses getgrouplist() to get group membership, meaning
that we can't depend on group membership alone.  For this to work
dbus-daemon would need to use SO_PEERGROUP, which was introduced
in Linux kernel 4.13.

For now we have to keep both checks (<group> and <check privilege..)

Change-Id: I86b7664f19292be71c5d7c2ca27f837ec7799a96

3 years agoRelease 6.5.6 30/251830/1
Mateusz Moscicki [Tue, 19 Jan 2021 16:29:35 +0000 (17:29 +0100)]
Release 6.5.6

Change-Id: I843c2c7021a04b42799cb5f2b4931fe1a1145fe7

3 years agocrash-service: Simplify the diagnostics get_file access control 23/251823/2
Karol Lewandowski [Tue, 19 Jan 2021 12:17:14 +0000 (13:17 +0100)]
crash-service: Simplify the diagnostics get_file access control

Root is impicitly allowed by <check ..> directive, there is no need
for separate section for this.

Change-Id: I8ff19674fd2610ab1255db14658ae0e1ceeab5e1

3 years agocrash-service: Permit service & app livedump API clients 22/251822/2
Karol Lewandowski [Tue, 19 Jan 2021 12:05:46 +0000 (13:05 +0100)]
crash-service: Permit service & app livedump API clients

The d-bus livedump_pid API can be used by both services and apps.

For service to use the API it should be member of (supplementary)
priv_livecoredumper group.

For application to use the API it should be given the
"http://tizen.org/privilege/internal/livecoredump" privilege.
However, it's internal privilege so it can't be given from the
application manifest. See 'livedumper' section in NOTES file
for hints.

Change-Id: I01586c2c00f7a15d2553e4284ce373a03f9433b1

3 years agoAdd information about the need to manually add a privilege 83/251683/3
Mateusz Moscicki [Mon, 18 Jan 2021 10:26:38 +0000 (11:26 +0100)]
Add information about the need to manually add a privilege

Change-Id: I9832f5fb566e183e414e1fc0f27d3275f2931aa8

3 years agoMerge changes I4fbe1307,I4ed60496 into tizen_6.0 submit/tizen_6.0/20210114.151600
Mateusz Mościcki [Thu, 14 Jan 2021 15:00:17 +0000 (15:00 +0000)]
Merge changes I4fbe1307,I4ed60496 into tizen_6.0

* changes:
  Release 6.0.27
  Fix dbus policy for livedump_pid

3 years agoRelease 6.5.5 23/251523/1 submit/tizen/20210114.150700
Mateusz Moscicki [Thu, 14 Jan 2021 14:12:40 +0000 (15:12 +0100)]
Release 6.5.5

Change-Id: I78053a4c9608f279cb0f71daf72740bd54103943

3 years agoRelease 6.0.27 22/251522/1
Mateusz Moscicki [Thu, 14 Jan 2021 14:12:07 +0000 (15:12 +0100)]
Release 6.0.27

Change-Id: I4fbe1307c1ce48917057b19692a53676d48a344c

3 years agoFix dbus policy for livedump_pid 19/251519/1
Mateusz Moscicki [Thu, 14 Jan 2021 13:25:26 +0000 (14:25 +0100)]
Fix dbus policy for livedump_pid

Change-Id: I4ed60496efefc70ef2b8fb2b8590e4f430e016cb

3 years agoFix dbus policy for livedump_pid 15/251515/1
Mateusz Moscicki [Thu, 14 Jan 2021 13:25:26 +0000 (14:25 +0100)]
Fix dbus policy for livedump_pid

Change-Id: I4ed60496efefc70ef2b8fb2b8590e4f430e016cb

3 years agoRelease 6.5.4 66/250166/1 accepted/tizen/unified/20201222.122551 submit/tizen/20201221.105823
Mateusz Moscicki [Mon, 21 Dec 2020 10:52:43 +0000 (11:52 +0100)]
Release 6.5.4

Change-Id: Ice6551ac00608f994627d5f5c85a3f15457bc17d

3 years agofilename change from "corrupted_cmdline" to "nonascii_cmdline" 45/250145/1
Kunhoon Baik [Sat, 19 Dec 2020 23:46:27 +0000 (08:46 +0900)]
filename change from "corrupted_cmdline" to "nonascii_cmdline"

isgraph cannot check cmdline with unicode.
Thus, it will be better to change to nonascii_cmdline

Change-Id: I60c166512cc0c7cb766d0223f71b336403aa644b

3 years agoRelease 6.5.3 73/250073/1 accepted/tizen/unified/20201220.221656 submit/tizen/20201218.151137
Karol Lewandowski [Fri, 18 Dec 2020 13:08:58 +0000 (14:08 +0100)]
Release 6.5.3

This release introduces cmdline santizing, to avoid creating reports
with 'strange' characters in name (as it's based on cmdline).

Change-Id: I2eb83c0ceb391608db9388115260b9464ecb9c90

3 years agocrash-manager: Santize cmd_line early 65/250065/2
Karol Lewandowski [Fri, 18 Dec 2020 11:24:18 +0000 (12:24 +0100)]
crash-manager: Santize cmd_line early

There is no value in passing cmd_line that is potentially corrupted.

Previously, we wanted to share original cmdline value via dbus-notify
but this no longer seems correct as we have to replace cmd_line
completely when it contains invalid/non-printable characters.

This patch changes behaviour so that santized cmd_line is available
universally via cinfo->cmd_line.

Change-Id: I9a54781614d89c6abb89ef0c0755d8a23a26f55d

3 years agocrash-manager: Create reports with `corrupted_process' prefix when cmdline is corrupted 42/250042/3
Karol Lewandowski [Fri, 18 Dec 2020 10:09:21 +0000 (11:09 +0100)]
crash-manager: Create reports with `corrupted_process' prefix when cmdline is corrupted

Change-Id: I62cd86e70d4d1e347bdadd4d2a2a4fcb448b88d4

3 years agoRelease 6.5.2 38/249938/1 submit/tizen/20201217.120803 submit/tizen/20201218.113325
Mateusz Moscicki [Thu, 17 Dec 2020 11:19:50 +0000 (12:19 +0100)]
Release 6.5.2

Change-Id: Ib9fea66140376d0e4b0a0fe6b93b02b639aa8229

3 years agoFix SVACE warnings 37/249937/1
Mateusz Moscicki [Thu, 17 Dec 2020 11:12:27 +0000 (12:12 +0100)]
Fix SVACE warnings

Change-Id: I7ef2563bee2bf1690b2a38554cc15bf0e10f92fc

3 years agoFix null dereferences 46/249346/1
Michal Bloch [Mon, 7 Dec 2020 21:16:07 +0000 (22:16 +0100)]
Fix null dereferences

Change-Id: Id23b9aaad60752f797783f9ccc6f9bbfa9357941
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
(cherry picked from commit a9a8f5e3955f55e03a05878a381257085dc02951)