Show icons for menu items of supported applications in ShowImage
and FileTypes preferences.
Change-Id: I10dbdfef3f7815f7b21d141648ae78dad5fd9993
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9517
Reviewed-by: waddlesplash <[email protected]>
* Allow the client of the Request constructor to specify the uid and
gid to apply to a Request, regardless of the euid and egid that are
in effect for the thread.
* For write and delegation recall requests, apply the IDs that were
captured earlier by the OpenState or Delegation constructor,
respectively.
* This prevents the server from denying requests sent by the WorkQueue
thread based on the uid and gid in the RPC header.
* Fixes#19657.
The Linux server I use for testing never seems to grant the client a
delegation, so I wasn't able to test whether the server actually cares
about the uid and gid when a delegation is recalled.
Change-Id: I6e3b31cc7767d80fa06c33c9b3eee6078d98fe53
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9501
Reviewed-by: waddlesplash <[email protected]>
Add switch to Desktop and Home shortcuts. Fixes#15148
Show Volumes or Disks on Desktop in file panel. Fixes#19547
Rename Add/RemoveRootPoses() to Add/RemoveVolumePoses().
Use default Tracker values when adapting to setting changes.
Bring ShowVolumes() into BPoseView and apply the same logic
used by file panel to DesktopPoseView to switch between Disks
and volumes on Desktop.
Add Disks or volumes to file panel in BPoseView instead.
When you set Show Disks or Show Volumes, set the other as well,
they are opposites of each other.
Remove unnecessary params related to adding/removing volumes.
Rename ShowVolumes() to ToggleDisksVolumes() and move to BPoseView.
Create IsVolumesRoot() to identify Desktop in a file panel.
Change-Id: Id250aa6cf7386c7988017a9edbdb16ec9cea00ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9503
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Add the following:
- CS and SS registers
- For 32bit: DS, ES, FS, GS registers (on 64 bit these are not part of
the iframe structure)
- CR2 register (fault address)
- Hardware interrupt number
- Hardware error code
The hardware error code, interrupt number and fault address are not
modifiable by the signal handlers. The other registers can be modified.
This is used for example in dosemu to intercept errors from JIT generated
code and resume execution. Wine can also make use of it.
In order to not change the size of struct mcontext, these are inserted
in a region of the FXSAVE structure that is available for the OS to
store some data (as documented by Intel) and that we didn't use before.
Fixes#7867
Change-Id: Ia3c27a2c728e32995196c646c1d78adf40e793ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9456
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
* If a ".." entry is present in fNameCache, don't look for a matching
entry in the DirectoryCacheSnapshot.
* Fixes an assert failure reported incidentally in the #19656 ticket,
but is not related to the original reported bug.
This is a correction to 258fce50e0.
The comparison added in that patch is between 2 different types of
directory entry caches that exist in the DirectoryCache class. One of
them caches "..", and the other one doesn't.
Change-Id: I56335271436be18e363f6b164e1fc2de24193bfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9498
Reviewed-by: waddlesplash <[email protected]>
This method is used in close_fd_index(), the normal path for close()
operations to go through. So, if a close() had been called on a
disconnected FD, before this commit we would just leak it.
This change means that close_fd() and put_fd() are called on
disconnected FDs being close()d. That's the same set of operations
that deleting an I/O context does, though, so this should
hopefully not cause any problems.
If we change our current directory, it will be retained as a reference
down inside the VFS, preventing filesystems from being unmounted,
among other things.
Fixes#19684.
It seems this is still too early and not enough fields in the VMArea
have been initialized. Instead just check the protection manually.
Also fix some more locking behavior in the error path.
Just the library name in parentheses doesn't look so great in the book
index (in particular for libroot in the "special topics" list). So include
a short description there.
Change-Id: I99ea8f85b042c5606b078aca906a0717aff6d46f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9452
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
The RTLD_GROUP flag to dlopen comes from Solaris. It makes the symbol
resolution for dlopen not use the global symbols from the current team
(anything that's already loaded). The loaded object must be explicitly
linked against any symbol it needs to use (or it can use dlsym to search
symbols in the global scope explicitly).
This is also how symbol resolution worked in BeOS, meaning we already
have the code to do this, and just need to enable it.
This can be used in dosemu, where DOS-like executable are linked against
their own C library and should not use symbols from libroot.
Fixes#19674.
Change-Id: I8d127c7812a31e231edb1e44edf70b868c2670e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9450
Reviewed-by: waddlesplash <[email protected]>
* When resetting the file cache, use file_cache_disable() to remove
all pages, instead of calling file_cache_delete().
* Possible fix for #19656.
file_cache_delete doesn't actually delete the VMCache object, so when
file_cache_create() is called the returned file_cache_ref just points
to the same VMCache as before.
Change-Id: Ifba42b51c52f11980fd97212d0c3bdfdc1e55085
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9448
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
* Split the "is only cache user" logic from cut_area into
a helper routine.
* If we can't modify a cache in cut_area, then we can't modify
its commitment either, so add that to the check.
* If we didn't split the areas, then modifying the commitments
doesn't make sense and will cause problems, so move that logic
into the "modify cache" branch.
* Use the new helper routine in set_memory_protection rather than
checking only cache->temporary.
Combined with the previous commit, seems to fix#19624.
Like check_access_permissions() but for write_stat() hook instead
of access().
Basic logic copied from BFS, but with the UID/GID logic rewritten
to better conform to behavior on other OSes: notably, we allow
chown() requests that keep the UID the same to go through, same
as Linux seems to, which should fix#19666. We now also validate
that the GID is one of the current team's groups.
* When the DirectoryCache is updated, compare the new contents with
the old. If any of the old entries are obsolete, treat the
respective node as stale.
* Create FileSystem::TrashStaleNode() to avoid duplicating code.
* Possible fix for #19656.
This helps the client keep current with changes made to server files
by other users.
While the comparison will be slow for a large directory, it won't be
executed unless another user has changed the contents of a directory
since the last time the Haiku client read the directory.
Change-Id: I03e65aaaad5027c66b10265f2b4a21ed9d2b6744
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9445
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
We need to change all groups, not just the primary group.
Otherwise, other groups will be left intact, which may
include groups the new user doesn't have permissions for.
This way, we can't inadvertently end up in a state where the
window is deleted but some things are still attached to it.
Fixes#19662.
Change-Id: I3ce7b5ccffc8cf12670209f3023613b32e31c41c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9437
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: John Scipione <[email protected]>
That is, just add the supertype if it does not exist. Leave getting it
to the callers that need it.
Fixes: #19653
Change-Id: I79d804161d28684e16a0d84ec3a2fb6788c0b506
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9436
Reviewed-by: waddlesplash <[email protected]>
x86_64 already does this and it seems to work fine. Since stack areas
grow downwards and should always have a guard page, overruns shouldn't
be too much of a concern (for that matter, randomization still makes
a difference here also, it seems.)
This allows us to regain another ~256 MB or so of contiguous address
space (areas smaller than that could still be inserted in the 0x6.. to
0x7.. block, but if you had 10MB of free address space below 0x6..,
and 246MB above it, you couldn't allocate a 256MB block.)
Part of #19592.
We ideally want to avoid further fragmentation and just insert in the
smallest possible slot in that case.
Part of #19592. With DISABLE_ASLR=1, seems to save about 120 MB or so
of address space, which is a lot on 32-bit.
This doesn't matter so much because the hint's used for
an AVL tree lookup both for next and previous, but it
probably does at least a bit because the new area's size
is used in the tree lookups.
The kernel will ignore the reservations if there's not enough space
left in the address space anyway.
It seems using larger reservations prevents address space fragmentation,
and so this by itself may be enough to fix#19592.