]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
plugins/old-stats: Remove restrict_access_set_dumpable calls from process_io_open().
authorSergey Kitov <sergey.kitov@open-xchange.com>
Thu, 26 Apr 2018 06:48:39 +0000 (09:48 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 30 Apr 2018 13:49:27 +0000 (16:49 +0300)
proc_io_fd is opened in preinit(), while process have root access, so
restrict_access_set_dumpable() calls are not needed.

src/plugins/stats/mail-stats-fill.c

index 4a24378d752b9cd974892095b25b773036a63ef3..a2ad387a7079f030cd4da9e61875066f80aa657e 100644 (file)
@@ -2,7 +2,6 @@
 
 #include "lib.h"
 #include "time-util.h"
-#include "restrict-access.h"
 #include "stats-plugin.h"
 #include "mail-stats.h"
 
@@ -47,9 +46,6 @@ static int process_io_open(void)
        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
@@ -65,8 +61,6 @@ static int process_io_open(void)
                }
                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);