3 * @brief external API functions for DLP
8 #define LIBRARY_PATH "/lib/libprivacy-guard-client.so"
10 static int first_run = 1;
11 static void (*privacy_guard_dlp_init)(void) = 0;
12 static void (*privacy_guard_dlp_check_leak)(const char *, char * const, size_t) = 0;
15 * @fn void tizen_dlp_init(void)
16 * @brief Initialize the DLP creating the Load Rules and Logging threads
19 void tizen_dlp_init(void)
22 void *handle = dlopen(LIBRARY_PATH, RTLD_LAZY|RTLD_NODELETE);
24 privacy_guard_dlp_init = dlsym(handle, "privacy_guard_dlp_init");
25 privacy_guard_dlp_check_leak = dlsym(handle, "privacy_guard_dlp_check_leak");
31 if (privacy_guard_dlp_init)
32 privacy_guard_dlp_init();
36 * @fn void tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
37 * @brief Checks for information leak on a given request string
39 * @param[in] hostname The hostname of the server to which the request will be sent
40 * @param[in] mem Text that we are going to validate for info leak
41 * @param[in] len Size of len in bytes
43 * @return either PRIV_GUARD_DLP_RESULT_ALLOW or PRIV_GUARD_DLP_RESULT_DENY
46 void tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
49 * Send data to Tizen DLP verification
51 if(privacy_guard_dlp_check_leak)
52 privacy_guard_dlp_check_leak(hostname, mem, len);