diff options
| author | Karel Klic <kklic@redhat.com> | 2010-01-25 11:56:07 +0100 |
|---|---|---|
| committer | Karel Klic <kklic@redhat.com> | 2010-01-25 11:56:07 +0100 |
| commit | 74b84ad79f3c519f0ae507cab8e44a8949aa6ce2 (patch) | |
| tree | 15e88391a165150607475c92c2f6fe71bc097af7 /lib | |
| parent | a7f78af31ad0dfae4a5144fc626d24d0897a910d (diff) | |
| parent | 6cb0d003d45ac17ebd2580a4bc24740efad085a6 (diff) | |
| download | abrt-74b84ad79f3c519f0ae507cab8e44a8949aa6ce2.tar.gz abrt-74b84ad79f3c519f0ae507cab8e44a8949aa6ce2.tar.xz abrt-74b84ad79f3c519f0ae507cab8e44a8949aa6ce2.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Plugins/FileTransfer.conf | 3 | ||||
| -rw-r--r-- | lib/Plugins/TicketUploader.cpp | 27 | ||||
| -rw-r--r-- | lib/Utils/xfuncs.cpp | 9 |
3 files changed, 12 insertions, 27 deletions
diff --git a/lib/Plugins/FileTransfer.conf b/lib/Plugins/FileTransfer.conf index 1ceccec..d75488c 100644 --- a/lib/Plugins/FileTransfer.conf +++ b/lib/Plugins/FileTransfer.conf @@ -6,9 +6,10 @@ Enabled = yes # upload - upload new crash or saved crashes to the specified url # URL to upload the files to -# supported: ftp, ftps, http, https, scp, sftp, tftp +# supported: ftp, ftps, http, https, scp, sftp, tftp, file # for example: ftp://user:password@server.name/directory # or: scp://user:password@server.name:port/directory etc. +# for testing: file:///tmp URL = #archive type, one of .zip, .tar.gz or .tar.bz2 diff --git a/lib/Plugins/TicketUploader.cpp b/lib/Plugins/TicketUploader.cpp index c85a329..38590f3 100644 --- a/lib/Plugins/TicketUploader.cpp +++ b/lib/Plugins/TicketUploader.cpp @@ -298,10 +298,13 @@ string CTicketUploader::Report(const map_crash_data_t& pCrashData, msg += "Please copy this into ticket: "; msg += ticket_name; msg += '\n'; + msg += "========cut here========="; + msg += '\n'; } else { msg += "Please send this to your technical support:\n"; + msg += "========cut here========="; } if (do_upload) { @@ -321,35 +324,25 @@ string CTicketUploader::Report(const map_crash_data_t& pCrashData, } msg += "FILE: "; msg += outfile_basename; - msg += "\nMD5SUM:\n"; + msg += "\nMD5SUM:"; msg += md5sum; + msg += '\n'; if (do_encrypt) { msg += "KEY: aes-128-cbc\n"; msg += key; + msg += '\n'; } - msg += "END:\n"; + msg += "==========end===========\n"; // warn the client (why _warn_? it's not an error, maybe update_client?): - error_msg("%s", msg.c_str()); - - string ret; - if (do_upload) - { - ret = _("report sent to ") + upload_url + '/' + outfile_basename; - update_client("%s", ret.c_str()); - } - else - { - ret = _("report copied to /tmp/") + outfile_basename; - update_client("%s", ret.c_str()); - } - + //error_msg("%s", msg.c_str()); + // delete the temporary directory cmd = ssprintf("rm -rf %s", tmpdir_name); RunCommand(cmd.c_str()); - return ret; + return msg; } static bool is_string_safe(const char *str) diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index f360d33..16f4cb0 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -379,12 +379,3 @@ void xsetregid(gid_t rgid, gid_t egid) if (setregid(rgid, egid) != 0) perror_msg_and_die("can't set %cid %lu", 'g', (long)rgid); } - -uid_t getuidbyname(const char* login) -{ - struct passwd* pwd = getpwnam(login); - if (pwd == NULL) - return -1; - - return pwd->pw_uid; -} |
