[ostree] deploy: Ensure that any modified config files are fsync()d



commit 38feca0e4d4f31067786b9a2cf5aa192ebf16d26
Author: Colin Walters <walters verbum org>
Date:   Tue Apr 8 17:37:35 2014 -0400

    deploy: Ensure that any modified config files are fsync()d
    
    It really wouldn't do for one to be missing one's ssh keys for
    example...

 src/libostree/ostree-sysroot-deploy.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index 8af5f2c..44ad959 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -86,6 +86,11 @@ copy_modified_config_file (GFile              *orig_etc,
       if (!g_file_copy (src, dest, G_FILE_COPY_OVERWRITE | G_FILE_COPY_NOFOLLOW_SYMLINKS | 
G_FILE_COPY_ALL_METADATA,
                         cancellable, NULL, NULL, error))
         goto out;
+      if (g_file_info_get_file_type (src_info) == G_FILE_TYPE_REGULAR)
+        {
+          if (!gs_file_sync_data (dest, cancellable, error))
+            goto out;
+        }
     }
 
   ret = TRUE;


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