From 57d2dfab18ad3d987d9273bb7c1f42e73e0bbcb2 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 22 Jun 2009 07:49:37 +0100 Subject: Add 'sh' and 'sh-lines' commands. --- daemon/command.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'daemon/command.c') diff --git a/daemon/command.c b/daemon/command.c index 3254de58..b33f2dbe 100644 --- a/daemon/command.c +++ b/daemon/command.c @@ -101,3 +101,19 @@ do_command_lines (char **argv) return lines; /* Caller frees. */ } + +char * +do_sh (char *command) +{ + char *argv[] = { "/bin/sh", "-c", command, NULL }; + + return do_command (argv); +} + +char ** +do_sh_lines (char *command) +{ + char *argv[] = { "/bin/sh", "-c", command, NULL }; + + return do_command_lines (argv); +} -- cgit