Skip to content

Commit 8864ce0

Browse files
committed
utils/archivemount: mount read-only
Otherwise the output may end up inside the tarball when using relative path (to be fixed). Signed-off-by: Brice Goglin <[email protected]>
1 parent 1cf512a commit 8864ce0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/hwloc/misc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ hwloc_utils_enable_input_format(struct hwloc_topology *topology, unsigned long f
291291
perror("Creating archivemount directory");
292292
return EXIT_FAILURE;
293293
}
294-
snprintf(mntcmd, sizeof(mntcmd), "%s %s %s", HWLOC_ARCHIVEMOUNT_PATH, input, mntpath);
294+
snprintf(mntcmd, sizeof(mntcmd), "%s -o ro %s %s", HWLOC_ARCHIVEMOUNT_PATH, input, mntpath);
295295
err = system(mntcmd);
296296
if (err) {
297297
perror("Archivemount'ing the archive");

0 commit comments

Comments
 (0)