summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/SOSreport.cpp
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-01-18 13:19:54 +0100
committerKarel Klic <kklic@redhat.com>2010-01-18 13:19:54 +0100
commit4267cbcc29781ddcac00e259dfe05f3a26fbc2ec (patch)
tree213e47138967f1e7af4ee9ff9a3f2ed861cb5815 /lib/Plugins/SOSreport.cpp
parentb2d1bd9e4f387c5a014d3002d741f25421c37aac (diff)
parentb41833ed61f7b579d2a46b26d261616c21a6ae32 (diff)
downloadabrt-4267cbcc29781ddcac00e259dfe05f3a26fbc2ec.tar.gz
abrt-4267cbcc29781ddcac00e259dfe05f3a26fbc2ec.tar.xz
abrt-4267cbcc29781ddcac00e259dfe05f3a26fbc2ec.zip
Merge branch 'master' of git://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Plugins/SOSreport.cpp')
-rw-r--r--lib/Plugins/SOSreport.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Plugins/SOSreport.cpp b/lib/Plugins/SOSreport.cpp
index 6f231659..25769105 100644
--- a/lib/Plugins/SOSreport.cpp
+++ b/lib/Plugins/SOSreport.cpp
@@ -91,7 +91,9 @@ void CActionSOSreport::Run(const char *pActionDir, const char *pArgs)
update_client(_("running sosreport: %s"), command.c_str());
std::string output = command;
output += '\n';
- output += popen_and_save_output(command.c_str());
+ char *command_out = run_in_shell_and_save_output(/*flags:*/ 0, command.c_str(), /*dir:*/ NULL, /*size_p:*/ NULL);
+ output += command_out;
+ free(command_out);
update_client(_("done running sosreport"));
std::string sosreport_filename = ParseFilename(output);
@@ -101,8 +103,9 @@ void CActionSOSreport::Run(const char *pActionDir, const char *pArgs)
dd.Open(pActionDir);
//Not useful
//dd.SaveText("sosreportoutput", output);
- if (copy_file(sosreport_filename.c_str(), sosreport_dd_filename.c_str()) < 0)
+ if (copy_file(sosreport_filename.c_str(), sosreport_dd_filename.c_str(), 0644) < 0)
{
+ dd.Close();
throw CABRTException(EXCEP_PLUGIN,
"Can't copy '%s' to '%s'",
sosreport_filename.c_str(),