/proc/self/io is not accessible otherwise
#include "lib.h"
#include "time-util.h"
+#include "restrict-access.h"
#include "stats-plugin.h"
#include "mail-stats.h"
if (proc_io_disabled)
return -1;
+
+ bool dumpable = restrict_access_get_dumpable();
+ if (!dumpable)
+ restrict_access_set_dumpable(TRUE);
proc_io_fd = open(PROC_IO_PATH, O_RDONLY);
if (proc_io_fd == -1 && errno == EACCES) {
/* kludge: if we're running with permissions temporarily
}
errno = EACCES;
}
+ if (!dumpable)
+ restrict_access_set_dumpable(FALSE);
if (proc_io_fd == -1) {
if (errno != ENOENT)
i_error("open(%s) failed: %m", PROC_IO_PATH);