Otherwise, create_area fails with "Invalid Argument." Should fix the
"empty directory in userlandfs mount" bug that has been appearing
since the cloneable-area fixes.
Change-Id: I26e73539a9f345e76b22a34a68fe4b49c63683c2
Reviewed-on: https://review.haiku-os.org/707
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Previously this protection was possible via the opt-in B_KERNEL_AREA flag,
however, almost nothing used that, so in practice these protections were
rarely enforced.
Userland can still access kernel areas according to the protection flags
(and due to SMAP, these have been refined and reduced as appopriate)
and clone them (according to B_USER_CLONEABLE_AREA flag, which has
been required since August of this year), but they can no longer
resize them (something no in-tree application does on any shared area),
set protections (otherwise they could add B_USER_CLONEABLE_AREA...),
unmap them, or essentially do anything else besides get their
information (and even that we should restrict to uid 0, in the future.)
From my testing, this does not introduce any issues, and no applications
nor drivers should have been relying on the previous behavior (unlike
SMAP or the clone-area changes, which did affect applications.)
* Slightly change the formula for bigger sizes (use real width).
Change-Id: I66204c2727f30e3f139b506174e287811c258fa9
Reviewed-on: https://review.haiku-os.org/704
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
fLocker must be released in IMAPConnectionWorker::_Worker() before WorkerQuit() call.
Change-Id: I1e622a711fa3349986560af1118b158696025844
Reviewed-on: https://review.haiku-os.org/705
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
- if fText is an empty string, we would start searching past its end,
possibly leading to a crash (noticed this in HaikuDepot).
- if fText is NULL, BString would report a size of 0 lines, it makes
more sense to report a size of 1 line.
* First re-fix of what was reverted in 85f8e7001
* haikuporter calls these during bootstrap and needs absolute paths
Change-Id: I40f1b15ffd474d3286356f3151eacd9a4a09add2
The buffers were allocated with B_ANY_KERNEL_ADDRESS and the buffer plus
header block would produce uneven sizes. This lead to some buffers
crossing page boundaries. The call to get_memory_map() is only supplied
with a single entry, which in such a situation may not be enough if the
physical pages are not contiguous. Due to missing result checks this was
not noticed.
Use B_ANY_KERNEL_BLOCK_ADDRESS and align the size of the total buffer
to avoid such page boundary crossing.
Fixes randomly truncated frames in the receive path.
Previously the frame length was set to the allocation size of the buffer
itself, which is constant. Use the length returned on dequeing instead,
which tells how much of the buffer was actually filled.
Fixes overly long frames that lead to various problems along the receive
path.
The size was in fact the count of physical entries that were used. That
number must necessarily be the same as the number given when adding to
the queue, so that number isn't really interesting. Consequently none
of the users of that API made use of it.
Return the used length instead, which is the way virtio signals how much
valid data resides in the dequeued buffer. This is for example important
to know the frame length of incoming packets in virtio_net.
We reuse the incoming request buffer to send our reply. We did however
not trim that buffer to the length we actually filled out, allowing
any extraneous incoming data to remain in that buffer and be sent back.
I forgot that there are special usage texts for the individual
pkgman commands. Make that a bit clearer in the usage text now.
Change-Id: Ia6641b2aa20d03a67d9dedddabf3a1f34d324322
Reviewed-on: https://review.haiku-os.org/702
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
These data files are used in the generation of build targets,
so moving them to src/data alongside the package_infos & etc.
makes more sense.
They don't seem to be activated properly though (I added some tracing
to try and figure out why they aren't used but haven't gotten to the
bottom of that yet.)
This is a *massive* performance improvement; some longer emails that
took 45+ seconds to load before now take < 1 second, at the cost
of a completely rewritten URL detector. This means some URLs that
were detected before (e.g. anything starting with "www", emails
without "mailto:", etc.) are now not detected, though support
for detecting them could be reinstated in the future.
Fixes#4816.
* Use new(std::nothrow) so that NULL check for allocated memory makes sense.
* Other new() without NULL check is replaced with new(std::nothrow).
Change-Id: Ida53be936d14ce63b3bc60442408ec5044df5344
Reviewed-on: https://review.haiku-os.org/699
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Before this patch, the BEOS:type was used in query. But in Haiku
the BEOS:type index is not created by default. So, this feature
dis not work.
Change-Id: Ib57b528eb852d256b7e0b7d203659af01e077801
Reviewed-on: https://review.haiku-os.org/684
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This should fix crashes of mailer_daemon in IMAP workers.
This patch makes IMAPConnection destructor wait for all working threads to finish.
Also, do not call _Connect for QuitCommand (it speedups shutdown procedure).
Change-Id: Idffcc00d3459a96a85a8a073a343bcf4cd4984be
Reviewed-on: https://review.haiku-os.org/686
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Use new(std::nothrow) so that NULL check for allocated memory makes sense.
Change-Id: I6c0e66c63adda430686727a4085132c4e40c7530
Reviewed-on: https://review.haiku-os.org/692
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Use new(std::nothrow) so that NULL check for allocated memory makes sense.
Change-Id: Iab5efa869b83f5a312a1eaf8851a9e99888ff075
Reviewed-on: https://review.haiku-os.org/691
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Use new(std::nothrow) so that NULL check for allocated memory makes sense.
* Other new() without NULL check is replaced with new(std::nothrow).
Change-Id: I23df98e58ea1960463e86a75ff69d67855f59074
Reviewed-on: https://review.haiku-os.org/690
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Use new(std::nothrow) so that NULL check for allocated memory
makes sense.
Change-Id: I690a796ac5a9a7a61440ccccf19f93fc6bf2d328
Reviewed-on: https://review.haiku-os.org/689
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Some of these were correct as they were ... but most weren't.
There are a variety of other correct ones I didn't change over yet
that someone else probably should (GCI task?).
Same issue as the mail_util fix.
Also while I'm here, alter behavior so that the Be-style attribute
gets overwritten with the Haiku-style one, instead of getting left
as is.
Should potentially help with #14674.
This fix garbage attributes on e-mail messages on status changes.
Change-Id: I5293a0e71a1b84c04889fa3375488b0075aad12e
Reviewed-on: https://review.haiku-os.org/682
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This isn't true on x86_64 (so we were displaying the wrong key names there).
The actual names of the keys should probably be fetched from the selected
keyboard.