X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fsecurity-manager-tests%2Fcommon%2Fsm_commons.cpp;h=b8b389b07313f27e53979776712064bf8c8fe07a;hb=73f509909a3e4942cc60efbe5963e3bcac9cd7d4;hp=acaf64df5281bc34af62a79ee7ba52a73d13ecae;hpb=476ebec06ecae35f131b5b22a5dd00da058fe1c9;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git diff --git a/src/security-manager-tests/common/sm_commons.cpp b/src/security-manager-tests/common/sm_commons.cpp index acaf64d..b8b389b 100644 --- a/src/security-manager-tests/common/sm_commons.cpp +++ b/src/security-manager-tests/common/sm_commons.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2016 - 2019 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -358,7 +359,7 @@ void runAccessTest(const std::string &label, uid_t uid, gid_t gid, const std::string &testPath, int accessType) { auto fun = [&](){ int oppositeAccessType = getOppositeAccessType(accessType); - change_label(label.c_str()); + ScopedProcessLabel spl(label, false); RUNNER_ASSERT_ERRNO_MSG(0 == drop_root_privileges(uid, gid), "drop_root_privileges failed.");