From a35b8fb842aea68c0b374b651d385344fadaa04e Mon Sep 17 00:00:00 2001 From: Max Rees Date: Wed, 3 Jun 2020 04:52:46 -0500 Subject: image: fix a few paths from escaping target/ --- image/backends/iso.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'image/backends/iso.cc') diff --git a/image/backends/iso.cc b/image/backends/iso.cc index a7e2dd7..4563c97 100644 --- a/image/backends/iso.cc +++ b/image/backends/iso.cc @@ -85,7 +85,7 @@ bool copy_volume_icon_to(fs::path ir_dir) { } bool write_etc_mtab_to(fs::path target) { - std::ofstream mtab(target.append("/etc/conf.d/mtab")); + std::ofstream mtab(target.append("etc/conf.d/mtab")); if(!mtab) { output_error("CD backend", "failed to open mtab configuration"); return false; @@ -101,7 +101,7 @@ bool write_etc_mtab_to(fs::path target) { } bool write_fstab_to(fs::path target) { - std::ofstream fstab{target.append("/etc/fstab")}; + std::ofstream fstab{target.append("etc/fstab")}; if(!fstab) { output_error("CD backend", "failed to open fstab"); return false; @@ -127,7 +127,7 @@ bool write_fstab_to(fs::path target) { bool write_etc_issue_to(fs::path target) { error_code ec; - const fs::path dest{target.append("/etc/issue")}; + const fs::path dest{target.append("etc/issue")}; const fs::path src{find_data_file("issue")}; if(src.has_filename()) { -- cgit v1.2.3-60-g2f50 From 6d9840c6a8eb23b7a8de4436b50c00490f337482 Mon Sep 17 00:00:00 2001 From: Max Rees Date: Wed, 3 Jun 2020 06:05:05 -0500 Subject: image: ensure entire line from iso-params file is read --- image/backends/iso.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'image/backends/iso.cc') diff --git a/image/backends/iso.cc b/image/backends/iso.cc index 4563c97..004cba8 100644 --- a/image/backends/iso.cc +++ b/image/backends/iso.cc @@ -407,7 +407,7 @@ public: if(!params) { output_warning("CD backend", "couldn't read ISO params"); } else { - params >> raw_arch; + std::getline(params, raw_arch); } } } -- cgit v1.2.3-60-g2f50