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 8dd6a00..e12e5b8 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 a12f03e..ff4bdd3 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 4ec2663..f869d20 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 14d953c..ea34d75 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 b4926ee..81f82f0 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 961bb18..953994a 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 03f01fb..d667e68 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 474a47c..e13d420 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 2bccab0..605ac54 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 8cb44d0..15d36d6 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 947095f..b5c7b3d 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 a50c437..a9ead12 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 8ee72b2..c232c20 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 392a053..3bfc34c 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 431b173..a365360 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 778f0ad..da130e6 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 32609e0..af74c67 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