Linus Groh
174583cda5
LibVT: Add parameter names in function signatures for clarity
2020-01-26 15:58:06 +01:00
Linus Groh
3549623dc6
LibVT: Rename escape$r to DECSTBM (Set Top and Bottom Margins)
2020-01-26 15:58:06 +01:00
Linus Groh
79f88db6fb
LibVT: Remove empty line
2020-01-26 15:58:06 +01:00
Linus Groh
fd8c250866
LibVT: Replace escape$h_l with SM (Set Mode) / RM (Reset Mode)
2020-01-26 15:58:06 +01:00
Linus Groh
be57b81336
LibVT: Rename escape$f to HVP (Horizontal and Vertical Position)
2020-01-26 15:58:06 +01:00
Linus Groh
2edd8e37ae
LibVT: Rename escape$c to DA (Device Attributes)
2020-01-26 15:58:06 +01:00
Linus Groh
dcb5bf9e50
LibVT: Rename escape$m to SGR (Select Graphic Rendition)
2020-01-26 15:58:06 +01:00
Linus Groh
296afbe624
LibVT: Rename escape$H to CUP (Cursor Position)
2020-01-26 15:58:06 +01:00
Linus Groh
5cdfc58242
LibVT: Rename escape$D to CUB (Cursor Backward)
2020-01-26 15:58:06 +01:00
Linus Groh
428a55a196
LibVT: Rename escape$C to CUF (Cursor Forward)
2020-01-26 15:58:06 +01:00
Linus Groh
35310dbd22
LibVT: Rename escape$B to CUD (Cursor Down)
2020-01-26 15:58:06 +01:00
Linus Groh
cc73284c64
LibVT: Rename escape$A to CUU (Cursor Up)
2020-01-26 15:58:06 +01:00
Andreas Kling
5e47508672
LookupServer: Cache DNS answers for TTL seconds
...
We now keep DNS answers around in a cache for TTL seconds after getting
them the first time. The cache is capped at 256 responses for now.
Suggested by @zecke in #10 .
2020-01-26 15:44:51 +01:00
Andreas Kling
90a5907b44
LookupServer: Rename "custom_hosts" => "etc_hosts"
...
This makes it more obvious that these mappings come from /etc/hosts.
2020-01-26 15:44:51 +01:00
Andreas Kling
c26560ec26
LookupServer: Rename setting "DNS/IPAddress" => "DNS/Nameserver"
2020-01-26 15:44:51 +01:00
MWGuy
0c544052a5
Ports+OpenSSL: Fix RAND_poll patch
2020-01-26 15:27:12 +01:00
Andreas Kling
e335d730d6
LookupServer: Use CUdpSocket instead of the POSIX API
...
LibCore's UDP socket is a bit more comfortable to work with. :^)
2020-01-26 14:47:03 +01:00
Andreas Kling
3c129172d4
LibCore: Add UDP socket and server classes
2020-01-26 14:45:07 +01:00
Andreas Kling
2ce9a705e3
IPv4: Mark UDP sockets as connected immediately upon connect()
...
This makes it possible to write() to a blocking UDPSocket. Previously
this was not possible since can_write() depends on is_connected().
2020-01-26 14:43:08 +01:00
Andreas Kling
388d40d755
IPv4: Fix bitrot in IPv4Socket debug logging
2020-01-26 14:42:44 +01:00
Andreas Kling
8e7e502f37
LibCore: CSocket::set_blocking() was backwards
2020-01-26 14:29:33 +01:00
Andreas Kling
537a1d31c5
LookupServer: Add missing copyright headers
2020-01-26 13:53:36 +01:00
Andreas Kling
a9ec2225a5
LookupServer: Retry with 0x20 randomization turned off on EREFUSED
...
Apparently some authoritative servers don't handle 0x20 randomization
well and may send EREFUSED. Retry with randomization turned off then.
Reference: https://github.com/dns-violations/dns-violations/blob/master/2017/DVE-2017-0006.md
More work towards #10 .
2020-01-26 13:49:46 +01:00
Andreas Kling
00be9b33b1
LookupServer: Verify that DNS response questions match the request
...
To protect against DNS spoof attacks, we now check that the questions
in incoming responses match the questions in the request we sent out.
Suggested by @zecke in #10 .
2020-01-26 13:07:43 +01:00
Andreas Kling
b4d55b16b6
LookupServer: Randomize the 0x20 bit in DNS request ASCII characters
...
This adds a bit of extra entropy to DNS requests, making it harder to
spoof a valid response.
Suggested by @zecke in #10 .
2020-01-26 13:07:21 +01:00
Andreas Kling
02be23cf81
LookupServer: Randomize DNS request ID's
...
Suggested by @zecke in #10 .
2020-01-26 12:38:49 +01:00
Andreas Kling
871b6b4e1a
LookupServer: Minor overhaul
...
- Break out request building into a DNSRequest class.
- Break out response parsing into a DNSResponse class.
A DNSRequest contains one or more DNSQuestion objects.
A DNSResponse contains all the DNSQuestions asked, and a DNSAnswer
object for each answer.
2020-01-26 12:37:08 +01:00
Andreas Kling
f24173b0f1
LibC: Only accept the first response from LookupServer in netdb code
...
If a DNS server responds with multiple answers for a question, we will
get a newline-separated sequence of answers from LookupServer.
However, we don't handle this properly yet in LibC, so just split the
response by line and only care about the first answer for now.
2020-01-26 12:23:37 +01:00
Andreas Kling
8fb9dc7425
Ports: Fix zlib build
...
We only support static linking at the moment, and zlib was trying to
build itself as a shared library.
Fixes #1135 .
2020-01-26 10:33:43 +01:00
Andreas Kling
22d563b1aa
IPv4: Don't hold IPv4Socket lock when blocking on byte-buffered receive
2020-01-26 10:26:27 +01:00
Andreas Kling
1d506a935c
Ext2FS: Give names to some KBuffers
...
The more we give names to KBuffers, the easier it gets to understand
what's what in a kernel region dump. :^)
2020-01-26 10:18:18 +01:00
Andreas Kling
b011857e4f
Kernel: Make writev() work again
...
Vector::ensure_capacity() makes sure the underlying vector buffer can
contain all the data, but it doesn't update the Vector::size().
As a result, writev() would simply collect all the buffers to write,
and then do nothing.
2020-01-26 10:10:15 +01:00
Andreas Kling
b93f6b07c2
Kernel: Make sched_setparam() and sched_getparam() operate on threads
...
Instead of operating on "some random thread in PID", these now operate
on the thread with a specific TID. This matches other systems better.
2020-01-26 09:58:58 +01:00
Andreas Kling
67950c80c8
Kernel: Zero-initialize LocalSocket::m_address
...
It was possible to read uninitialized kernel memory via getsockname().
Of course, kmalloc() is a good boy and scrubs new allocations with 0xBB
so all you got was a bunch of 0xBB.
2020-01-26 09:48:53 +01:00
Marios Prokopakis
da296f5865
Ext2FS: allocate_blocks allocates contiguous blocks ( #1095 )
...
This implementation uses the new helper method of Bitmap called
find_longest_range_of_unset_bits. This method looks for the biggest
range of contiguous bits unset in the bitmap and returns the start of
the range back to the caller.
2020-01-26 09:48:24 +01:00
Brian Callahan
d847368c88
Ports: Add grep port
2020-01-26 09:46:41 +01:00
Brian Callahan
78ddf2e048
Ports: Add mandoc port
2020-01-26 09:10:37 +01:00
Brian Callahan
77ed943275
Ports: Add diffutils port
2020-01-26 08:48:19 +01:00
Andreas Kling
8c1f2d7131
LibVT: Rename escape$K and escape$J to EL and ED respectively
...
We should rename all of these functions to match the real VT100 names.
This will make it 100% easier to work on LibVT.
For reference: https://vt100.net/docs/vt100-ug/
2020-01-25 20:54:40 +01:00
Andreas Kling
4ed5c13792
LibVT: Fix off-by-ones in ED (Erase in Display) and EL (Erase in Line)
2020-01-25 20:51:49 +01:00
Andreas Kling
edbe7d3769
Kernel: Unbreak canonical mode TTY erase after LibVT changes
...
Now that LibVT's backspace character (8) is non-destructive, the kernel
line editing code has to take care of erasing manually.
2020-01-25 20:44:33 +01:00
Andreas Kling
a3069b16fd
LibVT: Make backspace (BS) non-destructive
...
I did not realize this was a thing. This fixes an artifact in vttest.
2020-01-25 20:39:23 +01:00
Andreas Kling
dca92af431
LibVT: Support IND and RI (cursor down/up basically)
2020-01-25 20:26:35 +01:00
Andreas Kling
0d191aae13
LibVT: Rename EscapeState::ExpectBracket => GotEscape
...
Seems like there are many escape sequences that don't start with
brackets, so let's call the post-escape state "GotEscape" instead. :^)
2020-01-25 20:02:31 +01:00
Andreas Kling
897ad1b927
LibVT: Support NEL (Next Line)
...
I think this can just behave as if you sent a newline character ('\n').
2020-01-25 20:01:43 +01:00
Andreas Kling
ab77bd4c3a
LibVT: Support <esc>#8 to fill screen with E's
...
This is apparently a "confidence test" supported by VT100.
2020-01-25 19:52:35 +01:00
Andreas Kling
25f04b06ad
LibVT: Don't go into "stomp" state after moving the cursor
...
The curious "stomp" state occurs when you type your way all the way
over to the right side of the terminal buffer, and we "stomp" once on
the very last column, before jumping to the next line.
We should never go into "stomp" state in response to programmatically
setting the cursor position. This fixes a small artifact in vttest.
2020-01-25 19:50:23 +01:00
Andreas Kling
20e41ab381
LibVT: Support HVP (Horizontal and Vertical Position) (final 'f')
2020-01-25 19:49:42 +01:00
Andreas Kling
e6f5ce8285
LibVT: Support the DA (Device Attributes) request (final 'c')
...
This is used by vttest on startup to query the device for identity.
2020-01-25 19:12:08 +01:00
Andreas Kling
f4e7aecec2
Kernel: Preserve CoW bits when splitting VM regions
2020-01-25 17:57:10 +01:00