summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2017-08-25 19:07:06 -0400
committerJoey Hess2017-08-25 19:07:06 -0400
commitca81181d3c525a39ae421f675a9551795e2c642e (patch)
tree3f7bc8e505651445b5f94a8f445b9aaad5341a5a
parent4d76737e18ef866ad4b634e31b4092f27fe9b230 (diff)
parent4df36434f50be58f413550dd36206f0c15a3e6f2 (diff)
Merge branch 'joeyconfig'
-rw-r--r--debian/changelog2
-rw-r--r--src/Propellor/Property/Attic.hs2
-rw-r--r--src/Propellor/Property/Borg.hs2
3 files changed, 4 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 9b01183f..c7cfb81a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ propellor (4.8.0) UNRELEASED; urgency=medium
* Removed DiskImage.vmdkBuiltFor property. (API change)
Instead, use VirtualBoxPointer in the property that creates the disk
image.
+ * Borg: Fix broken shell escaping in borg cron job.
+ * Attic: Fix broken shell escaping in attic cron job.
-- Joey Hess <id@joeyh.name> Thu, 24 Aug 2017 11:00:19 -0400
diff --git a/src/Propellor/Property/Attic.hs b/src/Propellor/Property/Attic.hs
index 9e024356..8ab5546b 100644
--- a/src/Propellor/Property/Attic.hs
+++ b/src/Propellor/Property/Attic.hs
@@ -108,7 +108,7 @@ backup' dir backupdir crontimes extraargs kp = cronjob
where
desc = backupdir ++ " attic backup"
cronjob = Cron.niceJob ("attic_backup" ++ dir) crontimes (User "root") "/" $
- "flock " ++ shellEscape lockfile ++ " sh -c " ++ backupcmd
+ "flock " ++ shellEscape lockfile ++ " sh -c " ++ shellEscape backupcmd
lockfile = "/var/lock/propellor-attic.lock"
backupcmd = intercalate ";" $
createCommand
diff --git a/src/Propellor/Property/Borg.hs b/src/Propellor/Property/Borg.hs
index c02c5fb5..ace7a48b 100644
--- a/src/Propellor/Property/Borg.hs
+++ b/src/Propellor/Property/Borg.hs
@@ -110,7 +110,7 @@ backup' dir backupdir crontimes extraargs kp = cronjob
where
desc = backupdir ++ " borg backup"
cronjob = Cron.niceJob ("borg_backup" ++ dir) crontimes (User "root") "/" $
- "flock " ++ shellEscape lockfile ++ " sh -c " ++ backupcmd
+ "flock " ++ shellEscape lockfile ++ " sh -c " ++ shellEscape backupcmd
lockfile = "/var/lock/propellor-borg.lock"
backupcmd = intercalate ";" $
createCommand