shithub: tcp80

Download patch

ref: 13d9eb9e6470da1c9a5656438c80ea3d14680b6d
parent: d10c37fb4069dca47fd0c1815a9c6c77cce23eb1
author: Igor Böhm <[email protected]>
date: Mon Sep 5 18:34:37 EDT 2022

Drop trusted option (@igor)

--- a/tcp80.c
+++ b/tcp80.c
@@ -21,8 +21,6 @@
 	char *rul;
 };
 
-int trusted;
-
 char remote[128];
 char method[64];
 char location[1024];
@@ -615,14 +613,12 @@
 			}
 		}
 	}
-	if(!trusted){
-		if(addns("none", "/lib/namespace.httpd") < 0)
-			return 0;
-		if(bind("/usr/web", "/", MREPL) < 0)
-			return 0;
-		if(rfork(RFNOMNT) < 0)
-			return 0;
-	}
+	if(addns("none", "/lib/namespace.httpd") < 0)
+		return 0;
+	if(bind("/usr/web", "/", MREPL) < 0)
+		return 0;
+	if(rfork(RFNOMNT) < 0)
+		return 0;
 	return 1;
 }
 
@@ -633,12 +629,6 @@
 	char *p, *e, *k, *x, *s;
 	int lineno, n;
 	Pair *h;
-
-	ARGBEGIN {
-	case 't':
-		trusted++;
-		break;
-	} ARGEND
 
 	time(0);
 	if(argc){