/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
int _create_server_sock(void);
app_pkt_t *_recv_pkt_raw(int fd, int *clifd, struct ucred *cr);
-
appinfo_t *_appinfo_create(bundle *kb);
void _appinfo_free(appinfo_t *appinfo);
void _modify_bundle(bundle *kb, int caller_pid, appinfo_t *appinfo, int cmd);
-
void _set_env(appinfo_t *app_info, bundle *kb);
char **_create_argc_argv(bundle *kb, int *margc, const char *app_path);
-
int _proc_check_cmdline_bypid(int pid);
#endif /* __COMMON_H__ */
+
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
char **_create_argc_argv(bundle *kb, int *margc, const char *app_path);
#endif /* __DEBUG_UTIL_H__ */
+
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
int dlp_chmod(const char *path, mode_t mode, int recursive);
#endif /* __FILE_UTIL_H__ */
+
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
gettimeofday(&cur, NULL); \
if (__g_base_time.tv_sec != 0) { \
timersub(&cur, &__g_base_time, &res); \
- printf("%c[1;31m[%s,%d] %ld sec %ld msec "fmt" %c[0m\n", \
+ printf("%c[1;31m[%s,%d] %ld sec %ld msec " \
+ fmt" %c[0m\n", \
27, __FUNCTION__, __LINE__, \
- res.tv_sec, res.tv_usec/1000, ##arg, 27); \
+ res.tv_sec, res.tv_usec/1000, \
+ ##arg, 27); \
} \
} while (0)
#else
#endif
#endif /* __PERF_H__ */
+
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
int _set_access(const char *appid);
#endif /* __SECURITY_UTIL_H__ */
+
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
int _signal_fini(void);
#endif /* __SIGNAL_UTIL_H__ */
+
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
break;
ptr += flag;
- flag = __parse_app_path(ptr, value, sizeof(value));
+ flag = __parse_app_path(ptr, value,
+ sizeof(value));
if (flag < 0)
break;
ptr += flag;
if (str_array[i] == NULL)
break;
- if (strncmp(str_array[i], SDK_DEBUG, strlen(str_array[i])) == 0) {
+ if (strncmp(str_array[i], SDK_DEBUG,
+ strlen(str_array[i])) == 0) {
if (argv[0])
free(argv[0]);
snprintf(buf, sizeof(buf), "%s.exe", app_path);
new_argv = __add_arg(kb, argv, &argc, DLP_K_DEBUG_ARG);
new_argv[0] = strdup(path);
argv = new_argv;
- } else if (strncmp(str_array[i], SDK_VALGRIND, strlen(str_array[i])) == 0) {
+ } else if (strncmp(str_array[i], SDK_VALGRIND,
+ strlen(str_array[i])) == 0) {
path = bundle_get_val(kb, DLP_K_VALGRIND_PATH);
if (path == NULL) {
_E("Failed to get valgrind path");
*margc = 0;
return NULL;
}
- new_argv = __add_arg(kb, argv, &argc, DLP_K_VALGRIND_ARG);
+ new_argv = __add_arg(kb, argv, &argc,
+ DLP_K_VALGRIND_ARG);
new_argv[0] = strdup(path);
argv = new_argv;
- } else if (strncmp(str_array[i], SDK_UNIT_TEST, strlen(str_array[i])) == 0) {
- new_argv = __add_arg(kb, argv, &argc, DLP_K_UNIT_TEST_ARG);
+ } else if (strncmp(str_array[i], SDK_UNIT_TEST,
+ strlen(str_array[i])) == 0) {
+ new_argv = __add_arg(kb, argv, &argc,
+ DLP_K_UNIT_TEST_ARG);
argv = new_argv;
- } else if (strncmp(str_array[i], SDK_ATTACH, strlen(str_array[i])) == 0) {
+ } else if (strncmp(str_array[i], SDK_ATTACH,
+ strlen(str_array[i])) == 0) {
path = bundle_get_val(kb, DLP_K_GDBSERVER_PATH);
if (path == NULL) {
_E("Failed to get gdbserver path");
return 0;
}
+
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
res = _proc_check_cmdline_bypid(ret);
if (res < 0) {
- _E("The app process might be terminated while we are wating %d", ret);
+ _E("The app process might be terminated "
+ "while we are wating %d", ret);
__real_send(clifd, -1); /* abnormally launched */
return;
}
_D("appid: %s / pkg_type: %s / app_path: %s",
appid, appinfo->pkg_type, app_path);
if ((ret = _set_access(appid)) != 0) {
- _E("Failed to set privileges - check your package's credential: %d", ret);
+ _E("Failed to set privileges "
+ "- check your package's credential: %d", ret);
return -1;
}
_D("lock up test log(no error): prepare exec - first done");
if (__prepare_exec(appid, app_path, appinfo, kb) < 0) {
- _E("preparing work fail to launch - can not launch %s", appid);
+ _E("preparing work fail to launch "
+ "- can not launch %s", appid);
exit(-1);
}
fd_list = src->poll_fds;
do {
tmp = (GPollFD *)fd_list->data;
- if ((tmp->revents & (G_IO_IN | G_IO_PRI | G_IO_HUP | G_IO_NVAL)))
+ if ((tmp->revents &
+ (G_IO_IN | G_IO_PRI | G_IO_HUP | G_IO_NVAL)))
return TRUE;
fd_list = fd_list->next;
} while (fd_list);
return FALSE;
}
-static gboolean __glib_dispatch(GSource *src, GSourceFunc callback, gpointer data)
+static gboolean __glib_dispatch(GSource *src, GSourceFunc callback,
+ gpointer data)
{
return callback(data);
}
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
if (str_arr[i] == NULL)
break;
- if (strncmp(str_arr[i], SDK_DEBUG, strlen(SDK_DEBUG)) == 0
- || strncmp(str_arr[i], SDK_ATTACH, strlen(SDK_ATTACH)) == 0) {
+ if (strncmp(str_arr[i], SDK_DEBUG, strlen(SDK_DEBUG)) == 0 ||
+ strncmp(str_arr[i], SDK_ATTACH,
+ strlen(SDK_ATTACH)) == 0) {
if (__prepare_gdbserver(kb, appid) < 0)
return -1;
- } else if (strncmp(str_arr[i], SDK_VALGRIND, strlen(SDK_VALGRIND)) == 0) {
+ } else if (strncmp(str_arr[i], SDK_VALGRIND,
+ strlen(SDK_VALGRIND)) == 0) {
__prepare_valgrind(kb);
}
}
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
struct stat lstat_info;
struct stat fstat_info;
#ifdef HAVE_WIN32_PROC
- fprintf(stderr, "error: dlp_chmod not implemented on Win32 (%s)\n", path);
+ fprintf(stderr, "error: dlp_chmod not implemented on Win32 (%s)\n",
+ path);
return -1;
#else
return 0;
#endif
}
+
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
{
return security_manager_prepare_app(appid);
}
+
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2015 - 2016 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.
return -1;
if (g_dbus_connection_emit_signal(bus,
- NULL,
- AUL_DBUS_PATH,
- AUL_DBUS_SIGNAL_INTERFACE,
- AUL_DBUS_APPDEAD_SIGNAL,
- g_variant_new("(u)", dead_pid),
- &err) == FALSE) {
+ NULL,
+ AUL_DBUS_PATH,
+ AUL_DBUS_SIGNAL_INTERFACE,
+ AUL_DBUS_APPDEAD_SIGNAL,
+ g_variant_new("(u)", dead_pid),
+ &err) == FALSE) {
_E("g_dbus_connection_emit_signal() is failed: %s",
err->message);
g_error_free(err);
return -1;
if (g_dbus_connection_emit_signal(bus,
- NULL,
- AUL_DBUS_PATH,
- AUL_DBUS_SIGNAL_INTERFACE,
- AUL_DBUS_APPLAUNCH_SIGNAL,
- g_variant_new("(us)", launch_pid, app_id),
- &err) == FALSE) {
+ NULL,
+ AUL_DBUS_PATH,
+ AUL_DBUS_SIGNAL_INTERFACE,
+ AUL_DBUS_APPLAUNCH_SIGNAL,
+ g_variant_new("(us)", launch_pid, app_id),
+ &err) == FALSE) {
_E("g_dbus_connection_emit_signal() is failed: %s",
- err->message);
+ err->message);
g_error_free(err);
return -1;
}
#endif
return 0;
}
+