From f6601b379e797f7e39dc40950d276722f81f6eec Mon Sep 17 00:00:00 2001 From: "changyu.choi" Date: Thu, 25 Jun 2020 17:55:03 +0900 Subject: [PATCH 01/16] Revert "Change size method to 'sizeof'" This reverts commit 6813b19565277ac4102d3b97bc0e5039ad1cc5f5. Change-Id: I242026d861b6f9dcc6a3fc847ffdb9aad68682a0 Signed-off-by: changyu-choi --- src/common/src/launchpad_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/src/launchpad_common.c b/src/common/src/launchpad_common.c index 3c61837..1521634 100644 --- a/src/common/src/launchpad_common.c +++ b/src/common/src/launchpad_common.c @@ -603,10 +603,10 @@ static bool __validate_bundle_key(const char *key) if (!key) return false; - if (!strncmp(key, "__AUL_", sizeof("__AUL_"))) + if (!strncmp(key, "__AUL_", strlen("__AUL_"))) return false; - if (!strncmp(key, "__APP_SVC_", sizeof("__APP_SVC_"))) + if (!strncmp(key, "__APP_SVC_", strlen("__APP_SVC_"))) return false; return true; -- 2.7.4 From f15e2ec921d5eb11495345db0fe2e6f2c0001d5c Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 26 Jun 2020 14:33:53 +0900 Subject: [PATCH 02/16] Handle returned events When IO_ERR, IO_HUP or IO_NVAL is delivered, Launchpad tries to recover the socket. If it's failed, Launchpad uses abort() to terminate itself abnormally. Change-Id: I0680c5a6b1899d3dac22459361a927a2591478fc Signed-off-by: Hwankyu Jhun --- src/launchpad/inc/launchpad_signal.h | 2 + src/launchpad/src/launchpad.c | 77 ++++++++++++++++++++-- src/launchpad/src/launchpad_signal.c | 123 +++++++++++++++++++++++++++++------ 3 files changed, 175 insertions(+), 27 deletions(-) diff --git a/src/launchpad/inc/launchpad_signal.h b/src/launchpad/inc/launchpad_signal.h index aea5654..dffd961 100644 --- a/src/launchpad/inc/launchpad_signal.h +++ b/src/launchpad/inc/launchpad_signal.h @@ -25,6 +25,8 @@ typedef void (*signal_sigchld_cb)(int pid, void *user_data); int _signal_set_sigchld_cb(signal_sigchld_cb callback, void *user_data); +int _signal_unblock_sigchld(void); + int _signal_init(void); void _signal_fini(void); diff --git a/src/launchpad/src/launchpad.c b/src/launchpad/src/launchpad.c index 02aab1b..9751138 100644 --- a/src/launchpad/src/launchpad.c +++ b/src/launchpad/src/launchpad.c @@ -192,6 +192,8 @@ static bool __is_low_memory(void); static void __update_slot_state(candidate_process_context_t *cpc, int method, bool force); static void __init_app_defined_loader_monitor(void); +static gboolean __launchpad_recovery_cb(gpointer data); +static gboolean __logger_recovery_cb(gpointer data); static gboolean __handle_queuing_slots(gpointer data) { @@ -781,7 +783,7 @@ static int __exec_loader_process(void *arg) char err_buf[1024]; _send_cmd_to_amd(LAUNCHPAD_CHILD_PROCESS); - _signal_fini(); + _signal_unblock_sigchld(); _close_all_fds(); _setup_stdio(basename(argv[LOADER_ARG_PATH])); @@ -1296,7 +1298,7 @@ static int __exec_app_process(void *arg) if (bundle_get_type(launch_arg->kb, AUL_K_SDK) != BUNDLE_TYPE_NONE) _debug_prepare_debugger(launch_arg->kb); - _signal_fini(); + _signal_unblock_sigchld(); _delete_sock_path(getpid(), getuid()); @@ -1517,6 +1519,12 @@ static bool __handle_label_monitor(int fd, io_condition_e cond, void *data) candidate_process_context_t *cpc; GList *iter = candidate_slot_list; + if (cond & (IO_ERR | IO_HUP | IO_NVAL)) { + _E("fd(%d), io_condition(%d)", fd, cond); + abort(); + return false; + } + _D("%s()", __FUNCTION__); security_manager_app_labels_monitor_process(label_monitor); @@ -2028,6 +2036,13 @@ static bool __handle_launch_event(int fd, io_condition_e cond, void *data) int loader_id; int ret; + if (cond & (IO_ERR | IO_HUP | IO_NVAL)) { + _E("fd(%d), condition(%d)", fd, cond); + g_idle_add(__launchpad_recovery_cb, __launchpad_channel); + __launchpad_channel = NULL; + return false; + } + traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "LAUNCHPAD:LAUNCH"); pkt = _accept_recv_pkt_raw(fd, &clifd, &cr); if (!pkt) { @@ -2408,7 +2423,8 @@ static int __remove_slot(int type, int loader_id) static int __init_launchpad_fd(int argc, char **argv) { - int fd = -1; + io_condition_e cond; + int fd; fd = __launchpad_pre_init(argc, argv); if (fd < 0) { @@ -2416,7 +2432,8 @@ static int __init_launchpad_fd(int argc, char **argv) return -1; } - __launchpad_channel = _io_channel_create(fd, IO_IN, + cond = IO_IN | IO_PRI | IO_HUP | IO_ERR | IO_NVAL; + __launchpad_channel = _io_channel_create(fd, cond, __handle_launch_event, NULL); if (!__launchpad_channel) { close(fd); @@ -2507,6 +2524,7 @@ static void __init_app_defined_loader_monitor(void) static int __init_label_monitor_fd(void) { + io_condition_e cond; int r; int fd = -1; @@ -2524,7 +2542,8 @@ static int __init_label_monitor_fd(void) goto err; } - __label_monitor_channel = _io_channel_create(fd, IO_IN, + cond = IO_IN | IO_PRI | IO_HUP | IO_ERR | IO_NVAL; + __label_monitor_channel = _io_channel_create(fd, cond, __handle_label_monitor, NULL); if (!__label_monitor_channel) goto err; @@ -2840,6 +2859,13 @@ static bool __handle_logger(int fd, io_condition_e cond, void *data) struct ucred cr; int clifd = -1; + if (cond & (IO_ERR | IO_HUP | IO_NVAL)) { + _E("fd(%d), io_condition(%d)", fd, cond); + g_idle_add(__logger_recovery_cb, __logger_channel); + __logger_channel = NULL; + return false; + } + pkt = _accept_recv_pkt_raw(fd, &clifd, &cr); if (!pkt) { _E("Failed to receive the packet"); @@ -2868,6 +2894,7 @@ end: static int __init_logger_fd(void) { + io_condition_e cond; int fd; fd = _create_server_sock(LAUNCHPAD_LOGGER_SOCK); @@ -2876,7 +2903,8 @@ static int __init_logger_fd(void) return -1; } - __logger_channel = _io_channel_create(fd, IO_IN, __handle_logger, NULL); + cond = IO_IN | IO_PRI | IO_ERR | IO_HUP | IO_NVAL; + __logger_channel = _io_channel_create(fd, cond, __handle_logger, NULL); if (!__logger_channel) { close(fd); return -1; @@ -2914,6 +2942,43 @@ static int __memory_monitor_cb(bool low_memory, void *user_data) return 0; } +static gboolean __logger_recovery_cb(gpointer data) +{ + io_channel_h channel = data; + int ret; + + _io_channel_destroy(channel); + + ret = __init_logger_fd(); + if (ret < 0) { + _E("Failed to recover logger socket"); + return G_SOURCE_REMOVE; + } + + _E("[__RECOVERY__] Logger socket"); + + return G_SOURCE_REMOVE; +} + +static gboolean __launchpad_recovery_cb(gpointer data) +{ + io_channel_h channel = data; + int ret; + + _io_channel_destroy(channel); + + ret = __init_launchpad_fd(0, NULL); + if (ret < 0) { + _E("Failed to recover launchpad socket"); + abort(); + return G_SOURCE_REMOVE; + } + + _E("[__RECOVERY__] Launchpad socket"); + + return G_SOURCE_REMOVE; +} + static int __before_loop(int argc, char **argv) { int ret; diff --git a/src/launchpad/src/launchpad_signal.c b/src/launchpad/src/launchpad_signal.c index 5ee3067..6212ca4 100644 --- a/src/launchpad/src/launchpad_signal.c +++ b/src/launchpad/src/launchpad_signal.c @@ -36,6 +36,7 @@ #define HYDRA_SIGCHLD_SOCK ".hydra-sigchld-sock" static pid_t __pid; +static sigset_t __mask; static sigset_t __old_mask; static socket_h __sigchld_socket; static io_channel_h __sigchld_channel; @@ -44,6 +45,9 @@ static io_channel_h __hydra_sigchld_channel; static signal_sigchld_cb __callback; static void *__user_data; +static gboolean __hydra_sigchld_recovery_cb(gpointer data); +static gboolean __sigchld_recovery_cb(gpointer data); + static void __socket_garbage_collector(void) { DIR *dp; @@ -99,6 +103,12 @@ static bool __hydra_sigchld_handler(int fd, io_condition_e cond, int pid = -1; int ret; + if (cond & (IO_ERR | IO_HUP | IO_NVAL)) { + _E("fd(%d), io_condition(%d)", fd, cond); + g_idle_add(__hydra_sigchld_recovery_cb, NULL); + return false; + } + ret = _socket_accept(__hydra_sigchld_socket, &client_socket); if (ret < 0) return true; @@ -130,6 +140,7 @@ static int __hydra_sigchld_init(void) { char path[LAUNCHPAD_SOCKET_PATH_SIZE]; io_channel_h channel; + io_condition_e cond; socket_h socket; int ret; int fd; @@ -142,7 +153,8 @@ static int __hydra_sigchld_init(void) _socket_get_fd(socket, &fd); - channel = _io_channel_create(fd, IO_IN | IO_PRI, + cond = IO_IN | IO_PRI | IO_ERR | IO_HUP | IO_NVAL; + channel = _io_channel_create(fd, cond, __hydra_sigchld_handler, NULL); if (!channel) { _socket_destroy(socket); @@ -180,6 +192,12 @@ static bool __sigchld_handler(int fd, io_condition_e cond, void *user_data) int status; int ret; + if (cond & (IO_ERR | IO_HUP | IO_NVAL)) { + _E("fd(%d), io_condition(%d)", fd, cond); + g_idle_add(__sigchld_recovery_cb, NULL); + return false; + } + do { ret = _socket_read(__sigchld_socket, &info, sizeof(info)); if (ret < 0) @@ -203,38 +221,71 @@ static bool __sigchld_handler(int fd, io_condition_e cond, void *user_data) return true; } -static int __sigchld_init(void) +static int __signal_block_sigchld(void) { - io_channel_h channel; - socket_h socket; - sigset_t mask; - int sfd; int ret; - sigemptyset(&mask); - sigaddset(&mask, SIGCHLD); + sigemptyset(&__mask); + sigaddset(&__mask, SIGCHLD); - ret = sigprocmask(SIG_BLOCK, &mask, &__old_mask); + ret = sigprocmask(SIG_BLOCK, &__mask, &__old_mask); if (ret < 0) { ret = -errno; _E("sigprocmask(SIG_BLOCK) is failed. errno(%d)", errno); return ret; } - sfd = signalfd(-1, &mask, SFD_NONBLOCK | SFD_CLOEXEC); + return 0; +} + +static int __signal_get_sigchld_fd(void) +{ + int sfd; + + sfd = signalfd(-1, &__mask, SFD_NONBLOCK | SFD_CLOEXEC); if (sfd < 0) { - ret = -errno; + sfd = -errno; _E("signalfd() is failed. errno(%d)", errno); + return sfd; + } + + return sfd; +} + +int _signal_unblock_sigchld(void) +{ + int ret; + + ret = sigprocmask(SIG_SETMASK, &__old_mask, NULL); + if (ret < 0) { + ret = -errno; + _E("sigprocmask(SIG_SETMASK) is failed. errno(%d)", errno); return ret; } + return 0; +} + +static int __sigchld_init(void) +{ + io_channel_h channel; + io_condition_e cond; + socket_h socket; + int sfd; + int ret; + + sfd = __signal_get_sigchld_fd(); + if (sfd < 0) + return sfd; + ret = _socket_create_with_fd(sfd, &socket); if (ret < 0) { close(sfd); return ret; } - channel = _io_channel_create(sfd, IO_IN | IO_PRI, + cond = IO_IN | IO_PRI | IO_ERR | IO_HUP | IO_NVAL; + channel = _io_channel_create(sfd, cond, __sigchld_handler, NULL); if (!channel) { _socket_destroy(socket); @@ -250,8 +301,6 @@ static int __sigchld_init(void) static int __sigchld_fini(void) { - int ret; - if (__sigchld_channel) _io_channel_destroy(__sigchld_channel); @@ -262,13 +311,6 @@ static int __sigchld_fini(void) _socket_destroy(__sigchld_socket); } - ret = sigprocmask(SIG_SETMASK, &__old_mask, NULL); - if (ret < 0) { - ret = -errno; - _E("sigprocmask(SIG_SETMASK) is failed. errno(%d)", errno); - return ret; - } - return 0; } @@ -280,6 +322,40 @@ int _signal_set_sigchld_cb(signal_sigchld_cb callback, void *user_data) return 0; } +static gboolean __hydra_sigchld_recovery_cb(gpointer data) +{ + int ret; + + __hydra_sigchld_fini(); + + ret = __hydra_sigchld_init(); + if (ret < 0) { + _E("Failed to recover hydra sigchld socket"); + abort(); + } else { + _W("[__RECOVERY__] Hydra SIGCHLD Socket"); + } + + return G_SOURCE_REMOVE; +} + +static gboolean __sigchld_recovery_cb(gpointer data) +{ + int ret; + + __sigchld_fini(); + + ret = __sigchld_init(); + if (ret < 0) { + _E("Failed to recover sigchld fd"); + abort(); + } else { + _W("[__RECOVERY__] SIGCHLD fd"); + } + + return G_SOURCE_REMOVE; +} + int _signal_init(void) { int ret; @@ -288,6 +364,10 @@ int _signal_init(void) _D("SIGNAL_INIT"); __pid = getpid(); + ret = __signal_block_sigchld(); + if (ret < 0) + return ret; + ret = __sigchld_init(); if (ret < 0) return ret; @@ -329,4 +409,5 @@ void _signal_fini(void) _signal_set_sigchld_cb(NULL, NULL); __hydra_sigchld_fini(); __sigchld_fini(); + _signal_unblock_sigchld(); } -- 2.7.4 From 5acb3702c72394e966b78b5c0863f22587b10e29 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 26 Jun 2020 15:31:58 +0900 Subject: [PATCH 03/16] Add a file log for debugging launchpad "/var/log/appfw/launchpad/launchpad.log" is added. Change-Id: I280d010bb048671c66f4fe0eed698977335a4a61 Signed-off-by: Hwankyu Jhun --- src/common/inc/launchpad_logger.h | 40 ++++++++ src/common/src/launchpad_logger.c | 195 ++++++++++++++++++++++++++++++++++++++ src/launchpad/inc/launchpad_log.h | 34 +++++++ src/launchpad/src/launchpad.c | 12 ++- src/launchpad/src/launchpad_log.c | 71 ++++++++++++++ 5 files changed, 351 insertions(+), 1 deletion(-) create mode 100644 src/common/inc/launchpad_logger.h create mode 100644 src/common/src/launchpad_logger.c create mode 100644 src/launchpad/inc/launchpad_log.h create mode 100644 src/launchpad/src/launchpad_log.c diff --git a/src/common/inc/launchpad_logger.h b/src/common/inc/launchpad_logger.h new file mode 100644 index 0000000..a54ebb7 --- /dev/null +++ b/src/common/inc/launchpad_logger.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved + * + * 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. + */ + +#ifndef __LAUNCHPAD_LOGGER_H__ +#define __LAUNCHPAD_LOGGER_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#define LAUNCHPAD_LOG_MAX_STRING_SIZE 128 + +typedef struct logger_s *logger_h; + +int _logger_create(const char *path, logger_h *handle); + +int _logger_destroy(logger_h handle); + +int _logger_print(logger_h handle, const char *tag, const char *format, ...); + +int _logger_get_fd(logger_h handle, int *fd); + +#ifdef __cplusplus +} +#endif + +#endif /* __LAUNCHPAD_LOGGER_H__ */ diff --git a/src/common/src/launchpad_logger.c b/src/common/src/launchpad_logger.c new file mode 100644 index 0000000..a4e6b7f --- /dev/null +++ b/src/common/src/launchpad_logger.c @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved + * + * 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. + */ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "launchpad_logger.h" +#include "log_private.h" + +#define LAUNCHPAD_LOG_APPFW_PATH "/var/log/appfw" +#define LAUNCHPAD_LOG_PATH "/var/log/appfw/launchpad" +#define LAUNCHPAD_LOG_MAX_SIZE 2500 +#define LAUNCHPAD_LOG_MAX_BUFFER_SIZE 256 + +struct logger_s { + int fd; + int index; +}; + +static int __create_directory(const char *path) +{ + mode_t mode; + int ret; + + ret = access(path, F_OK); + if (ret == 0) + return 0; + + mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP; + ret = mkdir(path, mode); + if (ret < 0) { + ret = -errno; + _E("Failed to create directory(%s). errno(%d)", path, errno); + return ret; + } + + return 0; +} + +static int __create_launchpad_directories(void) +{ + int ret; + + ret = __create_directory(LAUNCHPAD_LOG_APPFW_PATH); + if (ret < 0) + return ret; + + ret = __create_directory(LAUNCHPAD_LOG_PATH); + if (ret < 0) + return ret; + + return 0; +} + +int _logger_create(const char *path, logger_h *handle) +{ + struct logger_s *logger; + off_t offset; + int ret; + + if (!path || !handle) { + _E("Invalid parameter"); + return -EINVAL; + } + + ret = __create_launchpad_directories(); + if (ret < 0) + return ret; + + logger = calloc(1, sizeof(struct logger_s)); + if (!logger) { + _E("Out of memory"); + return -ENOMEM; + } + + logger->fd = open(path, O_CREAT | O_WRONLY, 0640); + if (logger->fd < 0) { + ret = -errno; + _E("Failed to open path(%s), errno(%d)", path, errno); + _logger_destroy(logger); + return ret; + } + + offset = lseek(logger->fd, 0, SEEK_END); + if (offset != 0) { + logger->index = (int)(offset / LAUNCHPAD_LOG_MAX_STRING_SIZE); + if (logger->index >= LAUNCHPAD_LOG_MAX_SIZE) { + logger->index = 0; + lseek(logger->fd, 0, SEEK_SET); + } + } + + *handle = logger; + + return 0; +} + +int _logger_destroy(logger_h handle) +{ + if (!handle) { + _E("Invalid parameter"); + return -EINVAL; + } + + if (handle->fd > 0) + close(handle->fd); + + free(handle); + + return 0; +} + +int _logger_print(logger_h handle, const char *tag, const char *format, ...) +{ + char buf[LAUNCHPAD_LOG_MAX_BUFFER_SIZE]; + char format_buf[128]; + struct tm tm = { 0, }; + time_t t; + ssize_t ret; + va_list ap; + off_t offset; + + if (!handle || !tag || !format) { + _E("Invalid parameter"); + return -EINVAL; + } + + t = time(NULL); + localtime_r(&t, &tm); + + if (handle->index != 0) + offset = lseek(handle->fd, 0, SEEK_CUR); + else + offset = lseek(handle->fd, 0, SEEK_SET); + + if (offset == -1) + _E("lseek() is failed. errno(%d)", errno); + + va_start(ap, format); + vsnprintf(format_buf, sizeof(format_buf), format, ap); + va_end(ap); + + snprintf(buf, sizeof(buf), + "[%6d] %04d-%02d-%02d %02d:%02d:%02d %-16s %-100s\n", + handle->index, + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec, + tag, format_buf); + ret = write(handle->fd, buf, strlen(buf)); + if (ret < 0) { + ret = -errno; + _E("Failed to write log message. errno(%d)", errno); + return ret; + } + + if (++handle->index >= LAUNCHPAD_LOG_MAX_SIZE) + handle->index = 0; + + return ret; +} + +int _logger_get_fd(logger_h handle, int *fd) +{ + if (!handle || !fd) { + _E("Invalid parameter"); + return -EINVAL; + } + + *fd = handle->fd; + + return 0; +} diff --git a/src/launchpad/inc/launchpad_log.h b/src/launchpad/inc/launchpad_log.h new file mode 100644 index 0000000..8e3cd89 --- /dev/null +++ b/src/launchpad/inc/launchpad_log.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved + * + * 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. + */ + +#ifndef __LAUNCHPAD_LOG_H__ +#define __LAUNCHPAD_LOG_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +int _log_print(const char *tag, const char *format, ...); + +int _log_init(void); + +void _log_fini(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __LAUNCHPAD_LOG_H__ */ diff --git a/src/launchpad/src/launchpad.c b/src/launchpad/src/launchpad.c index 9751138..1f1d21c 100644 --- a/src/launchpad/src/launchpad.c +++ b/src/launchpad/src/launchpad.c @@ -47,6 +47,7 @@ #include "launchpad_debug.h" #include "launchpad_inotify.h" #include "launchpad_io_channel.h" +#include "launchpad_log.h" #include "launchpad_memory_monitor.h" #include "launchpad_plugin.h" #include "launchpad_proc.h" @@ -893,6 +894,8 @@ static int __prepare_candidate_process(int type, int loader_id) __set_live_timer(cpt); } + _log_print("[CANDIDATE]", "pid(%7d) | type(%d) | loader(%s)", + pid, cpt->loader_id, cpt->loader_name); _memory_monitor_reset_timer(); return 0; @@ -1493,6 +1496,7 @@ static void __handle_sigchild(int pid, void *user_data) g_hash_table_remove(__pid_table, GINT_TO_POINTER(pid)); } + _log_print("[SIGCHLD]", "pid(%7d)", pid); cpc = __find_slot_from_pid(pid); if (cpc != NULL) { cpc->pid = CANDIDATE_NONE; @@ -1525,7 +1529,7 @@ static bool __handle_label_monitor(int fd, io_condition_e cond, void *data) return false; } - _D("%s()", __FUNCTION__); + _log_print("[LABEL]", "fd(%d), condition(%d)", fd, cond); security_manager_app_labels_monitor_process(label_monitor); while (iter) { @@ -2209,6 +2213,8 @@ end: _dbus_send_app_launch_signal(pid, menu_info->appid); g_hash_table_insert(__pid_table, GINT_TO_POINTER(pid), strdup(menu_info->appid)); + _log_print("[LAUNCH]", "pid(%7d) | appid(%s)", + pid, menu_info->appid); } if (menu_info != NULL) @@ -2883,6 +2889,8 @@ static bool __handle_logger(int fd, io_condition_e cond, void *data) } _E("[%d] %s", cr.pid, (const char *)pkt->data); + _log_print("[ERROR]", "pid(%7d) | message(%s)", + cr.pid, (const char *)pkt->data); end: if (clifd != -1) close(clifd); @@ -3045,12 +3053,14 @@ static int __before_loop(int argc, char **argv) __init_app_defined_loader_monitor(); _memory_monitor_init(); _memory_monitor_set_event_cb(__memory_monitor_cb, NULL); + _log_init(); return 0; } static void __after_loop(void) { + _log_fini(); _memory_monitor_fini(); __unregister_vconf_events(); if (__pid_table) diff --git a/src/launchpad/src/launchpad_log.c b/src/launchpad/src/launchpad_log.c new file mode 100644 index 0000000..00acc46 --- /dev/null +++ b/src/launchpad/src/launchpad_log.c @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved + * + * 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. + */ + +#define _GNU_SOURCE +#include +#include + +#include "launchpad_log.h" +#include "launchpad_logger.h" +#include "log_private.h" + +#define PATH_LAUNCHPAD_LOG "/var/log/appfw/launchpad/launchpad.log" + +static logger_h __logger; + +int _log_print(const char *tag, const char *format, ...) +{ + char formatted_buf[LAUNCHPAD_LOG_MAX_STRING_SIZE]; + va_list ap; + int ret; + + if (!__logger) { + ret = _logger_create(PATH_LAUNCHPAD_LOG, &__logger); + if (ret != 0) { + _E("Failed to create log file. error(%d)", ret); + return -1; + } + } + + va_start(ap, format); + vsnprintf(formatted_buf, sizeof(formatted_buf), format, ap); + va_end(ap); + + return _logger_print(__logger, tag, formatted_buf); +} + +int _log_init(void) +{ + int ret; + + _W("LOG_INIT"); + + ret = _logger_create(PATH_LAUNCHPAD_LOG, &__logger); + if (ret != 0) { + _E("Failed to create log file. error(%d)", ret); + return ret; + } + + return 0; +} + +void _log_fini(void) +{ + _W("LOG_FINI"); + + if (__logger) + _logger_destroy(__logger); +} -- 2.7.4 From 21dcd7f72efe9cd4772071a28a8c3f0a62818940 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 30 Jun 2020 12:53:53 +0900 Subject: [PATCH 04/16] Change SMACK label of the log file Change-Id: Ib07f8c8b69065a817626557c2f1dc18698ff9941 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 1 + src/launchpad/CMakeLists.txt | 1 + src/{common => launchpad}/inc/launchpad_logger.h | 0 src/{common => launchpad}/src/launchpad_logger.c | 30 ++++++++++++++++++++++++ 4 files changed, 32 insertions(+) rename src/{common => launchpad}/inc/launchpad_logger.h (100%) rename src/{common => launchpad}/src/launchpad_logger.c (87%) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 0c0cb55..198bc46 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -30,6 +30,7 @@ BuildRequires: pkgconfig(tanchor) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(iniparser) BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(libsmack) Requires(post): /sbin/ldconfig Requires(post): /usr/bin/systemctl diff --git a/src/launchpad/CMakeLists.txt b/src/launchpad/CMakeLists.txt index 39ce5c8..ad10ae0 100644 --- a/src/launchpad/CMakeLists.txt +++ b/src/launchpad/CMakeLists.txt @@ -10,6 +10,7 @@ PKG_CHECK_MODULES(LAUNCHPAD_PROCESS_POOL_PKGS REQUIRED gio-2.0 iniparser libcap + libsmack libsystemd libtzplatform-config security-manager diff --git a/src/common/inc/launchpad_logger.h b/src/launchpad/inc/launchpad_logger.h similarity index 100% rename from src/common/inc/launchpad_logger.h rename to src/launchpad/inc/launchpad_logger.h diff --git a/src/common/src/launchpad_logger.c b/src/launchpad/src/launchpad_logger.c similarity index 87% rename from src/common/src/launchpad_logger.c rename to src/launchpad/src/launchpad_logger.c index a4e6b7f..0a32b7e 100644 --- a/src/common/src/launchpad_logger.c +++ b/src/launchpad/src/launchpad_logger.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -40,6 +41,21 @@ struct logger_s { int index; }; +static int __set_smack_label(const char *path, const char *label) +{ + int ret; + + ret = smack_setlabel(path, label, SMACK_LABEL_ACCESS); + if (ret != 0) { + ret = -errno; + _E("smack_setlabel() is failed. path(%s), label(%s), errno(%d)", + path, label, errno); + return ret; + } + + return 0; +} + static int __create_directory(const char *path) { mode_t mode; @@ -68,10 +84,18 @@ static int __create_launchpad_directories(void) if (ret < 0) return ret; + ret = __set_smack_label(LAUNCHPAD_LOG_APPFW_PATH, "_"); + if (ret < 0) + return ret; + ret = __create_directory(LAUNCHPAD_LOG_PATH); if (ret < 0) return ret; + ret = __set_smack_label(LAUNCHPAD_LOG_PATH, "User"); + if (ret < 0) + return ret; + return 0; } @@ -104,6 +128,12 @@ int _logger_create(const char *path, logger_h *handle) return ret; } + ret = __set_smack_label(path, "User"); + if (ret < 0) { + _logger_destroy(logger); + return ret; + } + offset = lseek(logger->fd, 0, SEEK_END); if (offset != 0) { logger->index = (int)(offset / LAUNCHPAD_LOG_MAX_STRING_SIZE); -- 2.7.4 From bfb27be798364f18b1fa23dd972f94f016becc7f Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 30 Jun 2020 13:19:16 +0900 Subject: [PATCH 05/16] Release version 0.15.7 Changes: - Change size method to 'sizeof' - Remove unused CMakeLists.txt file - Revert "Change size method to 'sizeof'" - Handle returned events - Add a file log for debugging launchpad - Change SMACK label of the log file Change-Id: I06a676ee851b0a678496c1f4b4c53843328187f5 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 198bc46..fe40eb5 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.15.6 +Version: 0.15.7 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 012ea89d9cd1b84dd12956e823d19503c4a4d6ed Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 30 Jun 2020 14:38:01 +0900 Subject: [PATCH 06/16] Include missing header file Change-Id: I5c671b8fc280457632fdf163104b2bf1de8626f6 Signed-off-by: Hwankyu Jhun --- src/launchpad/src/launchpad_dbus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/launchpad/src/launchpad_dbus.c b/src/launchpad/src/launchpad_dbus.c index e408b3c..0b3f298 100644 --- a/src/launchpad/src/launchpad_dbus.c +++ b/src/launchpad/src/launchpad_dbus.c @@ -16,6 +16,7 @@ #define _GNU_SOURCE #include +#include #include #include -- 2.7.4 From 016473c80e3c09736035430b3b86dfda76e5f45a Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 30 Jun 2020 15:12:45 +0900 Subject: [PATCH 07/16] Release version 0.15.8 Changes: - Include missing header file Change-Id: I2e260900474094b74e5299754864b6a190234da3 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index fe40eb5..f9660e6 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.15.7 +Version: 0.15.8 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 84915368946a09a56b757add53fde3f917d73b2a Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Fri, 10 Jul 2020 11:45:03 +0900 Subject: [PATCH 08/16] Fix Launchpad Recovery Feature Add to select ".launchpad-process-pool-sock". ".luanchpad-recovery-sock" is just used socket activation for recovery. Change-Id: I73e5dd59bbb99b2e24f25a84437284742dc337fe Signed-off-by: Changgyu Choi --- packaging/launchpad-process-pool.socket | 1 + src/launchpad/src/launchpad.c | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packaging/launchpad-process-pool.socket b/packaging/launchpad-process-pool.socket index 44edc7d..515d5e0 100644 --- a/packaging/launchpad-process-pool.socket +++ b/packaging/launchpad-process-pool.socket @@ -1,5 +1,6 @@ [Socket] ListenStream=/run/aul/daemons/%U/.launchpad-process-pool-sock +ListenStream=/run/aul/daemons/%U/.launchpad-recovery-sock DirectoryMode=0777 [Install] diff --git a/src/launchpad/src/launchpad.c b/src/launchpad/src/launchpad.c index 1f1d21c..9db8b9d 100644 --- a/src/launchpad/src/launchpad.c +++ b/src/launchpad/src/launchpad.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -673,7 +674,7 @@ static int __listen_candidate_process(int type, int loader_id) memset(&addr, 0x00, sizeof(struct sockaddr_un)); addr.sun_family = AF_UNIX; - snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/daemons/%d/%s%d-%d", + snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/daemons/%u/%s%d-%d", SOCKET_PATH, getuid(), LAUNCHPAD_LOADER_SOCKET_NAME, type, loader_id); @@ -1343,15 +1344,21 @@ static int __launch_directly(const char *appid, const char *app_path, int clifd, static int __create_sock_activation(void) { int fds; + char launchpad_process_pool_sock_path[108]; + int i; fds = sd_listen_fds(0); - if (fds == 1) - return SD_LISTEN_FDS_START; - else if (fds > 1) - _E("Too many file descriptors received."); - else - _D("There is no socket stream"); + snprintf(launchpad_process_pool_sock_path, + sizeof(launchpad_process_pool_sock_path), "%s/daemons/%u/%s", + SOCKET_PATH, getuid(), PROCESS_POOL_LAUNCHPAD_SOCK); + + for (i = SD_LISTEN_FDS_START; i < SD_LISTEN_FDS_START + fds; ++i) { + if (sd_is_socket_unix(i, SOCK_STREAM, 1, + launchpad_process_pool_sock_path, 0) > 0) + return i; + } + _W("There is no socket stream"); return -1; } -- 2.7.4 From 5f0a12215490d46be1a4f3aa60ca9f5d27219793 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Mon, 13 Jul 2020 09:56:13 +0900 Subject: [PATCH 09/16] Release version 0.15.9 Changes: - Fix Launchpad Recovery Feature Change-Id: I318cfd0a3f062ce0305c8551c98437d0b7fcb884 Signed-off-by: Changgyu Choi --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index f9660e6..8668758 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.15.8 +Version: 0.15.9 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 8832dd73ee084822c5631c3bdc2ebef64557f2f0 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Mon, 20 Jul 2020 10:36:31 +0900 Subject: [PATCH 10/16] Add to check pid from __accept_candidate_process() Check whether different cpc and received socket pid, when accept client socket. If they are different, It is invalid accept. Change-Id: I2f2a3e9896fc07fc6ee77d4ca77d47042fa6d958 Signed-off-by: Changgyu Choi --- src/common/src/launchpad_common.c | 2 +- src/launchpad/src/launchpad.c | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/common/src/launchpad_common.c b/src/common/src/launchpad_common.c index 1521634..05d8bef 100644 --- a/src/common/src/launchpad_common.c +++ b/src/common/src/launchpad_common.c @@ -679,7 +679,7 @@ int _connect_to_launchpad(int type, int id) send_ret = send(fd, &client_pid, sizeof(client_pid), MSG_NOSIGNAL); _D("send(%d) : %d", client_pid, send_ret); if (send_ret == -1) { - _E("send error"); + _E("send error(%d)", errno); close(fd); return -1; } diff --git a/src/launchpad/src/launchpad.c b/src/launchpad/src/launchpad.c index 9db8b9d..c665796 100644 --- a/src/launchpad/src/launchpad.c +++ b/src/launchpad/src/launchpad.c @@ -591,11 +591,13 @@ error: } static int __accept_candidate_process(int server_fd, int *out_client_fd, - int *out_client_pid) + int *out_client_pid, int cpc_pid) { int client_fd = -1; - int client_pid = 0; - int recv_ret = 0; + int recv_pid = 0; + int ret; + socklen_t len; + struct ucred cred = {}; if (server_fd == -1 || out_client_fd == NULL || out_client_pid == NULL) { @@ -614,15 +616,29 @@ static int __accept_candidate_process(int server_fd, int *out_client_fd, goto error; } - recv_ret = recv(client_fd, &client_pid, sizeof(client_pid), - MSG_WAITALL); - if (recv_ret == -1) { + ret = recv(client_fd, &recv_pid, sizeof(recv_pid), MSG_WAITALL); + if (ret == -1) { _E("recv error!"); goto error; } + len = sizeof(cred); + ret = getsockopt(client_fd, SOL_SOCKET, SO_PEERCRED, &cred, &len); + if (ret < 0) { + _E("getsockopt error"); + goto error; + } + + if (cred.pid != cpc_pid) { + _E("Invalid accept. pid(%d)", cred.pid); + goto error; + } + + if (cred.pid != recv_pid) + _W("Not equal recv and real pid"); + *out_client_fd = client_fd; - *out_client_pid = client_pid; + *out_client_pid = cred.pid; return *out_client_fd; @@ -1432,7 +1448,8 @@ static bool __handle_loader_event(int fd, io_condition_e cond, void *data) return false; if (!cpc->prepared) { - ret = __accept_candidate_process(fd, &client_fd, &client_pid); + ret = __accept_candidate_process(fd, &client_fd, &client_pid, + cpc->pid); if (ret >= 0) { /* for hydra need to set pid to pid of non-hydra candidate, */ /* which is connecting now */ @@ -1470,7 +1487,8 @@ static bool __handle_hydra_event(int fd, io_condition_e cond, void *data) return false; if (!cpc->prepared) { - ret = __accept_candidate_process(fd, &client_fd, &client_pid); + ret = __accept_candidate_process(fd, &client_fd, &client_pid, + cpc->pid); if (ret >= 0) { cpc->hydra_fd = client_fd; @@ -1536,6 +1554,7 @@ static bool __handle_label_monitor(int fd, io_condition_e cond, void *data) return false; } + _D("fd(%d) condition(%d)", fd, cond); _log_print("[LABEL]", "fd(%d), condition(%d)", fd, cond); security_manager_app_labels_monitor_process(label_monitor); -- 2.7.4 From 5ad8d40be0658e89de5cc085f95af1984f593b09 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Mon, 20 Jul 2020 13:54:56 +0900 Subject: [PATCH 11/16] Release version 0.15.10 Changes: - Add to check pid from __accept_candidate_process() Change-Id: I297cd5cb2a16f32fef93a4d1536e9325a5f2c7f5 Signed-off-by: Changgyu Choi --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 8668758..20ec450 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.15.9 +Version: 0.15.10 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From d29ee599373eae8cb83236405374fde1f8efc84d Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 22 Jul 2020 12:56:07 +0900 Subject: [PATCH 12/16] Fix Memory Monitor If previous memory status is equal to current memory status, the callback function is not called. Change-Id: Ie5c96ef10e19a4f0614b33ec6331ef0db01349c5 Signed-off-by: Hwankyu Jhun --- src/launchpad/src/launchpad_memory_monitor.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/src/launchpad/src/launchpad_memory_monitor.c b/src/launchpad/src/launchpad_memory_monitor.c index dacf3ab..bc99ec1 100644 --- a/src/launchpad/src/launchpad_memory_monitor.c +++ b/src/launchpad/src/launchpad_memory_monitor.c @@ -33,6 +33,7 @@ struct memory_monitor_s { unsigned int prev_used_ratio; unsigned int base_interval; unsigned int interval; + bool low_memory; guint tag; memory_monitor_cb callback; void *user_data; @@ -44,27 +45,14 @@ static void __memory_monitor_start(void); static gboolean __memory_check_cb(gpointer data) { - unsigned int mem_used_ratio = 0; - int ret; + bool low_memory; __monitor.tag = 0; - ret = _proc_get_mem_used_ratio(&mem_used_ratio); - if (ret != 0) { - _E("Failed to get mem used ratio"); - __monitor.interval = __monitor.base_interval; - __memory_monitor_start(); - return G_SOURCE_REMOVE; - } - - if (__monitor.callback) { - __monitor.callback(mem_used_ratio > __monitor.threshold, - __monitor.user_data); - } - - _D("previous used ratio(%u), current used ratio(%u)", - __monitor.prev_used_ratio, mem_used_ratio); + low_memory = _memory_monitor_is_low_memory(); + if (__monitor.low_memory != low_memory && __monitor.callback) + __monitor.callback(low_memory, __monitor.user_data); - __monitor.prev_used_ratio = mem_used_ratio; + __monitor.low_memory = low_memory; __memory_monitor_start(); return G_SOURCE_REMOVE; @@ -106,6 +94,10 @@ bool _memory_monitor_is_low_memory(void) unsigned int mem_used_ratio = 0; _proc_get_mem_used_ratio(&mem_used_ratio); + + _D("previous used ratio(%u), current used ratio(%u)", + __monitor.prev_used_ratio, mem_used_ratio); + __monitor.prev_used_ratio = mem_used_ratio; if (mem_used_ratio > __monitor.threshold) -- 2.7.4 From f14b7343765273890fbe72a12dfc9ec60b542719 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 22 Jul 2020 15:01:09 +0900 Subject: [PATCH 13/16] Release version 0.15.11 Changes: - Fix Memory Monitor Change-Id: I280478744858d4e95e5bb27ec929e5e9fe4be1c8 Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index 20ec450..dcf1061 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.15.10 +Version: 0.15.11 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4 From 5a37684b244f9b03717bf5f656c315c65ea03a4d Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 22 Jul 2020 13:46:18 +0900 Subject: [PATCH 14/16] Fix Launchpad Library - Removes calling _launchpad_plugin_prepare_app() Change-Id: I9f4d1737c446c4749f4a7e454add23145487fd68 Signed-off-by: Hwankyu Jhun --- src/lib/src/launchpad_lib.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/lib/src/launchpad_lib.c b/src/lib/src/launchpad_lib.c index 9852ecd..68c2ac4 100644 --- a/src/lib/src/launchpad_lib.c +++ b/src/lib/src/launchpad_lib.c @@ -35,7 +35,6 @@ #include "launchpad.h" #include "launchpad_common.h" -#include "launchpad_plugin.h" #include "launchpad_types.h" #include "preexec.h" @@ -72,12 +71,6 @@ static int __prepare_exec(const char *appid, const char *app_path, __preexec_run(pkg_type, appid, app_path); - ret = _launchpad_plugin_prepare_app(appid, kb); - if (ret != 0) { - _E("_launchpad_plugin_prepare_app() is failed. error(%d)", ret); - return -1; - } - ret = _enable_external_pkg(kb, pkgid, global ? GLOBAL_USER : getuid()); if (ret < 0) return -1; -- 2.7.4 From 8d75728f642f4d5ad78aaaa69fc1af2d6a26466a Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 27 Jul 2020 11:34:19 +0900 Subject: [PATCH 15/16] Fix wrong implementation Change-Id: I9629c44391733c43ef8d9ff00cf428cb68fdec52 Signed-off-by: Hwankyu Jhun --- src/launchpad/src/launchpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/launchpad/src/launchpad.c b/src/launchpad/src/launchpad.c index c665796..1b941b9 100644 --- a/src/launchpad/src/launchpad.c +++ b/src/launchpad/src/launchpad.c @@ -1488,7 +1488,7 @@ static bool __handle_hydra_event(int fd, io_condition_e cond, void *data) if (!cpc->prepared) { ret = __accept_candidate_process(fd, &client_fd, &client_pid, - cpc->pid); + cpc->hydra_pid); if (ret >= 0) { cpc->hydra_fd = client_fd; -- 2.7.4 From 9363cb876c3acf314125b86662b0171cb57530ea Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 27 Jul 2020 12:52:09 +0900 Subject: [PATCH 16/16] Release version 0.15.12 Changes: - Fix Launchpad Library - Fix wrong implementation Change-Id: I8a8cae0b277f8302ed6ec0a4b68060195d4b304d Signed-off-by: Hwankyu Jhun --- packaging/launchpad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index dcf1061..a28cfde 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -1,6 +1,6 @@ Name: launchpad Summary: Launchpad for launching applications -Version: 0.15.11 +Version: 0.15.12 Release: 1 Group: Application Framework/Daemons License: Apache-2.0 -- 2.7.4