From: 조웅석/Common Platform Lab(SR)/삼성전자 Date: Tue, 8 Feb 2022 00:23:29 +0000 (+0900) Subject: Remove lchmod related code (#375) X-Git-Tag: submit/tizen/20220222.013136~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da8962fa45dc1080fadadaf564402233c3076ac4;p=platform%2Fcore%2Fdotnet%2Flauncher.git Remove lchmod related code (#375) In the linux system, permission of symlink file is meaningless. (Also, lchmod alwasy returns -1 because it is not implemented.) To remove unnecessary error message while installing application, remove lchmod related code. --- diff --git a/NativeLauncher/util/utils.cc b/NativeLauncher/util/utils.cc index 6958529..a12af28 100644 --- a/NativeLauncher/util/utils.cc +++ b/NativeLauncher/util/utils.cc @@ -424,12 +424,11 @@ void copySmackAndOwnership(const std::string& fromPath, const std::string& toPat free(label); } - // change owner, groups and mode for symbolic link. + // change owner and groupsfor symbolic link. + // change mode is skipped for symlink because permission of symlink file is meaningless. if (!lstat(fromPath.c_str(), &info)) { if (lchown(toPath.c_str(), info.st_uid, info.st_gid) == -1) _SERR("Failed to change owner and group name"); - if (lchmod(toPath.c_str(), info.st_mode) == -1) - _SERR("Failed to change mode"); } } else { // change smack label