From: SooChan Lim Date: Thu, 30 Jun 2022 00:29:41 +0000 (+0900) Subject: seperate security to util X-Git-Tag: accepted/tizen/unified/20220720.034120~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c579832443cb0074ea9841775e8564060102878;p=platform%2Fcore%2Fuifw%2Flibds-tizen.git seperate security to util keyrouter and input-device only depends on security. dpms does not need to depends on security. Change-Id: I84f319dce5d7fb8f8a4c7e1c0d92ce871aeb7986 --- diff --git a/src/input-devicemgr/input-devicemgr.c b/src/input-devicemgr/input-devicemgr.c index 91b7d57..b3fc567 100644 --- a/src/input-devicemgr/input-devicemgr.c +++ b/src/input-devicemgr/input-devicemgr.c @@ -9,6 +9,7 @@ #include #include "util.h" +#include "security.h" #include "input-devicemgr.h" #define TIZEN_INPUT_DEVICEMGR_VERSION 4 diff --git a/src/input-devicemgr/meson.build b/src/input-devicemgr/meson.build index 7006326..1e69463 100644 --- a/src/input-devicemgr/meson.build +++ b/src/input-devicemgr/meson.build @@ -1,9 +1,11 @@ libds_tizen_input_devicemgr_files = [ + tizen_security_files, 'input-devicemgr.c', ] libds_tizen_input_devicemgr_deps = [ dep_libds_tizen, + deps_tizen_security, dependency('tizen-extension-server', required: true), ] diff --git a/src/keyrouter/keyrouter.c b/src/keyrouter/keyrouter.c index 4bcee93..2e825c6 100644 --- a/src/keyrouter/keyrouter.c +++ b/src/keyrouter/keyrouter.c @@ -8,6 +8,7 @@ #include "libds-tizen/keyrouter.h" #include "util.h" +#include "security.h" #include "keyrouter.h" #define TIZEN_KEYROUTER_VERSION 2 diff --git a/src/keyrouter/meson.build b/src/keyrouter/meson.build index 7c9f01c..af235ce 100644 --- a/src/keyrouter/meson.build +++ b/src/keyrouter/meson.build @@ -1,10 +1,12 @@ libds_tizen_keyrouter_files = [ + tizen_security_files, 'keyrouter_grab.c', 'keyrouter.c', ] libds_tizen_keyrouter_deps = [ dep_libds_tizen, + deps_tizen_security, dependency('tizen-extension-server', required: true), ] diff --git a/src/meson.build b/src/meson.build index 7f7447e..4d8a290 100644 --- a/src/meson.build +++ b/src/meson.build @@ -22,7 +22,16 @@ libds_tizen_deps = [ dependency('libds', required: true), ] -subdir('util') +tizen_security_files = [ + '../security.c', +] + +deps_tizen_security = [ + base_deps, + dependency('cynara-client', required: true), + dependency('cynara-session', required: true), + dependency('libsmack', required: true) +] lib_libds_tizen = shared_library('ds-tizen', libds_tizen_files, dependencies: libds_tizen_deps, diff --git a/src/util/security.c b/src/security.c similarity index 100% rename from src/util/security.c rename to src/security.c diff --git a/src/security.h b/src/security.h new file mode 100644 index 0000000..0c522a0 --- /dev/null +++ b/src/security.h @@ -0,0 +1,15 @@ +#ifndef DS_TIZEN_SECURITY_H +#define DS_TIZEN_SECURITY_H + +#include + +bool +tizen_security_init(void); + +void +tizen_security_finish(void); + +bool +tizen_security_check_privilege(pid_t pid, uid_t uid, const char *privilege); + +#endif diff --git a/src/util.h b/src/util.h index 126467c..425caf3 100644 --- a/src/util.h +++ b/src/util.h @@ -1,17 +1,6 @@ -#ifndef DS_UTIL_H -#define DS_UTIL_H - -#include +#ifndef DS_TIZEN_UTIL_H +#define DS_TIZEN_UTIL_H #define MIN(a,b) ((a)<(b)?(a):(b)) -bool -tizen_security_init(void); - -void -tizen_security_finish(void); - -bool -tizen_security_check_privilege(pid_t pid, uid_t uid, const char *privilege); - #endif diff --git a/src/util/meson.build b/src/util/meson.build deleted file mode 100644 index 0ec6a9d..0000000 --- a/src/util/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -libds_tizen_files += files('security.c') -libds_tizen_deps += [ - dependency('cynara-client', required: true), - dependency('cynara-session', required: true), - dependency('libsmack', required: true) -]