aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-git-receiver
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-git-receiver')
-rw-r--r--src/blogc-git-receiver/shell-command-parser.c25
-rw-r--r--src/blogc-git-receiver/shell-command-parser.h1
-rw-r--r--src/blogc-git-receiver/shell.c2
3 files changed, 1 insertions, 27 deletions
diff --git a/src/blogc-git-receiver/shell-command-parser.c b/src/blogc-git-receiver/shell-command-parser.c
index 0c867b8..4cfdec8 100644
--- a/src/blogc-git-receiver/shell-command-parser.c
+++ b/src/blogc-git-receiver/shell-command-parser.c
@@ -99,28 +99,3 @@ error:
bc_string_free(rv, true);
return NULL;
}
-
-
-char*
-bgr_shell_quote(const char *command)
-{
- // this does not really belongs here, but function is very small
- bc_string_t *rv = bc_string_new();
- bc_string_append_c(rv, '\'');
- if (command != NULL) {
- for (size_t i = 0; i < strlen(command); i++) {
- switch (command[i]) {
- case '!':
- bc_string_append(rv, "'\\!'");
- break;
- case '\'':
- bc_string_append(rv, "'\\''");
- break;
- default:
- bc_string_append_c(rv, command[i]);
- }
- }
- }
- bc_string_append_c(rv, '\'');
- return bc_string_free(rv, false);
-}
diff --git a/src/blogc-git-receiver/shell-command-parser.h b/src/blogc-git-receiver/shell-command-parser.h
index 47054cb..652d671 100644
--- a/src/blogc-git-receiver/shell-command-parser.h
+++ b/src/blogc-git-receiver/shell-command-parser.h
@@ -10,6 +10,5 @@
#define _SHELL_COMMAND_PARSER_H
char* bgr_shell_command_parse(const char *command);
-char* bgr_shell_quote(const char *command);
#endif /* _SHELL_COMMAND_PARSER_H */
diff --git a/src/blogc-git-receiver/shell.c b/src/blogc-git-receiver/shell.c
index d83174f..a21c5bd 100644
--- a/src/blogc-git-receiver/shell.c
+++ b/src/blogc-git-receiver/shell.c
@@ -51,7 +51,7 @@ bgr_shell(int argc, char *argv[])
}
repo = bc_strdup_printf("%s/repos/%s", home, tmp_repo);
- quoted_repo = bgr_shell_quote(repo);
+ quoted_repo = bc_shell_quote(repo);
free(tmp_repo);
if (0 == strncmp(argv[2], "git-upload-", 11)) // no need to check len here