From da8962fa45dc1080fadadaf564402233c3076ac4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=A1=B0=EC=9B=85=EC=84=9D/Common=20Platform=20Lab=28SR=29?= =?utf8?q?/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 8 Feb 2022 09:23:29 +0900 Subject: [PATCH] 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. --- NativeLauncher/util/utils.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.7.4