summaryrefslogtreecommitdiff
path: root/pre-commit.d/30store-metadata
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 /pre-commit.d/30store-metadata
parent92b659fb6d86b95d724761d8b25c6ea37a60105e (diff)
Quote user and group names, in case someone thought putting a space in one was not a bloody stupid idea.
Diffstat (limited to 'pre-commit.d/30store-metadata')
-rwxr-xr-xpre-commit.d/30store-metadata4
1 files changed, 2 insertions, 2 deletions
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, $_;
'