Certain XkbOptions in X11 would change keysyms for modifier keys
between the key press and key release.
For example, under the XkbOptions "grp:shifts_toggle", though shift
keys remain Shift_L/R when pressed, they become ISO_Group_Next/Prev
when released.
This behavior makes devdraw unable to detect the release event
correctly and as a result mouse button 1 click always interpreted
as button 3 event after a shift key is used.
When the 9P connection is closed, reads on the connection will keep
returning 0. So, fossil ends up looping forever, trying to read a 9P
message, consuming 100% CPU. The fix interprets 0 bytes read as EOF.
Reproduce by killing the 9pserve process serving the fossil service, or
by listening on tcp and using 9p(1).
For fonts with subfiles that go beyond the xffff range, the font file size
calculation is incorrect, since lines beyond that range have additional
characters. This patch pads all of the ranges and subfont names with
leading zeros in order to keep them all lines the same length and fixes the
font file length calculation.
If there is any x86 binary in the chain of parent processes from
the current one, then uname -m prints x86_64 and clang
defaults to building x86_64 binaries.
Detect arm64 using the kernel version and force building
an arm64 toolchain instead of perpetuating x86.
This is particularly important when the user shell is rc,
which has been built for x86, because then rebuilding
under rc continues to use x86.
It's sometimes useful to know whether there's been editing activity
in a window. This PR adds that information to the ctl file.
Change-Id: I21a342ac636dd5c7701b3ed560e3526867329c2c
For cross-compiling plan9 from Unix, provide a way
to force `mk` to use `rc` instead of `sh` without
setting `MKSHELL` in individual `mkfile`s.
If the environment variable `FORCERCFORMK` is set,
`mk` will default to using `rc`, not `sh`.
Signed-off-by: Dan Cross <cross@gajendra.net>
commit 385a6d5877 removed src/lib9p/_post.c
from the code base, but overlooked removing a reference to the
_post.o object file from the src/lib9p/mkfile.
This results in lib9p failing to compile:
* Running on Darwin...
* Compiler version:
Apple clang version 12.0.5 (clang-1205.0.22.11)
* Building mk...
* Building everything (be patient)...
>>> mk: don't know how to make '/Users/sasha/plan9port_fork/lib/lib9p.a(_post.o)' in /Users/sasha/plan9port_fork/src/lib9p
mk: for i in ... : exit status=exit(1)
Remove _post.o from the list of dependent object files from
src/lib9p/mkfile to have lib9p compile.
Fixes: 385a6d5877 ("lib9p: Remove postmountsrv (#505)")
Without this fix, fspread is trusting the server to return as much
data as requested, or less. If a server responds with more data
though, fspread writes beyond the bounds of the buffer to fill, which
is passed in by the caller. It depends on the caller of fspread()
where that buffer is, so there are various possible attack vectors.
In the Plan9 kernel, I found this implemented in devmnt.c, where
overly large responses are truncated to the size requested before
copying, so I assume that this strategy works here too.
This also affects fsread() and fsreadn(), which are based on
fspread().
On March 23, 2021, Nokia transferred the copyrights in the Plan 9 software
to the Plan 9 Foundation, which relicensed them under the MIT license.
This commit updates the Plan 9 from User Space license to reflect the
new base license. The vast majority of the contributions beyond the
base Plan 9 set were by me, many of them explicitly under an MIT license.
Those are all under the new MIT license now as well.
The port of mk to Unix was taken from Inferno via Vita Nuova and had
been made available under GPL, but Vita Nuova has relicensed Inferno
under the MIT license as well, to match the new Plan 9 license.
Michael Teichgraber contributed src/lib9/zoneinfo.c explicitly under
the Lucent Public License but has agreed to change the contribution
to the MIT license now used in the rest of the distribution.
There remain a few exceptions, most notably fonts.
See the root LICENSE file for full details.
The only mention of the Lucent Public License in the whole tree now
is in the LICENSE file, explaining the history.
MacFUSE 4 removes support for passing device fd to the mount command. Adds
support for the receiving the fd over a socket instead, and updates command paths
and filesystem name.
Use bio(3) to read at most one line of input per iteration, even
if there is more than one line available in the input buffer. This
makes it easier to interact with line-oriented ctl files like that of
factotum(4) from shell scripts, without the need to control when
and how much data is flushed to a pipe.
This fixes the 'run stats from rc; exit rc; stats dies' problem.
It's unclear whether this is the right fix or whether rc should
be starting all its interactive commands in their own process
groups. But at least it does fix stats dying.
Usually r->nused < r->nalloc and the read is in bounds.
But it could in theory be right on the line and reading
past the end of the allocation.
Make it safe but preserve as much of the old semantics
as possible. This use of rterm appears to be only for
optimization purposes so the result does not matter
for correctness.