setPermissions should succeed when called with empty permissions & no permissions... 66/147666/2 accepted/tizen/4.0/unified/20170914.235210 submit/tizen_4.0/20170907.063156 submit/tizen_4.0/20170914.025855 submit/tizen_4.0/20170915.073846
authorTomasz Swierczek <t.swierczek@samsung.com>
Tue, 5 Sep 2017 06:01:02 +0000 (08:01 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Tue, 5 Sep 2017 12:18:42 +0000 (14:18 +0200)
Change-Id: Ibe94959942b300779adb1ab82bd794791b33630d
Signed-off-by: Tomasz Swierczek <t.swierczek@samsung.com>
src/manager/service/ckm-logic.cpp

index 36f2ea7..5f13444 100644 (file)
@@ -1794,12 +1794,6 @@ int CKMLogic::setPermissionHelper(
        if (!handler.database.isNameLabelPresent(name, ownerLabel))
                return CKM_API_ERROR_DB_ALIAS_UNKNOWN;
 
-       // removing non-existing permissions: fail
-       if (permissionMask == Permission::NONE) {
-               if (!handler.database.getPermissionRow(name, ownerLabel, accessorLabel))
-                       return CKM_API_ERROR_INPUT_PARAM;
-       }
-
        // set permissions to the row owned by ownerLabel for accessorLabel
        handler.database.setPermission(name, ownerLabel, accessorLabel, permissionMask);
        transaction.commit();