[ostree] core: Also chown() after unpacking objects



commit b7a45b5815784eafdb05c2ef6f3357892dbfc841
Author: Colin Walters <walters verbum org>
Date:   Fri Nov 18 18:50:29 2011 -0500

    core: Also chown() after unpacking objects

 src/libostree/ostree-core.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index ebf4737..c7a1cb1 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -871,6 +871,12 @@ unpack_file (GFile        *file,
       goto out;
     }
 
+  if (lchown (dest_path, uid, gid) < 0)
+    {
+      ot_util_set_error_from_errno (error, errno);
+      goto out;
+    }
+
   if (!S_ISLNK (mode))
     {
       if (chmod (dest_path, mode) < 0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]