summaryrefslogtreecommitdiffstats
path: root/source/n/inetd/inetd.loopingdos.diff
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/n/inetd/inetd.loopingdos.diff
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'source/n/inetd/inetd.loopingdos.diff')
-rw-r--r--source/n/inetd/inetd.loopingdos.diff54
1 files changed, 54 insertions, 0 deletions
diff --git a/source/n/inetd/inetd.loopingdos.diff b/source/n/inetd/inetd.loopingdos.diff
new file mode 100644
index 000000000..5bfcc53ff
--- /dev/null
+++ b/source/n/inetd/inetd.loopingdos.diff
@@ -0,0 +1,54 @@
+--- ./inetd.c.orig 2003-09-06 15:08:41.000000000 -0700
++++ ./inetd.c 2003-09-06 16:26:24.000000000 -0700
+@@ -171,7 +171,8 @@
+ #include <rpcsvc/nfs_prot.h>
+ #include "pathnames.h"
+
+-#define TOOMANY 256 /* don't start more than TOOMANY */
++#define TOOMANY 0 /* don't start more than TOOMANY */
++ /* zero disables this stupid "feature" */
+ #define CNT_INTVL 60 /* servers in CNT_INTVL sec. */
+ #define RETRYTIME (60*10) /* retry after bind or server fail */
+
+@@ -365,7 +366,7 @@
+ int val;
+
+ val = strtoul(optarg, &p, 0);
+- if (val >= 1 && *p == (char) NULL) {
++ if (val >= 0 && *p == (char) NULL) {
+ toomany = val;
+ break;
+ }
+@@ -546,7 +547,7 @@
+ if (dofork) {
+ if (sep->se_count++ == 0)
+ (void)gettimeofday(&sep->se_time, NULL);
+- else if (sep->se_count >= sep->se_max) {
++ else if (toomany > 0 && sep->se_count >= sep->se_max) {
+ struct timeval now;
+
+ (void)gettimeofday(&now, NULL);
+--- ./inetd.8.orig 2003-09-06 16:26:50.000000000 -0700
++++ ./inetd.8 2003-09-06 16:30:27.000000000 -0700
+@@ -68,7 +68,8 @@
+ Turns on debugging.
+ .It Fl R Ar rate
+ Specify the maximum number of times a service can be invoked
+-in one minute; the default is 256.
++in one minute; the default is unlimited. A rate of 0 allows an
++unlimited number of invocations.
+ .El
+ .Pp
+ Upon execution,
+@@ -249,9 +250,8 @@
+ spawned from
+ .Nm inetd
+ within an interval of 60 seconds.
+-When omitted,
+-.Dq max
+-defaults to 256.
++The default is unlimited (setting a limit may actually make it easier for
++an attacker to create a denial-of-service, and is not recommended).
+ .Pp
+ Stream servers are usually marked as
+ .Dq nowait