Remove attr_copy_file 80/77380/3
authorSangyoon Jang <s89.jang@samsung.com>
Wed, 29 Jun 2016 12:22:09 +0000 (21:22 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Wed, 29 Jun 2016 12:57:02 +0000 (21:57 +0900)
Copying smack label will be replaced with security-manager api.

Change-Id: I241d27f7c75b101eaacc9ca5e28b8abdf8989240

src/common/shared_dirs.cc
src/common/utils/file_util.cc
src/common/utils/file_util.h

index 95c1fcf..520d509 100644 (file)
@@ -492,7 +492,7 @@ bool CopyUserDirectories(const std::string& pkgid) {
     bf::path apps_rw(std::get<2>(l) / "apps_rw");
     bf::path src = bf::path(kSkelAppDir) / pkgid;
     bf::path dst = apps_rw / pkgid;
-    if (!ci::CopyDir(src, dst, FS_COPY_XATTR))
+    if (!ci::CopyDir(src, dst))
       continue;
     if (!SetPackageDirectoryOwnerAndPermissions(dst, std::get<0>(l),
         std::get<1>(l)))
index d271750..ac01a16 100644 (file)
@@ -7,7 +7,6 @@
 #include <linux/limits.h>
 #include <unzip.h>
 #include <zlib.h>
-#include <attr/libattr.h>
 
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -134,12 +133,6 @@ bool CopyDir(const bf::path& src, const bf::path& dst, FSFlag flags) {
         LOG(ERROR) << "Unable to create destination directory" << dst;
         return false;
       }
-      if (flags & FS_COPY_XATTR) {
-        if (attr_copy_file(src.c_str(), dst.c_str(), NULL, NULL)) {
-          LOG(ERROR) << "attr_copy_file failed";
-          return false;
-        }
-      }
     } else {
       if (!(flags & FS_MERGE_DIRECTORIES)) {
         LOG(ERROR) << "Destination directory " << dst.string()
@@ -173,12 +166,6 @@ bool CopyDir(const bf::path& src, const bf::path& dst, FSFlag flags) {
           continue;
         bf::copy_file(current, target);
       }
-      if (flags & FS_COPY_XATTR) {
-        if (attr_copy_file(src.c_str(), dst.c_str(), NULL, NULL)) {
-          LOG(ERROR) << "attr_copy_file failed";
-          return false;
-        }
-      }
     } catch (const bf::filesystem_error& error) {
       LOG(ERROR) << "Failed to copy directory: " << error.what();
       return false;
index 4effe71..3ee984b 100644 (file)
@@ -11,8 +11,7 @@ namespace common_installer {
 
 enum FSFlag {
   FS_NONE              = 0,
-  FS_MERGE_DIRECTORIES = (1 << 0),
-  FS_COPY_XATTR        = (1 << 1)
+  FS_MERGE_DIRECTORIES = (1 << 0)
 };
 
 bool CreateDir(const boost::filesystem::path& path);