]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
2 years agobcm64: make the kernel use virtual timer counter register for cycles()
cinap_lenrek [Sun, 25 Jul 2021 14:12:17 +0000 (14:12 +0000)]
bcm64: make the kernel use virtual timer counter register for cycles()

2 years agokernel: page counts a ulong, not usize
cinap_lenrek [Sun, 25 Jul 2021 14:03:12 +0000 (14:03 +0000)]
kernel: page counts a ulong, not usize

2 years agoarm64: use generic timer virtual counter for cycles()
cinap_lenrek [Fri, 23 Jul 2021 15:10:01 +0000 (15:10 +0000)]
arm64: use generic timer virtual counter for cycles()

We used to use performance cycle counter for cycles(),
but it is kind of useless in userspace as each core
has its own counter and hence not comparable between
cores. Also, the cycle counter stops counting when
the cores are idle.

Most callers expect cycles() to return a high resolution
timestamp instead, so do the best we can do here
and enable the userspace generic timer virtual counter.

2 years ago/sys/src/9/mkfile: add bcm64 (thanks stuart morrow)
cinap_lenrek [Thu, 22 Jul 2021 18:30:38 +0000 (18:30 +0000)]
/sys/src/9/mkfile: add bcm64 (thanks stuart morrow)

2 years agogzip, bzip2: add -n flag to suppress modification timestamp
cinap_lenrek [Wed, 21 Jul 2021 17:36:02 +0000 (17:36 +0000)]
gzip, bzip2: add -n flag to suppress modification timestamp

2 years agossh: fix typo (thanks izaki)
Jacob Moody [Wed, 21 Jul 2021 16:16:29 +0000 (16:16 +0000)]
ssh: fix typo (thanks izaki)

2 years agobrk(2): .... we define lowest addres not used by the program above, so use that instead
cinap_lenrek [Tue, 20 Jul 2021 21:49:30 +0000 (21:49 +0000)]
brk(2): .... we define lowest addres not used by the program above, so use that instead

2 years agobrk(2): sbrk(0) returns end address, not the base
cinap_lenrek [Tue, 20 Jul 2021 21:44:34 +0000 (21:44 +0000)]
brk(2): sbrk(0) returns end address, not the base

sbrk(0) returns the current end address of the BSS segment,
not the base. This might have been confused with the behaviour
of segbrk(), which when given a zero address returns the base.

2 years agomerge
cinap_lenrek [Sun, 18 Jul 2021 20:21:06 +0000 (20:21 +0000)]
merge

2 years agoscreenlock: don't poll to top window (thanks Stuart Morrow)
cinap_lenrek [Sun, 18 Jul 2021 19:54:58 +0000 (19:54 +0000)]
screenlock: don't poll to top window (thanks Stuart Morrow)

> String becomes stringbg so we have guaranteed max contrast in case the
> user changes the picture. (If you don't change the picture, it's
> white-on-black-on-black (sic) and you would never notice the change.)

2 years agoauth/rsa2jwk: add code to produce jwk rsa keys
Ori Bernstein [Sun, 18 Jul 2021 15:30:35 +0000 (15:30 +0000)]
auth/rsa2jwk: add code to produce jwk rsa keys

This is useful for acmed, and possibly other web
technologies.

2 years agogit/fetch: fix overly eager 's/pack/idx/g' in refactor
Ori Bernstein [Sun, 18 Jul 2021 14:59:51 +0000 (14:59 +0000)]
git/fetch: fix overly eager 's/pack/idx/g' in refactor

This would break pulling. We would try to index into
a place that didn't exist.

2 years agoaux/cddb: Provide -e option to print commands to rip audio with tags.
Jacob Moody [Sat, 17 Jul 2021 18:56:11 +0000 (18:56 +0000)]
aux/cddb: Provide -e option to print commands to rip audio with tags.

Also parse title/track artist and year.

2 years agogit/fetch: ensure we clean packfiles on failure
Ori Bernstein [Sat, 17 Jul 2021 00:10:44 +0000 (00:10 +0000)]
git/fetch: ensure we clean packfiles on failure

When pulling into a git repository that is group
writable as a non-owner, the pack file is left
in place because we do not have permission to
remove it.

We also leave it behind if we bail out early due
to an error, or due to only listing the changes.

This pushes down the creation of the file, and
cleans it up on error.

thanks to Anthony Martin for spotting the bug.
git/fetch: ensure we clean packfiles on failure

When pulling into a git repository that is group
writable as a non-owner, the pack file is left
in place because we do not have permission to
remove it.

We also leave it behind if we bail out early due
to an error, or due to only listing the changes.

This pushes down the creation of the file, and
cleans it up on error.

Also, while we're here, clean up index caching,
and ensure we close the fd in all cases.

thanks to Anthony Martin for spotting the bug.

2 years agokbdfs: allow to escape ctlr-alt-del with shift for vmx and vnc.
cinap_lenrek [Fri, 16 Jul 2021 23:36:40 +0000 (23:36 +0000)]
kbdfs: allow to escape ctlr-alt-del with shift for vmx and vnc.

2 years agowebfs(4): fix typos
kvik [Thu, 15 Jul 2021 18:53:42 +0000 (18:53 +0000)]
webfs(4): fix typos

2 years agolegal: mercurial -> git
cinap_lenrek [Thu, 15 Jul 2021 16:46:16 +0000 (16:46 +0000)]
legal: mercurial -> git

2 years agolegal: remove references to python and mercurial
cinap_lenrek [Thu, 15 Jul 2021 16:43:12 +0000 (16:43 +0000)]
legal: remove references to python and mercurial

THIS IS AN EX PYTHON!!

2 years agoarchacpi: make *acpi=1 the default
cinap_lenrek [Thu, 15 Jul 2021 16:07:54 +0000 (16:07 +0000)]
archacpi: make *acpi=1 the default

2 years agoether82563: add pci id for i219-LM from ThinkPad P17 Gen1 Professional Mobile Worksta...
cinap_lenrek [Thu, 15 Jul 2021 07:50:56 +0000 (07:50 +0000)]
ether82563: add pci id for i219-LM from ThinkPad P17 Gen1 Professional Mobile Workstation (thanks tschak909)

2 years agographics(2): fix typo
kvik [Wed, 14 Jul 2021 20:38:12 +0000 (20:38 +0000)]
graphics(2): fix typo

2 years agopc, pc64: increase confmem slots to 64
cinap_lenrek [Wed, 14 Jul 2021 17:06:28 +0000 (17:06 +0000)]
pc, pc64: increase confmem slots to 64

Lenovo Thinkpad P17 Gen1 Professional Mobile Workstation
comes up with around 36 separate memory ranges.

ridiculous!

2 years agolibaml: fix gc bug, need to amltake()/amldrop() temporary buffer
cinap_lenrek [Wed, 14 Jul 2021 17:04:40 +0000 (17:04 +0000)]
libaml: fix gc bug, need to amltake()/amldrop() temporary buffer

we have to protect the temporary buffer allocated by rwfield()
as rwreg() calls amlmapio() which might cause further aml code
execution causing gc() which frees it under us (as it is not
referenced from the interpreter state).

this fixes a panic on boot of a

Lenovo Thinkpad P17 Gen1 Professional Mobile Workstation

2 years agofs(4): describe the noauth toggle better (thanks izaki)
Ori Bernstein [Mon, 12 Jul 2021 23:47:06 +0000 (23:47 +0000)]
fs(4): describe the noauth toggle better (thanks izaki)

2 years agostrcat(2): 0 → nil in manpage in refrence to pointers
Jacob Moody [Mon, 12 Jul 2021 21:42:39 +0000 (21:42 +0000)]
strcat(2): 0 → nil in manpage in refrence to pointers

2 years agovirtio: set FeaturesOk flag after feature negotiation, and enable queues before Drive...
cinap_lenrek [Sun, 11 Jul 2021 21:49:15 +0000 (21:49 +0000)]
virtio: set FeaturesOk flag after feature negotiation, and enable queues before DriverOk flag

2 years agovmx: reset virtio queue state on device reset
cinap_lenrek [Sun, 11 Jul 2021 12:12:51 +0000 (12:12 +0000)]
vmx: reset virtio queue state on device reset

when a virtio device gets reset, we have to also reset the device
shadow indices: availableidx and usedidx. for extra safetly,
we also reset the buffer descriptor table addresses.

this is accomplished by adding a vioqreset(VIOQueue*) function
that brings the queue to its initial reset state.

this fixes non functional ethernet after reboot(8).

2 years agovirtio: add non-legacy virtio 1.0 drivers for disk and ethernet
cinap_lenrek [Sun, 11 Jul 2021 11:24:13 +0000 (11:24 +0000)]
virtio: add non-legacy virtio 1.0 drivers for disk and ethernet

The new interface uses pci capability structures to locate the
registers in a rather fine granular way making it more complicated
as they can be located anywhere in any pci bar at any offset.

As far as i can see, qemu (6.0.50) never uses i/o bars in
non-legacy mode, so only mmio is implemented for now.

The previous virtio drivers implemented the legacy interface only
which uses i/o ports for all register accesses. This is still
the preferred method (and also qemu default) as it is easier to
emulate and most likely faster.

However, some vps providers like vultr force the legacy interface
to disabled with qemu -device option "disable-legacy=on" resulting
on a system without a disk and ethernet.

2 years agokernel: export pcienumcaps() for custom capability enumeration in drivers (virtio)
cinap_lenrek [Sat, 10 Jul 2021 18:34:22 +0000 (18:34 +0000)]
kernel: export pcienumcaps() for custom capability enumeration in drivers (virtio)

This used to be a internal function, but virtio
uses multiple structures with the same cap type
to indicate the location of various register
blocks in the pci bars so export it.

2 years agoaux/cddb: freedb.org is dead, use gnudb.org
Jacob Moody [Sat, 10 Jul 2021 15:57:46 +0000 (15:57 +0000)]
aux/cddb: freedb.org is dead, use gnudb.org

2 years agomouse(3): mousein is NOT exclusive, see 30907f1d00a7646ccbb420a18f60ccb0bf36e740
Sigrid Solveig Haflínudóttir [Fri, 9 Jul 2021 14:40:23 +0000 (14:40 +0000)]
mouse(3): mousein is NOT exclusive, see 30907f1d00a7646ccbb420a18f60ccb0bf36e740

2 years agorc: add subshell-function syntax
Ori Bernstein [Thu, 8 Jul 2021 21:35:34 +0000 (21:35 +0000)]
rc: add subshell-function syntax

fn foo @{bar} is now equivalent to
fn foo {@{bar}}. As a side effect,
this disallows creating functions
named after keywords without first
quoting them.

2 years agolibsec: take just the CN part of Distinguished Name in subjectAltName
cinap_lenrek [Thu, 8 Jul 2021 20:20:09 +0000 (20:20 +0000)]
libsec: take just the CN part of Distinguished Name in subjectAltName

2 years agofortunes: unremove
Ori Bernstein [Thu, 8 Jul 2021 15:47:49 +0000 (15:47 +0000)]
fortunes: unremove

2 years agofortunes: revision: allow pseudo options after --end-of-options
Ori Bernstein [Thu, 8 Jul 2021 15:21:59 +0000 (15:21 +0000)]
fortunes: revision: allow pseudo options after --end-of-options

2 years agogit: create .git/objects/ on git/init
kvik [Tue, 6 Jul 2021 16:21:18 +0000 (16:21 +0000)]
git: create .git/objects/ on git/init

2 years agovmx: emulate ps/2 intellimouse scrolling
Sigrid Solveig Haflínudóttir [Tue, 6 Jul 2021 15:44:16 +0000 (15:44 +0000)]
vmx: emulate ps/2 intellimouse scrolling

2 years agorsa(8): document auth/x5092pub, fix usage lines
cinap_lenrek [Sun, 4 Jul 2021 22:38:22 +0000 (22:38 +0000)]
rsa(8): document auth/x5092pub, fix usage lines

2 years agolibsec: do proper type checking, fix wrong deduplication check
cinap_lenrek [Sun, 4 Jul 2021 22:28:16 +0000 (22:28 +0000)]
libsec: do proper type checking, fix wrong deduplication check

2 years agolibsec: add X509reqtoRSApub() function and return subject alt names in X509to*pub...
cinap_lenrek [Sun, 4 Jul 2021 22:00:24 +0000 (22:00 +0000)]
libsec: add X509reqtoRSApub() function and return subject alt names in X509to*pub() name buffer

We need a way to parse a rsa certificate request and return the public
key and subject names. The new function X509reqtoRSApub() works the
same way as X509toRSApub() but on a certificate request.

We also need to support certificates that are valid for multiple domain
names (as tlshand does not support certificate selection). For this
reason, a comma separated list is returned as the certificate subject,
making it symmetric to X509rsareq() handling.

A little helper is provided with this change (auth/x5092pub) that takes
a certificate (or a certificate request when -r flag is provided) and
outputs the RSA public key in plan 9 format appended with the subject
attribute.

2 years agogit/export: make output pipable to /bin/mail
Ori Bernstein [Sun, 4 Jul 2021 20:18:37 +0000 (20:18 +0000)]
git/export: make output pipable to /bin/mail

git/export *almost* produces output that can be
emailed with upas using

git/export $commit | mail maintainer@site.com

but, the

From: commit-id date

line that git generates trips it up. Luckily,
'git am' doesn't seem to care much if that line
is missing, so we can simply omit it with no issue.

2 years agolibc: add encode(2) variants for custom alphabets
Ori Bernstein [Sat, 3 Jul 2021 20:03:17 +0000 (20:03 +0000)]
libc: add encode(2) variants for custom alphabets

There are a number of alphabets in common use for base32
and base64 encoding, such as url-safe encodings.

This adds support for passing a function to encode into
arbitary alphabets.

2 years agodevmouse: default to no blanking instead of 30 minute blank timeout
cinap_lenrek [Thu, 1 Jul 2021 23:11:11 +0000 (23:11 +0000)]
devmouse: default to no blanking instead of 30 minute blank timeout

2 years agoupas/Mail: avoid showing empty To: and CC: lines in compose windows
Alex Musolino [Wed, 30 Jun 2021 12:23:45 +0000 (12:23 +0000)]
upas/Mail: avoid showing empty To: and CC: lines in compose windows

2 years agoupas/Mail: fix CC addresses in "Reply All" compose windows
Alex Musolino [Wed, 30 Jun 2021 12:22:28 +0000 (12:22 +0000)]
upas/Mail: fix CC addresses in "Reply All" compose windows

2 years agogit/revert: revert
Ori Bernstein [Tue, 29 Jun 2021 20:03:26 +0000 (20:03 +0000)]
git/revert: revert

the old implementation was correct; we want to
mark it dirty and let walk sort it out.

2 years agogit/revert: fix previous commit (helps if you save the file, thanks qwx)
Ori Bernstein [Mon, 28 Jun 2021 23:40:40 +0000 (23:40 +0000)]
git/revert: fix previous commit (helps if you save the file, thanks qwx)
git/revert: fix previous commit (helps if you save the file, thanks qwx)

2 years agogit/branch: mark files we couldn't update as dirty
Ori Bernstein [Mon, 28 Jun 2021 18:28:08 +0000 (18:28 +0000)]
git/branch: mark files we couldn't update as dirty

2 years agomanual: don't match nonexistent file while preprocessing
Anthony Martin [Sun, 27 Jun 2021 00:13:58 +0000 (00:13 +0000)]
manual: don't match nonexistent file while preprocessing

Authsrv(6) used to be called auth(6) before
the fourth edition and was preprocessed by
eqn(6) before the third edition. The mkfile
was never updated to reflect the changes.

All other files are accounted for:

% cd /sys/man
% for(i in TS EQ PS G1) echo $i `{grep -l '^\.'$i ?/[0-9a-z]*}
TS 1/tbl
EQ 1/eqn 3/usb
PS 1/pic
G1 1/grap
%

2 years agopic(1): restore example section
Anthony Martin [Sun, 27 Jun 2021 00:11:17 +0000 (00:11 +0000)]
pic(1): restore example section

It was erroneously elided when removing
the tpic command in commit 891a8c4f2.

2 years agosegment(3): restore missing phrase
Anthony Martin [Sun, 27 Jun 2021 00:18:49 +0000 (00:18 +0000)]
segment(3): restore missing phrase

It was accidentally removed when documenting
the sticky segment type in commit 99ed9623b.

2 years agovt: allow scrolling with the mouse.
Ori Bernstein [Sat, 26 Jun 2021 17:39:13 +0000 (17:39 +0000)]
vt: allow scrolling with the mouse.

2 years agovt, ssh: don't send interrupts on window resize
Ori Bernstein [Sat, 26 Jun 2021 17:29:27 +0000 (17:29 +0000)]
vt, ssh: don't send interrupts on window resize

When resizing windows, vt would signal ssh by updating
the window size and sending an interrupt. Ssh reacted
by forwarding both the winch and an interrupt.

This change adds a WINCH generation counter so that
ssh can differentiate between resizes and interrupts.
If an interrupt comes in, and the WINCH generation
changes, then the interrupt is taken as signalling a
WINCH.

2 years agokencc: revert back to "set but not used"
cinap_lenrek [Sat, 26 Jun 2021 13:16:36 +0000 (13:16 +0000)]
kencc: revert back to "set but not used"

The change to "assignment not used" breaks symmetry with
"used and not set" and removes the reference to the
specific warning mentioned in /sys/doc/comp.ms.

Also, the patch was half-assed as that it left some typos
in like "used an not set", which this change also fixed.

2 years agorc: skip arguments to Xsrcline, Xsrcfile in codefree
Ori Bernstein [Fri, 25 Jun 2021 23:10:07 +0000 (23:10 +0000)]
rc: skip arguments to Xsrcline, Xsrcfile in codefree

We weren't correctly skipping the location operators
in codefree. This would mostly be work, but sometimes
you'd get unlucky and have one of the argmuents mismatch,
and that would lead to an invalid free.

This correctly skips the args in codefree.

2 years agocc: create .$O files with DMTMP
Jacob Moody [Thu, 24 Jun 2021 13:53:37 +0000 (13:53 +0000)]
cc: create .$O files with DMTMP

2 years agotmdate(2): "ttt" is a valid format too, mention it
Sigrid Solveig Haflínudóttir [Wed, 23 Jun 2021 08:07:16 +0000 (08:07 +0000)]
tmdate(2): "ttt" is a valid format too, mention it

2 years agogit/fs: use a better heuristic for permissions.
Ori Bernstein [Tue, 22 Jun 2021 23:55:54 +0000 (23:55 +0000)]
git/fs: use a better heuristic for permissions.

Since we now store /dist/plan9front in git, the
initial assumption that the owner of the repo
is the person touching it is not always true.

This change gives us a better heuristic for the
file permissions we should have in the files we
copy around, basing it off of the permissions of
the .git directory.

2 years agorc: correct line numbers
Ori Bernstein [Tue, 22 Jun 2021 23:40:11 +0000 (23:40 +0000)]
rc: correct line numbers

When loading a file using ".", we could
end up with our line numbers thrown off
due to the mutation of lexline. Putting
lexline into the runq beside the file
that we're reading from causes it to get
pushed and popped correctly, so that we
no longer lose track of our location.

2 years agogit(1): we have rebase
Ori Bernstein [Mon, 21 Jun 2021 15:38:11 +0000 (15:38 +0000)]
git(1): we have rebase

2 years agoventi: make error messages consistent, remove duplicate messages.
Ori Bernstein [Mon, 21 Jun 2021 12:29:52 +0000 (12:29 +0000)]
venti: make error messages consistent, remove duplicate messages.

removes duplicate messaes about restrictions, and duplicate
checks, makes the error match the rest of the errors.

2 years ago/sys/man/mkfile: drop reference to non-existent realtime(3)
Alex Musolino [Mon, 21 Jun 2021 10:27:09 +0000 (10:27 +0000)]
/sys/man/mkfile: drop reference to non-existent realtime(3)

2 years agosched(9): replace '–' with '-' in NAME section
Alex Musolino [Mon, 21 Jun 2021 10:26:15 +0000 (10:26 +0000)]
sched(9): replace '–' with '-' in NAME section

This was causing the ptx utility in /sys/lib/man/permind
to barf.  As such, the PDF book of all manual sections
could not be built.

2 years ago/sys/man/mkfile: run eqn(1) for usb(3) section of book
Alex Musolino [Mon, 21 Jun 2021 10:22:49 +0000 (10:22 +0000)]
/sys/man/mkfile: run eqn(1) for usb(3) section of book

2 years agoventi: warn when opening /dev/swap fails
Noam Preil [Mon, 21 Jun 2021 03:56:14 +0000 (03:56 +0000)]
venti: warn when opening /dev/swap fails

2 years agoventi: fix detection of available RAM (fixes -m)
Noam Preil [Mon, 21 Jun 2021 03:52:09 +0000 (03:52 +0000)]
venti: fix detection of available RAM (fixes -m)

2 years agoventi: inform user when reducing memory consumption
Noam Preil [Mon, 21 Jun 2021 03:49:42 +0000 (03:49 +0000)]
venti: inform user when reducing memory consumption

2 years ago/sys/src: add arm64 to installall list
Noam Preil [Mon, 21 Jun 2021 03:34:47 +0000 (03:34 +0000)]
/sys/src: add arm64 to installall list

2 years agokencc: clarify warning for unused assignments
Noam Preil [Mon, 21 Jun 2021 03:29:58 +0000 (03:29 +0000)]
kencc: clarify warning for unused assignments

2 years agogit/revert: handle absolute paths gracefully (thanks deuteron)
Ori Bernstein [Mon, 21 Jun 2021 02:12:58 +0000 (02:12 +0000)]
git/revert: handle absolute paths gracefully (thanks deuteron)

when reverting files, absolute paths would get concatenated with
$gitrel; use `cleanname -d` to fix this.

2 years agolibsec: restore old behaviour for generating self signed cert
cinap_lenrek [Mon, 21 Jun 2021 00:38:06 +0000 (00:38 +0000)]
libsec: restore old behaviour for generating self signed cert

2 years agolibsec: emulate openssl asn1 when generating x509 csr
cinap_lenrek [Sun, 20 Jun 2021 23:33:13 +0000 (23:33 +0000)]
libsec: emulate openssl asn1 when generating x509 csr

when trying to request certificates from letsencrypt,
their test api would reject our csr because of
"tuncated sequence" unless we force subectAltName
by passing multiple domains (as comma separated list).

apparently, we need to provide the context specific tag
"cont [ 0 ]" for the extensions even when we do have
any extensions for the csr (triggered when we need to
have subjectAltNames).

for this, we change mkcont() to take a Elist* instead,
which then can be nil when not used. also put the tag
number argument first, which makes it easier to read.

2 years agogit/log: handle absolute paths gracefully.
Ori Bernstein [Sun, 20 Jun 2021 17:07:33 +0000 (17:07 +0000)]
git/log: handle absolute paths gracefully.

strip off the repo prefix if the path given
is absolute, and then look up as though it
was rooted in the repo.

2 years agothreadimpl.h: remove Printsize as well (unused)
Sigrid Solveig Haflínudóttir [Sun, 20 Jun 2021 14:59:10 +0000 (14:59 +0000)]
threadimpl.h: remove Printsize as well (unused)

2 years agothread.h: threadnonotes does not exist
Sigrid Solveig Haflínudóttir [Sun, 20 Jun 2021 14:55:13 +0000 (14:55 +0000)]
thread.h: threadnonotes does not exist

2 years agothreadimpl: remove unused fields from Proc struct
Sigrid Solveig Haflínudóttir [Sun, 20 Jun 2021 14:54:20 +0000 (14:54 +0000)]
threadimpl: remove unused fields from Proc struct

2 years agolibsec: move zero check to curve25519_dh_finish()
cinap_lenrek [Sun, 20 Jun 2021 14:41:26 +0000 (14:41 +0000)]
libsec: move zero check to curve25519_dh_finish()

As checking for all zero has to be done in a timing-safe
way to avoid a side channel, it is best todo this here
instead of letting the caller deal with it.

This adds a return type of int to curve25519_dh_finish()
where returning 0 means we got a all zero shared key.

RFC7748 states:

The check for the all-zero value results from the fact
that the X25519 function produces that value if it
operates on an input corresponding to a point with small
order, where the order divides the cofactor of the curve.

2 years agodate(1): list all option characters in SYNOPSIS
Alex Musolino [Sun, 20 Jun 2021 02:05:00 +0000 (02:05 +0000)]
date(1): list all option characters in SYNOPSIS

Now that -f is specifically mentioned (as it takes
an argument), might as well list the others in full.

2 years agolibsec: various changes to tls
kemal [Fri, 18 Jun 2021 19:12:44 +0000 (19:12 +0000)]
libsec: various changes to tls

1. add the curve x25519 to tls, both client and server.
it's more faster, immune to timing attacks by design,
does not require verifying if the public key is valid,
etc etc. server-side has to check if the client supports
the curve, so a new function has been introduced to parse
the client's extensions.

2. reject weak dhe primes that can be easily cracked with
the number field sieve algorithm. this avoids attacks like
logjam.

3. stop putting unix time to the first 4 bytes of client/
server random. it can allow fingerprinting, tls 1.3 doesn't
recommend it any more and there was a draft to deprecate
this behaviour earlier.[1]

4. simply prf code, remove useless cipher enums.

[1] https://datatracker.ietf.org/doc/html/draft-mathewson-no-gmtunixtime-00

2 years agonusbrc(8): fix typo (thanks igor@9lab.org)
kvik [Sat, 19 Jun 2021 12:03:53 +0000 (12:03 +0000)]
nusbrc(8): fix typo (thanks igor@9lab.org)

2 years agocal: fix days of week alignment for year view (thanks igor@9lab.org)
kvik [Sat, 19 Jun 2021 12:00:52 +0000 (12:00 +0000)]
cal: fix days of week alignment for year view (thanks igor@9lab.org)

  term% cal -s1 2021
                                  2021

           Jan                    Feb                    Mar
   M Tu  W Th  F Sa Su     M Tu  W Th  F Sa Su     M Tu  W Th  F Sa Su
               1  2  3    1  2  3  4  5  6  7    1  2  3  4  5  6  7
   4  5  6  7  8  9 10    8  9 10 11 12 13 14    8  9 10 11 12 13 14
  11 12 13 14 15 16 17   15 16 17 18 19 20 21   15 16 17 18 19 20 21
  18 19 20 21 22 23 24   22 23 24 25 26 27 28   22 23 24 25 26 27 28
  25 26 27 28 29 30 31                          29 30 31
  …

Note how the days (i.e. ' M Tu  W Th  F Sa Su') for Feb and Mar
do not align with the day numbers.

This is because an extra space is left *before* adding the terminating
'\0' via the pointer `dayw`.

With the patch applied the calendar aligns nicely for the year view:

  term% cal -s1 2021
                                  2021

           Jan                    Feb                    Mar
   M Tu  W Th  F Sa Su    M Tu  W Th  F Sa Su    M Tu  W Th  F Sa Su
               1  2  3    1  2  3  4  5  6  7    1  2  3  4  5  6  7
   4  5  6  7  8  9 10    8  9 10 11 12 13 14    8  9 10 11 12 13 14
  11 12 13 14 15 16 17   15 16 17 18 19 20 21   15 16 17 18 19 20 21
  18 19 20 21 22 23 24   22 23 24 25 26 27 28   22 23 24 25 26 27 28
  25 26 27 28 29 30 31                          29 30 31
  …

2 years agodate(1): document '-f' option
Ori Bernstein [Thu, 17 Jun 2021 21:12:26 +0000 (21:12 +0000)]
date(1): document '-f' option

2 years agogit/branch: resolve implicit branch switch before using it
Ori Bernstein [Wed, 16 Jun 2021 15:25:02 +0000 (15:25 +0000)]
git/branch: resolve implicit branch switch before using it

When switching a branch implicitly -- ie, creating a local
branch off of a remote branch -- we would get the list of
changed files before we would resolve the implicit branch
switch, leading to an empty list of changes.

2 years agolex: fix uninitialized fds (thanks きゐ)
Ori Bernstein [Wed, 16 Jun 2021 00:28:01 +0000 (00:28 +0000)]
lex: fix uninitialized fds (thanks きゐ)

2 years agotroff: fix mangled fonts and character files
Anthony Martin [Tue, 15 Jun 2021 16:13:59 +0000 (16:13 +0000)]
troff: fix mangled fonts and character files
All of these files appear to have been imported from sources in a
case-insensitive manner and consequently lost their original content.

- Hx, Hb, and Hi fonts should be narrow versions of Helvetica

- c[1-3] fonts should be condensed versions of Century Old Style

- the lH character should be a filled left hand symbol

- the rh character should be a stroked right hand symbol

- the rc character should be the right ceiling symbol

I've verified that these are the only files that collide with others
when ignoring case (aside from rc/bin/[Kk]ill but those are correct).

2 years agogit/import: handle mails with line wrapping and mime
Ori Bernstein [Tue, 15 Jun 2021 21:29:22 +0000 (21:29 +0000)]
git/import: handle mails with line wrapping and mime

git/import expected a patch, however upas/fs serves
either a raw file without any of the mime decoding
and line joining, or a directory, with the headers
and body split out.

This makes it a pain to apply some mails.

So, here we teach git to import upas dirs natively,
making it easy to handle all patches that come in
as emails.

2 years agoircrc: freenode -> oftc
glenda [Tue, 15 Jun 2021 14:28:00 +0000 (14:28 +0000)]
ircrc: freenode -> oftc

2 years agosysupdate: clean up transitional code
Ori Bernstein [Mon, 14 Jun 2021 23:58:09 +0000 (23:58 +0000)]
sysupdate: clean up transitional code

we just need git/pull now

2 years agopython, hg: tow outside the environment.
Ori Bernstein [Mon, 14 Jun 2021 00:00:37 +0000 (00:00 +0000)]
python, hg: tow outside the environment.

they've served us well, and can ride off into the sunset.

2 years ago/sys/lib/dist/mkfile: test for .git directory
glenda [Sun, 13 Jun 2021 13:21:12 +0000 (13:21 +0000)]
/sys/lib/dist/mkfile: test for .git directory

2 years agosam: remove refrence to /srv file in man page
Jacob Moody [Sat, 12 Jun 2021 18:44:17 +0000 (18:44 +0000)]
sam: remove refrence to /srv file in man page

2 years agolib9p: add auth* functions to man page
Jacob Moody [Sat, 12 Jun 2021 23:12:41 +0000 (23:12 +0000)]
lib9p: add auth* functions to man page

2 years agogit/push, git/send: get better about erroring out early
Ori Bernstein [Sun, 13 Jun 2021 12:48:49 +0000 (12:48 +0000)]
git/push, git/send: get better about erroring out early

git/push died within a subshell, which prevented the
whole program from exiting, and lead to an incorrect
ref update line that confused people.

git/send would eventually error out, but would push
all the data before that happened; this was annoying.

2 years agoa.out(1): update manpage to be 64 bit inclusive
jacob gw [Sat, 5 Jun 2021 18:48:10 +0000 (18:48 +0000)]
a.out(1): update manpage to be 64 bit inclusive

2 years agogit/branch: preserve checked in permissions on branch update
Ori Bernstein [Sun, 13 Jun 2021 01:20:46 +0000 (01:20 +0000)]
git/branch: preserve checked in permissions on branch update

we need to copy the files, and we should copy them with the
permissions that exist in the repo.

2 years agoB: expand path when plumbing files
Ori Bernstein [Sat, 12 Jun 2021 18:03:26 +0000 (18:03 +0000)]
B: expand path when plumbing files

When we plumb a file, we open it in the current working
directory if it exists. However, if it doesn't exist,
we end up opening it relative to the editor's working
directory.

Expanding the path to works around this issue.

2 years agoB, sam: remove sam srv file
Fulton Browne [Sat, 12 Jun 2021 17:20:53 +0000 (17:20 +0000)]
B, sam: remove sam srv file
No need for 2 programs doing the same job.

2 years agogit/add: clear qid cache as side effect
Ori Bernstein [Sat, 12 Jun 2021 14:57:58 +0000 (14:57 +0000)]
git/add: clear qid cache as side effect

this is an occasionally useful side effect when
doing surgery on repos, so let's have it.

2 years agomothra: read the content-type header over file(1) to determine type (thanks james...
Ori Bernstein [Sat, 12 Jun 2021 14:32:16 +0000 (14:32 +0000)]
mothra: read the content-type header over file(1) to determine type (thanks james palmer)

this fixes some pages being classified as xml by file(1),
meaning they would be rendered as plain text rather than as html.

2 years agoRemove ap(1)
Fulton Browne [Fri, 11 Jun 2021 23:26:50 +0000 (23:26 +0000)]
Remove ap(1)
Cool script - does not work.