Change getters to use methodCallForce 56/200356/1 accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_8.0_unified accepted/tizen_unified tizen tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix tizen_6.0 tizen_6.0_hotfix tizen_6.5 tizen_7.0 tizen_7.0_hotfix tizen_8.0 accepted/tizen/5.0/unified/20190304.054832 accepted/tizen/5.5/unified/20191031.021802 accepted/tizen/5.5/unified/mobile/hotfix/20201027.085847 accepted/tizen/5.5/unified/wearable/hotfix/20201027.112525 accepted/tizen/6.0/unified/20201030.114945 accepted/tizen/6.0/unified/hotfix/20201103.002940 accepted/tizen/6.5/unified/20211028.121352 accepted/tizen/7.0/unified/20221110.060929 accepted/tizen/7.0/unified/hotfix/20221116.105542 accepted/tizen/8.0/unified/20231005.093611 accepted/tizen/unified/20190307.230800 submit/tizen/20190222.075321 submit/tizen/20190225.022013 submit/tizen_5.0/20190222.075859 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 submit/tizen_5.5_wearable_hotfix/20201026.184304 submit/tizen_6.0/20201029.205104 submit/tizen_6.0_hotfix/20201102.192504 submit/tizen_6.0_hotfix/20201103.114804 submit/tizen_6.5/20211028.162401 tizen_5.5.m2_release tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release tizen_8.0_m2_release
authorJaemin Ryu <jm77.ryu@samsung.com>
Fri, 22 Feb 2019 05:51:40 +0000 (14:51 +0900)
committerJaemin Ryu <jm77.ryu@samsung.com>
Fri, 22 Feb 2019 05:51:40 +0000 (14:51 +0900)
All getters of password policy require password privilege.
Thus privilege check should be performed in the every method call

Change-Id: Ia0fabe1c8c42319105f4b8b16e81c51cbd52bad6
Signed-off-by: Jaemin Ryu <jm77.ryu@samsung.com>
api/password.cpp

index b890ab3..011bfbe 100644 (file)
@@ -85,7 +85,7 @@ EXPORT_API int dpm_password_get_quality(void* handle, int *quality)
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getQuality");
+               ret = client.methodCallForce<int>("Password::getQuality");
                if (ret.get() < 0) {
                        return -1;
                }
@@ -123,7 +123,7 @@ EXPORT_API int dpm_password_get_minimum_length(void* handle, int *value)
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getMinimumLength");
+               ret = client.methodCallForce<int>("Password::getMinimumLength");
 
                if (ret.get() < 0) {
                        return -1;
@@ -162,7 +162,7 @@ EXPORT_API int dpm_password_get_min_complex_chars(void* handle, int *value)
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getMinComplexChars");
+               ret = client.methodCallForce<int>("Password::getMinComplexChars");
                if (ret.get() < 0) {
                        return -1;
                }
@@ -200,7 +200,7 @@ EXPORT_API int dpm_password_get_maximum_failed_attempts_for_wipe(void* handle, i
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getMaximumFailedForWipe");
+               ret = client.methodCallForce<int>("Password::getMaximumFailedForWipe");
                if (ret.get() < 0) {
                        return -1;
                }
@@ -238,7 +238,7 @@ EXPORT_API int dpm_password_get_expires(void* handle, int *value)
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getExpires");
+               ret = client.methodCallForce<int>("Password::getExpires");
                if (ret.get() < 0) {
                        return -1;
                }
@@ -276,7 +276,7 @@ EXPORT_API int dpm_password_get_history(void* handle, int *value)
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getHistory");
+               ret = client.methodCallForce<int>("Password::getHistory");
                if (ret.get() < 0) {
                        return -1;
                }
@@ -361,7 +361,7 @@ EXPORT_API int dpm_password_get_max_inactivity_time_device_lock(void* handle, in
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getMaxInactivityTimeDeviceLock");;
+               ret = client.methodCallForce<int>("Password::getMaxInactivityTimeDeviceLock");;
                if (ret.get() < 0) {
                        return -1;
                }
@@ -401,7 +401,7 @@ EXPORT_API int dpm_password_get_ret(void* handle, dpm_password_status_e *status)
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getStatus");
+               ret = client.methodCallForce<int>("Password::getStatus");
                if (ret.get() < 0) {
                        return -1;
                }
@@ -438,7 +438,7 @@ EXPORT_API int dpm_password_get_pattern(void* handle, char **pattern)
 
        try {
                Status<std::string> ret { std::string() };
-               ret = client.methodCall<std::string>("Password::getPattern");
+               ret = client.methodCallForce<std::string>("Password::getPattern");
                *pattern = ::strdup(ret.get().c_str());
        } catch (...) {
                return -1;
@@ -472,7 +472,7 @@ EXPORT_API int dpm_password_get_maximum_character_occurrences(void* handle, int
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getMaximumCharacterOccurrences");
+               ret = client.methodCallForce<int>("Password::getMaximumCharacterOccurrences");
                if (ret.get() < 0) {
                        return -1;
                }
@@ -510,7 +510,7 @@ EXPORT_API int dpm_password_get_maximum_numeric_sequence_length(void* handle, in
 
        try {
                Status<int> ret { 0 };
-               ret = client.methodCall<int>("Password::getMaximumNumericSequenceLength");
+               ret = client.methodCallForce<int>("Password::getMaximumNumericSequenceLength");
                if (ret.get() < 0) {
                        return -1;
                }
@@ -605,7 +605,7 @@ EXPORT_API int dpm_password_get_recovery(void* handle, int *enable)
 
        try {
                Status<int> ret { false };
-               ret = client.methodCall<int>("Password::getRecovery");
+               ret = client.methodCallForce<int>("Password::getRecovery");
                if (ret.get() < 0) {
                        return -1;
                }