diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-11 07:22:13 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-11 07:22:13 +0100 |
| commit | 14ef0cfe72faf6696df3ef8f42927e9458ccbeeb (patch) | |
| tree | c5d3a3169fc31f212d507553beb67920be92ebcd /src | |
| parent | b1c4304104910c4bc066cd43f9784fe2f3ddf1ad (diff) | |
| download | abrt-14ef0cfe72faf6696df3ef8f42927e9458ccbeeb.tar.gz abrt-14ef0cfe72faf6696df3ef8f42927e9458ccbeeb.tar.xz abrt-14ef0cfe72faf6696df3ef8f42927e9458ccbeeb.zip | |
*: misc fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/Applet/CCApplet.cpp | 2 | ||||
| -rw-r--r-- | src/Daemon/CrashWatcher.cpp | 12 | ||||
| -rwxr-xr-x | src/Daemon/abrt-debuginfo-install | 6 | ||||
| -rw-r--r-- | src/Hooks/CCpp.cpp | 2 | ||||
| -rw-r--r-- | src/Hooks/abrt-hook-python.cpp | 2 |
5 files changed, 13 insertions, 11 deletions
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp index 07e44d89..770915a0 100644 --- a/src/Applet/CCApplet.cpp +++ b/src/Applet/CCApplet.cpp @@ -205,7 +205,7 @@ void CApplet::CrashNotify(const char *format, ...) if (gtk_status_icon_is_embedded(m_pStatusIcon)) notify_notification_show(m_pNotification, &err); if (err != NULL) - error_msg(err->message); + error_msg("%s", err->message); } void CApplet::OnAppletActivate_CB(GtkStatusIcon *status_icon, gpointer user_data) diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 88c058b0..59f9e65b 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -168,12 +168,11 @@ int CreateReportThread(const char* pUUID, const char* pUID, int force, const cha thread_data->force = force; thread_data->peer = xstrdup(pSender); -//TODO: do we need this? -//pthread_attr_t attr; -//pthread_attr_init(&attr); -//pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - - int r = pthread_create(&thread_data->thread_id, NULL, create_report, thread_data); + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + int r = pthread_create(&thread_data->thread_id, &attr, create_report, thread_data); + pthread_attr_destroy(&attr); if (r != 0) { free(thread_data->UUID); @@ -187,7 +186,6 @@ int CreateReportThread(const char* pUUID, const char* pUID, int force, const cha return r; } VERB3 log("Thread %llx created", (unsigned long long)thread_data->thread_id); -//pthread_attr_destroy(&attr); return r; } diff --git a/src/Daemon/abrt-debuginfo-install b/src/Daemon/abrt-debuginfo-install index cfae49a1..35f4d6a1 100755 --- a/src/Daemon/abrt-debuginfo-install +++ b/src/Daemon/abrt-debuginfo-install @@ -145,9 +145,11 @@ print_package_names() { fi # when we look for debuginfo we need only -debuginfo* repos, so we can disable the rest and thus make it faster # also we want only fedora repositories, because abrt won't work for other packages anyway - local cmd="yum $yumopts --disablerepo=* --enablerepo=fedora-debuginfo* --enablerepo=updates-debuginfo* --quiet provides $missing_debuginfo_files" + local cmd="yum $yumopts '--disablerepo=*' '--enablerepo=fedora-debuginfo*' '--enablerepo=updates-debuginfo*' --quiet provides $missing_debuginfo_files" echo "$cmd" >"yum_provides.$1.OUT" - local yum_provides_OUT="`$cmd 2>&1`" + # eval is needed to strip away ''s; cant remove them above and just use + # $cmd, that would perform globbing on '*' + local yum_provides_OUT="`eval $cmd 2>&1`" local err=$? printf "%s\nyum exitcode:%s\n" "$yum_provides_OUT" $err >>"yum_provides.$1.OUT" test $err = 0 || error_msg_and_die "yum provides... exited with $err: diff --git a/src/Hooks/CCpp.cpp b/src/Hooks/CCpp.cpp index b09a1328..b5bfff77 100644 --- a/src/Hooks/CCpp.cpp +++ b/src/Hooks/CCpp.cpp @@ -70,7 +70,7 @@ int main(int argc, char** argv) const char* program_name = argv[0]; error_msg_and_die("Usage: %s: DUMPDIR PID SIGNO UID CORE_SIZE_LIMIT", program_name); } - openlog("abrt", 0, LOG_DAEMON); + openlog("abrt", 0, LOG_PID | LOG_DAEMON); logmode = LOGMODE_SYSLOG; errno = 0; diff --git a/src/Hooks/abrt-hook-python.cpp b/src/Hooks/abrt-hook-python.cpp index 468c7ecc..1a7eacee 100644 --- a/src/Hooks/abrt-hook-python.cpp +++ b/src/Hooks/abrt-hook-python.cpp @@ -79,6 +79,8 @@ int main(int argc, char** argv) if (!pid || !executable || !uuid) goto usage; +//TODO: sanitize uuid and executable (size, valid chars etc) + unsigned setting_MaxCrashReportsSize = 0; parse_conf(NULL, &setting_MaxCrashReportsSize, NULL); if (setting_MaxCrashReportsSize > 0) |
