Relicense crash-manager to MIT 33/264233/1
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 14 Sep 2021 13:11:52 +0000 (15:11 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 14 Sep 2021 13:20:26 +0000 (15:20 +0200)
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

17 files changed:
src/crash-manager/crash-manager.c
src/crash-manager/crash-manager.h
src/crash-manager/crash-popup-launch.c
src/crash-manager/dbus-util.h
src/crash-manager/dbus_notify.c
src/crash-manager/main.c
src/crash-manager/so-info.c
src/crash-manager/so-info.h
src/shared/bugreport-util.c
src/shared/bugreport-util.h
src/shared/config.c
src/shared/config.h
src/shared/log.h
src/shared/spawn.c
src/shared/spawn.h
src/shared/util.c
src/shared/util.h

index 8dd6a00774744dea48e487310f98cf9f3f867dd9..e12e5b83a86cf8d925329def8a4a9da1096ec7b2 100644 (file)
@@ -1,21 +1,8 @@
-/*
- * crash-manager
+/* This file is part of libcrash-manager
  *
- * Copyright (c) 2016-2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2016-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
 #include <assert.h>
 #include <ctype.h>
 #include <dirent.h>
index a12f03ef744c040a11eb330cb68e370750c1e7ea..ff4bdd3a3d809a8e016e90c0430c61a6f5ef4627 100644 (file)
@@ -1,23 +1,9 @@
-/*
- * crash-manager
+/* This file is part of crash manager
  *
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2019-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
-#ifndef __CRASH_MANAGER_H__
-#define __CRASH_MANAGER_H__
+#pragma once
 
 #include <sys/types.h>
 #include <unistd.h>
@@ -63,5 +49,3 @@ bool crash_manager_livedump_pid(pid_t pid, const char *dump_reason, char *report
 void crash_manager_free(struct crash_info *cinfo);
 void crash_info_init(struct crash_info *cinfo);
 void free_crash_info(struct crash_info *cinfo);
-
-#endif
index 4ec26635d2722f7be9da1d96b2ff0020a43e97a1..f869d20085cd39ac57578f954afd8749ffeecb7c 100644 (file)
@@ -1,22 +1,9 @@
-/*
- * crash-popup: request showing crash-popup via d-bus
+/* crash-popup: request showing crash-popup via d-bus
  * This utility is separate exececutable to limit crash-manager dependencies.
  *
  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * SPDX-License-Identifier: MIT
  */
-
 #define LOG_TAG "CRASH_MANAGER"
 #include "shared/log.h"
 #include "dbus-util.h"
index 14d953c5085819104bd64a7722b9fe7ad0ef4fa8..ea34d758030d817507817ce2a4acc9ccc0d19523 100644 (file)
@@ -1,19 +1,8 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+/* This file is part of crash-manager
  *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2019-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
 #pragma once
 
 #include "shared/log.h"
index b4926eee3860b580d50d62ab06016a339f6e7b0e..81f82f04d047d012c84fc7fd09e8603dd6621c51 100644 (file)
@@ -1,22 +1,9 @@
-/*
- * Copyright (c) 2016-2019 Samsung Electronics Co., Ltd.
+/* Broadcast crash info via D-Bus
+ * This utility is separate exececutable to limit crash-manager dependencies
  *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Authors: Mateusz Moscicki <m.moscicki2@partner.samsung.com>
- *          Karol Lewandowski <k.lewandowsk@samsung.com>
+ * Copyright (c) 2016-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
 #define LOG_TAG "CRASH_MANAGER"
 #include "shared/log.h"
 #include "dbus-util.h"
index 961bb18b7021c1816231a6236c011e4c30c6c8df..953994a542b8c1f97dc169c9d6ada471a452d542 100644 (file)
@@ -1,3 +1,9 @@
+/* Standalone crash-manager program
+ * This program is supposed to be invoked directly by kernel (via kernel.core_patter= mechanism)
+ *
+ * Copyright (c) 2016-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
+ */
 #include <diagnostics.h>
 #include <getopt.h>
 #include <grp.h>
index 03f01fbc9fe1d3d743b75ad929baa156ec8f077b..d667e68d4d906c4369ddafd9bf657d4e8f7fae9d 100644 (file)
@@ -1,21 +1,8 @@
-/*
- * build-ids
- *
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Collect metadata about crashed program using rpm db
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2018-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
index 474a47cb100561b2d4f059084d9c59541a63f2ea..e13d420231dea4782be630df577665bd689651bc 100644 (file)
@@ -1,24 +1,9 @@
-/*
- * build-ids
+/* This file is part of crash-manager
  *
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2018-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
-#ifndef __SO_INFO_H__
-#define __SO_INFO_H__
+#pragma once
 
 void get_and_save_so_info(char *map_filename, char *out_file);
 GHashTable *get_app_name_from_map(char *map_path);
-#endif
index 2bccab05186cad50966cd786100df9ef7541a98d..605ac548db4a6c79c3a9d38c5a6f50663e71b62c 100644 (file)
@@ -1,20 +1,8 @@
-/*
- * bugreport-util
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
+/* bugreport-util: Helper to send bugreport events
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
 #include <diagnostics.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -39,4 +27,3 @@ bool send_bugreport_created_event(const char *report_path)
        bundle_free(event_data);
        return res == DIAGNOSTICS_ERROR_NONE;
 }
-
index 8cb44d0fdcded7a921d9233369035008feaf5249..15d36d6d45d9a87ae4fc49c61a474b03ff4ebcfd 100644 (file)
@@ -1,23 +1,10 @@
-/*
- * bugreport-util
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
+/* This file is part of crash-manager
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-#ifndef __BUGREPORT_UTIL_H__
-#define __BUGREPORT_UTIL_H__
+#pragma once
+
 #include <stdbool.h>
 
 bool send_bugreport_created_event(const char *report_path);
-
-#endif  // __BUGREPORT_UTIL_H__
index 947095f71280a8527242ec1126341805cc7a8e71..b5c7b3dc8eca0035780c71013275b7e64f3a244f 100644 (file)
@@ -1,18 +1,7 @@
-/*
- * crash-manager
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+/* Config file handling support
  *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2019-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
 #include <assert.h>
 #include <dirent.h>
index a50c437ddb8c2818b79891744e7906d71b1a324f..a9ead12c92329eacd50fe4c3d41571559eec3e63 100644 (file)
@@ -1,21 +1,9 @@
-/*
- * crash-manager
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+/* This file is part of crash-manager
  *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2019-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-#ifndef __DEF_CONFIG_H_
-#define __DEF_CONFIG_H_
+#pragma once
 
 #include <stdbool.h>
 
@@ -72,8 +60,3 @@ bool config_is_path_excluded(config_t *c, const char *const path);
 #ifdef __cplusplus
 }
 #endif
-
-/**
- * @}
- */
-#endif
index 8ee72b22271badda79f5370ae011e526baaab5a1..c232c200039668e7abaa34c1edb16647ac93ec05 100644 (file)
@@ -1,22 +1,9 @@
-/*
- * crash-manager
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+/* This file is part of crash-manager
  *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2012-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
-#ifndef __CRASH_LOG_H__
-#define __CRASH_LOG_H__
+#pragma once
 
 #ifndef LOG_TAG
 #define LOG_TAG "CRASH_MANAGER"
@@ -56,6 +43,3 @@ static inline char __dlog_prio(int prio)
 #define _I(fmt, arg...) do { if (DLOG_LOG_LEVEL <= DLOG_INFO)  SLOGI(fmt, ##arg); } while (0)
 #define _W(fmt, arg...) do { if (DLOG_LOG_LEVEL <= DLOG_WARN)  SLOGW(fmt, ##arg); } while (0)
 #define _E(fmt, arg...) do { if (DLOG_LOG_LEVEL <= DLOG_ERROR) SLOGE(fmt, ##arg); } while (0)
-
-#endif
-/* __CRASH_LOG_H__ */
index 392a053731cb17063f1b8344c865bff4dab9e69f..3bfc34ceeadbfb7e0efbf17a344cb6208691077b 100644 (file)
@@ -1,20 +1,8 @@
 /* Utilities for spawning sub-processes
  *
- * Copyright (c) 2018-2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2018-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
 #include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
index 431b1738b7a2f7a2b3af58d4f3656edb618c2693..a36536019c21ccdbbf377e8d2cacacaad974b5dd 100644 (file)
@@ -1,21 +1,9 @@
 /* Utilities for spawning sub-processes
  *
- * Copyright (c) 2018-2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2018-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-#ifndef __SPAWN_H__
-#define __SPAWN_H__
+#pragma once
 
 #include <stdbool.h>
 #include <sys/types.h>
@@ -54,5 +42,3 @@ bool spawn_wait(char *const av[], char *const ev[], spawn_param_s *param, int ti
 #ifdef __cplusplus
 }
 #endif
-
-#endif
index 778f0ad4279b77a486caf91a14a28a65fc25dd9f..da130e6edfa52b30f1966ae2c8e48971996a5d3f 100644 (file)
@@ -1,20 +1,8 @@
-/*
- * crash-manager
- * Copyright (c) 2012-2019 Samsung Electronics Co., Ltd.
+/* Misc. utility functions
  *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2012-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-
 #include <assert.h>
 #include <diagnostics.h>
 #include <stdio.h>
index 32609e0800f78fb6e775a96e8a81bde4826cf1c2..af74c67afc572e8e68889326ee88745e44138779 100644 (file)
@@ -1,21 +1,9 @@
-/*
- * crash-manager
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+/* This file is part of crash-manager
  *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2012-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
  */
-#ifndef __DEF_UTIL_H__
-#define __DEF_UTIL_H__
+#pragma once
 
 #include <stdbool.h>
 #include <sys/types.h>
@@ -83,11 +71,7 @@ bool file_exists_in_dir(const char *dir_path, const char *file_name);
 bool write_to_file(const char *content, const char *base_dir, const char *file_name);
 
 bool is_dotnet_file(const char *path);
+
 #ifdef __cplusplus
 }
 #endif
-
-/**
- * @}
- */
-#endif