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

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

 



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@xxxxxxxxxx>
---
 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

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux