diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-13 10:39:22 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-13 10:39:22 +0100 |
commit | 9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch) | |
tree | 8ac67e26b45f34d71c5aab3621813b100a0d5f00 /net-mail/relay-ctrl/files | |
parent | f516638b7fe9592837389826a6152a7e1b251c54 (diff) |
gentoo resync : 13.06.2020
Diffstat (limited to 'net-mail/relay-ctrl/files')
-rw-r--r-- | net-mail/relay-ctrl/files/relay-ctrl-3.1.1-NOFILE-overstep.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/net-mail/relay-ctrl/files/relay-ctrl-3.1.1-NOFILE-overstep.patch b/net-mail/relay-ctrl/files/relay-ctrl-3.1.1-NOFILE-overstep.patch new file mode 100644 index 000000000000..3bcd54c1f949 --- /dev/null +++ b/net-mail/relay-ctrl/files/relay-ctrl-3.1.1-NOFILE-overstep.patch @@ -0,0 +1,25 @@ +--- relay-ctrl-3.1.1/relay-ctrl-chdir.c 2002-04-26 18:07:38.000000000 +0200 ++++ relay-ctrl-3.1.1-patch/relay-ctrl-chdir.c 2010-12-08 20:49:15.449915704 +0100 +@@ -2,6 +2,7 @@ + #include <fcntl.h> + #include <stdlib.h> + #include <sys/stat.h> ++#include <sys/resource.h> + #include <unistd.h> + #include "misc/misc.h" + #include "msg/msg.h" +@@ -14,9 +15,12 @@ + static int move_high(int fd) + { + struct stat s; ++ struct rlimit rl; + int newfd; +- +- for (newfd = fd + 1;; ++newfd) { ++ ++ getrlimit(RLIMIT_NOFILE, &rl); ++ ++ for (newfd = fd + 1; newfd < rl.rlim_cur; ++newfd) { + if (fstat(newfd, &s) != -1) continue; + if (dup2(fd, newfd) == -1) break; + close(fd); |