summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/Daemon.cpp2
-rw-r--r--src/daemon/Makefile.am8
-rw-r--r--src/daemon/MiddleWare.cpp10
3 files changed, 7 insertions, 13 deletions
diff --git a/src/daemon/Daemon.cpp b/src/daemon/Daemon.cpp
index f791fb38..2d2c85ed 100644
--- a/src/daemon/Daemon.cpp
+++ b/src/daemon/Daemon.cpp
@@ -719,7 +719,7 @@ int main(int argc, char** argv)
log_scanner_pid = fork_execv_on_steroids(EXECFLG_INPUT_NUL,
(char**)scanner_argv,
/*pipefds:*/ NULL,
- /*unsetenv_vec:*/ NULL,
+ /*env_vec:*/ NULL,
/*dir:*/ NULL,
/*uid:*/ 0);
VERB1 log("Started log scanner, pid:%d", (int)log_scanner_pid);
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index 6fe73065..4c48ceb9 100644
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
@@ -30,7 +30,7 @@ abrtd_CPPFLAGS = \
$(DBUS_CFLAGS) \
$(ENABLE_SOCKET_OR_DBUS) \
-D_GNU_SOURCE \
- -Wall
+ -Wall -Wwrite-strings
abrtd_LDADD = \
$(DL_LIBS) \
$(DBUS_LIBS) \
@@ -51,7 +51,7 @@ abrt_server_CPPFLAGS = \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
$(GLIB_CFLAGS) \
-D_GNU_SOURCE \
- -Wall -Werror
+ -Wall -Wwrite-strings -Werror
abrt_server_LDADD = \
../lib/libreport.la
@@ -71,7 +71,7 @@ abrt_handle_crashdump_CPPFLAGS = \
-DLIBEXEC_DIR=\"$(LIBEXEC_DIR)\" \
$(GLIB_CFLAGS) \
-D_GNU_SOURCE \
- -Wall -Werror
+ -Wall -Wwrite-strings -Werror
abrt_handle_crashdump_LDADD = \
../lib/libreport.la
@@ -92,7 +92,7 @@ abrt_action_save_package_data_CPPFLAGS = \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
$(GLIB_CFLAGS) \
-D_GNU_SOURCE \
- -Wall -Werror
+ -Wall -Wwrite-strings -Werror
abrt_action_save_package_data_LDADD = \
$(RPM_LIBS) \
../lib/libreport.la
diff --git a/src/daemon/MiddleWare.cpp b/src/daemon/MiddleWare.cpp
index 215e7b49..8d62c697 100644
--- a/src/daemon/MiddleWare.cpp
+++ b/src/daemon/MiddleWare.cpp
@@ -351,14 +351,8 @@ report_status_t Report(crash_data_t *client_report,
for (GList *li = env_list; li; li = g_list_next(li))
{
char *s = (char*)li->data;
- /* Need to make a copy: just cutting s at '=' and unsetenv'ing
- * the result would be a bug! s _itself_ is in environment now,
- * we must not modify it there!
- */
- char *name = xstrndup(s, strchrnul(s, '=') - s);
- VERB3 log("Unexporting '%s'", name);
- unsetenv(name);
- free(name);
+ VERB3 log("Unexporting '%s'", s);
+ safe_unsetenv(s);
free(s);
}
g_list_free(env_list);