diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-24 10:30:49 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-24 10:30:49 +0100 |
commit | ce7b0c94f76a9a8fa6a43b70428c0c38240d81b2 (patch) | |
tree | 4d7f33b89cbc0865afd730e800daccf5afe01ebb /shutdown.c | |
parent | 088c325e8f6f6bb70a2588a9eb6278c0795245af (diff) | |
download | vdr-ce7b0c94f76a9a8fa6a43b70428c0c38240d81b2.tar.gz vdr-ce7b0c94f76a9a8fa6a43b70428c0c38240d81b2.tar.bz2 |
Added the backslash ('\') to the list of characters that need to be escaped when executing external commands1.5.16
Diffstat (limited to 'shutdown.c')
-rw-r--r-- | shutdown.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,7 +6,7 @@ * * Original version written by Udo Richter <udo_richter@gmx.de>. * - * $Id: shutdown.c 1.4 2008/01/13 14:27:29 kls Exp $ + * $Id: shutdown.c 1.5 2008/02/24 10:29:00 kls Exp $ */ #include "shutdown.h" @@ -130,7 +130,7 @@ void cShutdownHandler::SetShutdownCommand(const char *ShutdownCommand) void cShutdownHandler::CallShutdownCommand(time_t WakeupTime, int Channel, const char *File, bool UserShutdown) { time_t Delta = WakeupTime ? WakeupTime - time(NULL) : 0; - cString cmd = cString::sprintf("%s %ld %ld %d \"%s\" %d", shutdownCommand, WakeupTime, Delta, Channel, *strescape(File, "\"$"), UserShutdown); + cString cmd = cString::sprintf("%s %ld %ld %d \"%s\" %d", shutdownCommand, WakeupTime, Delta, Channel, *strescape(File, "\\\"$"), UserShutdown); isyslog("executing '%s'", *cmd); int Status = SystemExec(cmd, true); if (!WIFEXITED(Status) || WEXITSTATUS(Status)) |