Drop legacy USE_PRIVILEGE_CONTROL ifdef.
authorRafal Krypa <r.krypa@samsung.com>
Tue, 8 Jan 2013 16:35:24 +0000 (17:35 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 10 Jan 2013 16:52:08 +0000 (17:52 +0100)
[Issue#]       N/A
[Feature]      Drop unused ifdef and related stub code.
[Cause]        The ifdef used to enable turning off the library functionality, but it's no longer feasible.
[Solution]     Drop the ifdef and dummy API function counterparts.
[Verification] Build, install, reboot target.

Change-Id: I7f73b8fe236785b868f14724de17e27d77d3f67d

CMakeLists.txt
src/privilege-control.c

index 2148a3e..1eae7bb 100644 (file)
@@ -29,7 +29,6 @@ SET(include_dir "./include")
 
 ## Additional flag
 ADD_DEFINITIONS("-fvisibility=hidden")
-ADD_DEFINITIONS("-DUSE_PRIVILEGE_CONTROL")
 ADD_DEFINITIONS("-DSHAREDIR=${SHAREDIR}")
 ADD_DEFINITIONS("-DHOMEDIR=${HOMEDIR}")
 ADD_DEFINITIONS("-Wall -Werror")
index 62b1139..1beadcd 100644 (file)
@@ -58,8 +58,6 @@
 #define WRT_BASE_DEVCAP         "WRT"
 #define WRT_CLIENT_PATH         "/usr/bin/wrt-client"
 
-#ifdef USE_PRIVILEGE_CONTROL
-
 #ifndef SMACK_ENABLED
 #undef WRT_SMACK_ENABLED
 #endif
@@ -711,57 +709,3 @@ API char* wrt_widget_id_from_socket(int sockfd)
        free(smack_label);
        return widget_id;
 }
-
-#else // USE_PRIVILEGE_CONTROL
-
-API int control_privilege(void)
-{
-       return 0;
-}
-
-API int set_privilege(const char* pkg_name)
-{
-       return 0;
-}
-
-API int set_app_privilege(const char* name, const char* type, const char* path)
-{
-       return 0;
-}
-
-API int wrt_set_privilege(const char* widget_id)
-{
-       return 0;
-}
-
-API int set_exec_label(const char* path)
-{
-       return 0;
-}
-
-API int wrt_permissions_reset(const char* widget_id)
-{
-       return 0;
-}
-
-API int wrt_permissions_add(const char* widget_id, char** devcap_list)
-{
-       return 0;
-}
-
-API int wrt_set_src_dir(const char* widget_id, const char *path)
-{
-       return 0;
-}
-
-API int wrt_set_data_dir(const char* widget_id, const char *path)
-{
-       return 0;
-}
-
-API char* wrt_widget_id_from_socket(int sockfd)
-{
-       return 0;
-}
-
-#endif // USE_PRIVILEGE_CONTROL