Commit Graph

8653 Commits (front)

Author SHA1 Message Date
Ori Bernstein 819bec22cc vt: allow scrolling with the mouse. 2021-06-26 17:39:13 +00:00
Ori Bernstein b68b3a6e19 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.
2021-06-26 17:29:27 +00:00
cinap_lenrek 4fd09def0f 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.
2021-06-26 13:16:36 +00:00
Ori Bernstein 759aafa007 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.
2021-06-25 23:10:07 +00:00
Jacob Moody 88a8ca5c8d cc: create .$O files with DMTMP 2021-06-24 13:53:37 +00:00
Sigrid Solveig Haflínudóttir e390486e92 tmdate(2): "ttt" is a valid format too, mention it 2021-06-23 08:07:16 +00:00
Ori Bernstein b904edadd8 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.
2021-06-22 23:55:54 +00:00
Ori Bernstein 5770332282 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.
2021-06-22 23:40:11 +00:00
Ori Bernstein ce73821f35 git(1): we have rebase 2021-06-21 15:38:11 +00:00
Ori Bernstein 214dc1ec6c 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.
2021-06-21 12:29:52 +00:00
Alex Musolino 068f403e71 /sys/man/mkfile: drop reference to non-existent realtime(3) 2021-06-21 10:27:09 +00:00
Alex Musolino ed52015cad 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.
2021-06-21 10:26:15 +00:00
Alex Musolino e8b4cf938d /sys/man/mkfile: run eqn(1) for usb(3) section of book 2021-06-21 10:22:49 +00:00
Noam Preil 065cf0b708 venti: warn when opening /dev/swap fails 2021-06-21 03:56:14 +00:00
Noam Preil e7715ce2c6 venti: fix detection of available RAM (fixes -m) 2021-06-21 03:52:09 +00:00
Noam Preil a22697039d venti: inform user when reducing memory consumption 2021-06-21 03:49:42 +00:00
Noam Preil 7ec8207883 /sys/src: add arm64 to installall list 2021-06-21 03:34:47 +00:00
Noam Preil 1a09421f7d kencc: clarify warning for unused assignments 2021-06-21 03:29:58 +00:00
Ori Bernstein 21075859e4 git/revert: handle absolute paths gracefully (thanks deuteron)
when reverting files, absolute paths would get concatenated with
$gitrel; use `cleanname -d` to fix this.
2021-06-21 02:12:58 +00:00
cinap_lenrek 0339e9ac44 libsec: restore old behaviour for generating self signed cert 2021-06-21 00:38:06 +00:00
cinap_lenrek e9aed242cc 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.
2021-06-20 23:33:13 +00:00
Ori Bernstein eeb0f9a9da 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.
2021-06-20 17:07:33 +00:00
Sigrid Solveig Haflínudóttir a87a4b763f threadimpl.h: remove Printsize as well (unused) 2021-06-20 14:59:10 +00:00
Sigrid Solveig Haflínudóttir 8ec50b87d5 thread.h: threadnonotes does not exist 2021-06-20 14:55:13 +00:00
Sigrid Solveig Haflínudóttir 340d157c40 threadimpl: remove unused fields from Proc struct 2021-06-20 14:54:20 +00:00
cinap_lenrek 57d95c7325 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.
2021-06-20 14:41:26 +00:00
Alex Musolino 6dd2c638b6 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.
2021-06-20 02:05:00 +00:00
kemal 775a4bea43 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
2021-06-18 19:12:44 +00:00
kvik e701597109 nusbrc(8): fix typo (thanks igor@9lab.org) 2021-06-19 12:03:53 +00:00
kvik 5e098228ac 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
  …
2021-06-19 12:00:52 +00:00
Ori Bernstein b3215c8075 date(1): document '-f' option 2021-06-17 21:12:26 +00:00
Ori Bernstein 1da1ac52d2 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.
2021-06-16 15:25:02 +00:00
Ori Bernstein 7f697e822b lex: fix uninitialized fds (thanks きゐ) 2021-06-16 00:28:01 +00:00
Anthony Martin 1210b12f28 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).
2021-06-15 16:13:59 +00:00
Ori Bernstein 7c3ff53574 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.
2021-06-15 21:29:22 +00:00
glenda 21283578eb ircrc: freenode -> oftc 2021-06-15 14:28:00 +00:00
Ori Bernstein e1cc6a9a0f sysupdate: clean up transitional code
we just need git/pull now
2021-06-14 23:58:09 +00:00
Ori Bernstein a73a964e51 python, hg: tow outside the environment.
they've served us well, and can ride off into the sunset.
2021-06-14 00:00:37 +00:00
glenda e64efe273f /sys/lib/dist/mkfile: test for .git directory 2021-06-13 13:21:12 +00:00
Jacob Moody a7a34f1fdf sam: remove refrence to /srv file in man page 2021-06-12 18:44:17 +00:00
Jacob Moody 370ef39bf9 lib9p: add auth* functions to man page 2021-06-12 23:12:41 +00:00
Ori Bernstein 8ab397c23c 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.
2021-06-13 12:48:49 +00:00
jacob gw c9bf96e3e0 a.out(1): update manpage to be 64 bit inclusive 2021-06-05 18:48:10 +00:00
Ori Bernstein 4aef95e205 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.
2021-06-13 01:20:46 +00:00
Ori Bernstein c12e49ecbf 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.
2021-06-12 18:03:26 +00:00
Fulton Browne 1c30bd451e B, sam: remove sam srv file
No need for 2 programs doing the same job.
2021-06-12 17:20:53 +00:00
Ori Bernstein 73db7a20f7 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.
2021-06-12 14:57:58 +00:00
Ori Bernstein aacf368c6d 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.
2021-06-12 14:32:16 +00:00
Fulton Browne af95aa431d Remove ap(1)
Cool script - does not work.
2021-06-11 23:26:50 +00:00
kemal 09b0eb0d1a git/conf: check in /sys/lib/git/config as a fallback to user-wide config 2021-06-08 20:13:57 +00:00