mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
LibC: Add IPPORT_RESERVED and IPPORT_USERRESERVED
Gets rid of one dropbear patch. :^)
This commit is contained in:
parent
5448a670c0
commit
57b6f51137
2 changed files with 3 additions and 14 deletions
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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));
|
|
Loading…
Add table
Add a link
Reference in a new issue