[Libosinfo] [PATCH db-tools 08/11] Fix swapped file/directory permissions in tar file

Daniel P. Berrange berrange at redhat.com
Tue Jun 28 15:52:34 UTC 2016


Plain files were given mode 0755 while dirs got 0644, the exact
opposite of what they should have.

Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 tools/osinfo-db-export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index 1973a33..c79778a 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -204,7 +204,7 @@ static int osinfo_db_export_create_file(const gchar *prefix,
             g_print("%s: r %s\n", argv0, entpath);
         }
         archive_entry_set_filetype(entry, AE_IFREG);
-        archive_entry_set_perm(entry, 0755);
+        archive_entry_set_perm(entry, 0644);
         archive_entry_set_size(entry, g_file_info_get_size(info));
         break;
 
@@ -213,7 +213,7 @@ static int osinfo_db_export_create_file(const gchar *prefix,
             g_print("%s: d %s\n", argv0, entpath);
         }
         archive_entry_set_filetype(entry, AE_IFDIR);
-        archive_entry_set_perm(entry, 0644);
+        archive_entry_set_perm(entry, 0755);
         archive_entry_set_size(entry, 0);
         break;
 
-- 
2.7.4




More information about the Libosinfo mailing list