1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:17:44 +00:00

LibC: Add IPPORT_RESERVED and IPPORT_USERRESERVED

Gets rid of one dropbear patch. :^)
This commit is contained in:
Andreas Kling 2020-06-08 21:50:24 +02:00
parent 5448a670c0
commit 57b6f51137
2 changed files with 3 additions and 14 deletions

View file

@ -40,6 +40,9 @@ in_addr_t inet_addr(const char*);
#define IP_TTL 2 #define IP_TTL 2
#define IPPORT_RESERVED 1024
#define IPPORT_USERRESERVED 5000
struct in_addr { struct in_addr {
uint32_t s_addr; uint32_t s_addr;
}; };

View file

@ -1,14 +0,0 @@
--- a/svr-tcpfwd.c.orig
+++ b/svr-tcpfwd.c
@@ -186,11 +186,6 @@
TRACE(("invalid port: %d", port))
goto out;
}
-
- if (!ses.allowprivport && port < IPPORT_RESERVED) {
- TRACE(("can't assign port < 1024 for non-root"))
- goto out;
- }
}
tcpinfo = (struct TCPListener*)m_malloc(sizeof(struct TCPListener));