X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcommon%2Faccess_provider.cpp;h=fb53d86a1ba87538e982df49d4e6496469a96309;hb=73f509909a3e4942cc60efbe5963e3bcac9cd7d4;hp=1d3257a736e1445be3206e7c9e9decf2d46bce0b;hpb=ff54c892d3d4f4facffebaa6fdb5cdc569ba0ade;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git diff --git a/src/common/access_provider.cpp b/src/common/access_provider.cpp index 1d3257a..fb53d86 100644 --- a/src/common/access_provider.cpp +++ b/src/common/access_provider.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 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. @@ -28,6 +28,7 @@ #include #include +#include namespace SecurityServer { @@ -55,8 +56,7 @@ void AccessProvider::applyAndSwithToUser(int uid, int gid) { RUNNER_ASSERT_MSG(0 == smack_revoke_subject(m_myLabel.c_str()), "Error in smack_revoke_subject(" << m_myLabel << ")"); apply(); - RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(m_myLabel.c_str()), - "Error in smack_set_label_for_self."); + ScopedProcessLabel spl(m_myLabel, false); RUNNER_ASSERT_MSG(0 == setgid(gid), "Error in setgid."); RUNNER_ASSERT_MSG(0 == setuid(uid),