diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-14 13:01:10 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-14 13:01:10 +0200 |
commit | ec49d131847ccd6a4e1bf4d7b98c6a2999052efd (patch) | |
tree | 53f67b39dc149937f45aecc8ff6165fce194b6ed | |
parent | 2e76610e518104982de835c566370203ca4da21b (diff) | |
download | abrt-ec49d131847ccd6a4e1bf4d7b98c6a2999052efd.tar.gz abrt-ec49d131847ccd6a4e1bf4d7b98c6a2999052efd.tar.xz abrt-ec49d131847ccd6a4e1bf4d7b98c6a2999052efd.zip |
Move /var/cache/abrt to /var/spool/abrt. Fixes bug 568101.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/Daemon/Daemon.cpp | 10 | ||||
-rw-r--r-- | src/Daemon/Makefile.am | 2 |
3 files changed, 13 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index e72f896d..1465ed88 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,8 @@ PLUGINS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/plugins' PLUGINS_LIB_DIR='${libdir}/${PACKAGE_NAME}' ENABLE_SOCKET_OR_DBUS='-DENABLE_DBUS=1' -DEBUG_DUMPS_DIR='${localstatedir}/cache/${PACKAGE_NAME}' +DEBUG_DUMPS_DIR_OLD='${localstatedir}/cache/${PACKAGE_NAME}' +DEBUG_DUMPS_DIR='${localstatedir}/spool/${PACKAGE_NAME}' DEBUG_INFO_DIR='${localstatedir}/cache/${PACKAGE_NAME}-di' AC_ARG_WITH(debugdumpsdir, @@ -87,6 +88,7 @@ AC_SUBST(CONF_DIR) AC_SUBST(VAR_RUN) AC_SUBST(PLUGINS_CONF_DIR) AC_SUBST(PLUGINS_LIB_DIR) +AC_SUBST(DEBUG_DUMPS_DIR_OLD) AC_SUBST(DEBUG_DUMPS_DIR) AC_SUBST(DEBUG_INFO_DIR) AC_SUBST(DL_LIBS, -ldl) 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) \ |