summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-06-26 13:15:31 -0400
committerJoey Hess <joey@kitenet.net>2013-06-26 13:15:31 -0400
commit4700cd4415f26cc96d42ce64b3ee171087ace159 (patch)
tree5b78dad6365d6f03b95695edce4fe86c2b946d6a
parent92b659fb6d86b95d724761d8b25c6ea37a60105e (diff)
Quote user and group names, in case someone thought putting a space in one was not a bloody stupid idea.
-rw-r--r--debian/changelog7
-rwxr-xr-xpre-commit.d/30store-metadata4
2 files changed, 9 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index a56df1e..61f0875 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+etckeeper (1.5) UNRELEASED; urgency=low
+
+ * Quote user and group names, in case someone thought putting a space
+ in one was not a bloody stupid idea.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 26 Jun 2013 13:15:03 -0400
+
etckeeper (1.4) unstable; urgency=low
* Deal with unix^wlinux portability nonsense.
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
index d445db1..03ce475 100755
--- a/pre-commit.d/30store-metadata
+++ b/pre-commit.d/30store-metadata
@@ -101,10 +101,10 @@ generate_metadata() {
s/^/$q/;
s/$/$q/;
if ($uid != $>) {
- printf "maybe chown %s %s\n", uidname($uid), $_;
+ printf "maybe chown $q%s$q %s\n", uidname($uid), $_;
}
if ($gid != $)) {
- printf "maybe chgrp %s %s\n", gidname($gid), $_;
+ printf "maybe chgrp $q%s$q %s\n", gidname($gid), $_;
}
printf "maybe chmod %04o %s\n", $mode & 07777, $_;
'