summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Bloch <m.bloch@samsung.com>2022-08-04 16:43:19 +0200
committerMichal Bloch <m.bloch@samsung.com>2022-08-04 16:43:19 +0200
commit065a82d389bb0dc0b81f61e66ea0e3cd0d29c37a (patch)
tree161532b25403624f5667ac56cac19b7ae5701ea8
parent3f9094c98c0e530ed8d231f5a0888a1749968efb (diff)
downloadsessiond-065a82d389bb0dc0b81f61e66ea0e3cd0d29c37a.tar.gz
sessiond-065a82d389bb0dc0b81f61e66ea0e3cd0d29c37a.tar.bz2
sessiond-065a82d389bb0dc0b81f61e66ea0e3cd0d29c37a.zip
Change-Id: Ic52222eb6157a5507689a3a91f6103d13de5ca02 Signed-off-by: Michal Bloch <m.bloch@samsung.com>
-rw-r--r--sessiond/src/fs_helpers.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/sessiond/src/fs_helpers.cpp b/sessiond/src/fs_helpers.cpp
index 51b93b2..2f8f2d1 100644
--- a/sessiond/src/fs_helpers.cpp
+++ b/sessiond/src/fs_helpers.cpp
@@ -71,11 +71,7 @@ void fs_helpers::copy_ownership(std::string_view src_path, std::string_view dest
+ src_path.data()
+ "` file/directory");
- if (chown(dest_path.data(), info.st_uid, info.st_gid) == -1)
- throw std::system_error(errno, std::system_category(),
- "Couldn't set owner/group of the `"s
- + dest_path.data()
- + "` file/directory");
+ change_owner_and_group(dest_path, info.st_uid, info.st_gid);
}
std::string fs_helpers::get_smack_label(std::string_view src_path, smack_label_type type)