diff options
Diffstat (limited to 'src/Daemon')
| -rw-r--r-- | src/Daemon/Daemon.cpp | 10 | ||||
| -rw-r--r-- | src/Daemon/Makefile.am | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 70fd9a10..55bbcea8 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -678,13 +678,19 @@ static void ensure_writable_dir(const char *dir, mode_t mode, const char *user) static void sanitize_dump_dir_rights() { - /* We can't allow anyone to create dumps: otherwise users can flood + /* Compat kludge, remove after 1.3.0 + * (and remove DEBUG_DUMPS_DIR_OLD define everywhere) + */ + if (rename(DEBUG_DUMPS_DIR_OLD, DEBUG_DUMPS_DIR) == 0) + symlink(DEBUG_DUMPS_DIR, DEBUG_DUMPS_DIR_OLD); + + /* We can't allow everyone to create dumps: otherwise users can flood * us with thousands of bogus or malicious dumps */ /* 07000 bits are setuid, setgit, and sticky, and they must be unset */ /* 00777 bits are usual "rwxrwxrwx" access rights */ ensure_writable_dir(DEBUG_DUMPS_DIR, 0755, "abrt"); /* debuginfo cache */ - ensure_writable_dir(DEBUG_DUMPS_DIR"-di", 0755, "root"); + ensure_writable_dir(DEBUG_INFO_DIR, 0755, "root"); /* temp dir */ ensure_writable_dir(VAR_RUN"/abrt", 0755, "root"); } diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am index c2347aec..95415463 100644 --- a/src/Daemon/Makefile.am +++ b/src/Daemon/Makefile.am @@ -17,7 +17,9 @@ abrtd_CPPFLAGS = \ -DBIN_DIR=\"$(bindir)\" \ -DVAR_RUN=\"$(VAR_RUN)\" \ -DCONF_DIR=\"$(CONF_DIR)\" \ + -DDEBUG_DUMPS_DIR_OLD=\"$(DEBUG_DUMPS_DIR_OLD)\" \ -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \ + -DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \ -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \ -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \ $(GLIB_CFLAGS) \ |
