Deprication of sd_get_uid_type() 81/201381/2 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.024540 accepted/tizen/5.5/unified/mobile/hotfix/20201027.083647 accepted/tizen/5.5/unified/wearable/hotfix/20201027.115149 accepted/tizen/unified/20190424.040737 submit/tizen/20190412.032943 submit/tizen/20190423.061729 submit/tizen_5.5/20191031.000003 submit/tizen_5.5_mobile_hotfix/20201026.185103 submit/tizen_5.5_wearable_hotfix/20201026.184303 tizen_5.5.m2_release
authorDewal Agarwal <d1.agarwal@samsung.com>
Wed, 13 Mar 2019 09:19:56 +0000 (14:49 +0530)
committerDewal Agarwal <d1.agarwal@samsung.com>
Fri, 15 Mar 2019 08:47:07 +0000 (14:17 +0530)
Change-Id: I1dd3795a42eb8e2c601532a8709bc044e9efb3f6
Signed-off-by: Dewal Agarwal <d1.agarwal@samsung.com>
src/server/ServerUtil.cpp

index e38bda1..3fb299e 100644 (file)
@@ -27,8 +27,6 @@
 using namespace ctx;
 
 static GMutex __pathMutex;
-static uid_t __normalUid       = ROOT_UID;     // Last known normal user UID
-static uid_t __containerUid    = ROOT_UID;     // Last known container user UID
 static GDBusConnection* __dbusConnection = NULL;
 
 EXPORT_API bool util::is_normal_user(uid_t uid)
@@ -36,46 +34,11 @@ EXPORT_API bool util::is_normal_user(uid_t uid)
        if (uid == ROOT_UID)
                return false;
 
-       if (uid == __normalUid)
-               return true;
-
-       if (uid == __containerUid)
-               return false;
-
-       int type = sd_get_uid_type(uid);
-
-       if (type == NORMAL_USER_TYPE) {
-               __normalUid = uid;
-               return true;
-       } else if (type == CONTAINER_TYPE) {
-               __containerUid = uid;
-               return false;
-       }
-
-       return false;
+       return true;
 }
 
 EXPORT_API bool util::is_container_user(uid_t uid)
 {
-       if (uid == ROOT_UID)
-               return false;
-
-       if (uid == __containerUid)
-               return true;
-
-       if (uid == __normalUid)
-               return false;
-
-       int type = sd_get_uid_type(uid);
-
-       if (type == CONTAINER_TYPE) {
-               __containerUid = uid;
-               return true;
-       } else if (type == NORMAL_USER_TYPE) {
-               __normalUid = uid;
-               return false;
-       }
-
        return false;
 }