Commit graph

1324 commits

Author SHA1 Message Date
cinap_lenrek 60adc40118 devenv: allow environment total size of up to 1MB
Sometimes, there is the one-off occation when one needs to
pass a huge list in rc...

This change makes devenv track total memory consumption
of environment groups allowing them to grow up to 1MB in
size (including overhead).

(Before, only the variable size was restricted, but
not the amount of files being created).

The maximum value size of a single environment variable
is set to half of the total size, which allows the
occational large value. (But not many of them).

Because we track all memory consuption, it is also
now possible to create around 10k small environment
variales.

A hashtable is added for name lookups and the qid.path
was changed to allow direct indexing into the entry
array without needing a scan lookup.

All smalloc() calls have been removed, exhaustion is
handled with error(Enomem) avoiding deadlock
in case we run out of kernel memory.
2022-01-23 21:33:58 +00:00
Igor Böhm 3ba62d3cd0 man(1): reference /rc/bin/sig in SOURCE section 2022-01-23 01:14:05 +00:00
cinap_lenrek b00b3d3739 rc(1): fix synopsis 2021-12-31 16:08:30 +00:00
cinap_lenrek 44a5f4d2ef remove pushssl(2) 2021-12-31 15:59:13 +00:00
cinap_lenrek 8bebe3ab19 remove ssl(3) 2021-12-31 15:56:40 +00:00
cinap_lenrek 2d105c2d32 0intro(1), acme(1), con(1), rcpu(1), rio(1), namespace(4), authsrv(6), aan(8): cpu -> rcpu 2021-12-31 15:53:00 +00:00
cinap_lenrek 31f66da433 ftpfs(4): import -> rimport 2021-12-31 15:51:22 +00:00
cinap_lenrek 917f57b6c3 consolefs(4): import -> rimport 2021-12-31 15:50:22 +00:00
cinap_lenrek aa781bfda2 listen(8): get rid of old ports 2021-12-31 15:44:55 +00:00
cinap_lenrek a33e93a752 listen(8): remove old cpu, exportfs and rexec listeners 2021-12-31 15:43:16 +00:00
cinap_lenrek b90036a062 rc: fix everything
Untangle the lexer and interpreter thread state.

Fix the file and line number error reporting, getting rid of
Xsrcfile instruction, as the whole code block can only come
from a single file, stuff the source file in slot[1] of the
code block instead.

Remove limitations for globber (path element limits)
and be more intelligent about handling globbing by
inserting Xglob instruction only when needed and not
run it over every Xsimple argument list.

Remove fragile ndot magic and make it explicit by adding
the -q flag to . builtin command.

Add -b flag for full compilation.

Make exitnext() smart, so we can speculate thru rcmain and
avoid the fork().

Get rid of all print(2) format functions and use io
instead.

Improve the io library, adding rstr() to handle tokenization,
which allows us to look ahead in the already read buffer
for the terminators, avoiding alot of string copies.

Auto indent pcmd(), to make line number reporting more usefull.

Implement here documents properly, so they can work everywhere.
2021-12-31 15:27:10 +00:00
Igor Böhm 855cf4326f acme(1): fix reference to 9front default acme font 2021-12-29 23:37:56 +00:00
Igor Böhm 5d69d42ee3 git(1): fix quotes in git/conf example 2021-12-15 22:45:59 +00:00
Ori Bernstein 7efbea82c6 devssl, cpu, import, oexportfs: delete
SSL is implemented by devssl. It's extremely
obsolete by now, and is not used anywhere but
cpu, import, and oexportfs.

This change strips out the devssl bits, but
does not (yet) remove the code from libsec.
2021-12-13 02:17:02 +00:00
cinap_lenrek be0b39f9c5 acmed(8), rsa(8): add role=client attribute to rsa keys 2021-12-06 15:40:18 +00:00
cinap_lenrek d3743d40c2 netaudit, ndb(6): the dom= attribute in ndb should be specified without the trailing period 2021-11-29 20:07:04 +00:00
Igor Böhm a27afe904d prep(8): fix typos, wording, and formating 2021-11-21 22:45:51 +00:00
Igor Böhm d1a81aa81f rsa(8): fix spelling and adjust macros to fix formating 2021-11-20 22:59:43 +00:00
Humm 05b513a687 snap(4): remove non-existent -s from snapfs 2021-11-17 19:57:03 +00:00
Igor Böhm 3473fa237c nusbrc(8): fix typo in BUGS section 2021-11-16 08:06:50 +00:00
Igor Böhm a7ec6ee4e8 git(1): fix git/add -r spacing and wording in BUGS section 2021-11-08 01:05:51 +00:00
Igor Böhm 160e36aaef git(1): fix typo in git/push section 2021-11-06 00:15:28 +00:00
Igor Böhm 775608db7c leak(1): document how to generate pool.$objtype.acid
/sys/lib/acid/leak requires /sys/src/libc/port/pool.$objtype.acid
which is not present by default, describe how to generate it.
2021-11-04 23:11:56 +00:00
Stuart Morrow 3f49507786 mainly just spelling and typos 2021-11-01 20:49:43 +00:00
cinap_lenrek 2899b719ae libndb: move mkptrname() into libndb to avoid duplication 2021-11-03 19:38:36 +00:00
Noam Preil 4584fbf577 venti(8): change documented behavior to match actual 2021-11-03 03:48:48 +00:00
Kyle Milz ca73f67347 man grep args spacing diff 2021-11-01 17:07:28 +00:00
Igor Böhm 27af159fdc rc-httpd(8): document how to use HTTP basic authentication 2021-10-30 23:59:12 +00:00
cinap_lenrek 498d86b921 ndb/dnsquery: make ! bang work with reverse lookups, document in ndb(8) 2021-11-01 16:31:39 +00:00
Kyle Milz c67593125c man g filetypes diff
g(1): sync filetypes list

the file types list in the 'g' manual was out of date.
this change synchronizes and sorts them.

it looks like the .B macro only accepts 6 args or less,
so observe that limit.
2021-11-01 15:22:41 +00:00
Ori Bernstein 7879a3a9a6 acmed(8): ip => auth: missed a reference to the old name 2021-10-29 20:13:53 +00:00
Sigrid Solveig Haflínudóttir 18521fc8c6 mkplist: add -s option to enable "simple" sort (thanks qwx) 2021-10-28 15:20:13 +00:00
Ori Bernstein d8a1437cf4 acmed: move from ip/ to auth/
Getting certs is more tied to authentication than it
is to ip.
2021-10-27 19:33:22 +00:00
cinap_lenrek 8eaec71089 acmed(8): typo... 2021-10-27 17:18:24 +00:00
cinap_lenrek ae9918c93e acmed(8): more improvements 2021-10-27 17:06:48 +00:00
cinap_lenrek 463bbddb8d rsa(8): document rsa2jwk 2021-10-27 17:04:13 +00:00
cinap_lenrek c9a20db1f1 acmed(8): fix typo 2021-10-25 21:48:05 +00:00
cinap_lenrek 87eb9bc2b7 acmed: add external command flag -e, improvements, bugs
- allow for external command to be run to install a challenge using -e flag
- remove the challengedom argument, it is given by the subject in the csr
- fix some filedescriptor leaks in error paths
2021-10-25 16:59:29 +00:00
cinap_lenrek 4efd8575eb ndb(6): add caa 2021-10-25 02:00:22 +00:00
cinap_lenrek 20cff04fd2 ndb/dns: implement caa record type in ndb
this allows the caa records to be specified
in ndb as:

caa=<value> tag=<tag> flags=<flags>

where tag defaults to "issue" and flags to 0
when omited.
2021-10-24 22:15:26 +00:00
Ori Bernstein 5e2bf722c3 acmed(8): missed a spot 2021-10-21 02:11:03 +00:00
Ori Bernstein 72a0886639 acmed(8): fix typos, formatting, and missed name change. 2021-10-21 02:01:43 +00:00
cinap_lenrek 741e943341 acmed(8): add bugs section 2021-10-17 20:19:09 +00:00
cinap_lenrek bb2357de0c fork(2): document new error behaviour when out of resources 2021-10-16 13:14:53 +00:00
Ori Bernstein 4c7745b202 acmed: import acme (RFC8555) client 2021-10-15 00:32:32 +00:00
qwx 3e98132fc6 addpt(2): fix inconsistency in description 2021-10-10 17:13:57 +00:00
Igor Böhm 0c0ffafb5b sam(1): fix description of ctrl+g 2021-10-05 20:17:33 +00:00
Igor Böhm b638114186 vncv: enable connecting to Darwin hosts
Tested on MacOS Catalina and Big Sur releases.

Update man page to highlight weak encryption of vnc, recommending to
tunnel via ssh (thanks unobe).
2021-09-25 20:40:47 +00:00
qwx c9b48aec54 sega(1): fix typo 2021-09-30 14:20:03 +00:00
qwx e279699344 plumber: remove $plumbsrv, add optional srvname, usage check
Plumber both posts a service to /srv and sets a $plumbsrv environment
variable.  Our libplumb no longer uses $plumbsrv and nothing else
does.  It's a silly hack;  rc doesn't update /env immediately, and
scripts, which for instance set up subrios, cannot rely on it to
clean up the plumber at the end.

Instead, add the option to specify a srvname, actually check for some
common errors and print a usage string.

Thanks to Ori for input and a preliminary patch.
2021-09-10 21:03:47 +00:00
cinap_lenrek 084c2e6a65 fix manpage references for dup(2), kproc(9) and panic(9). 2021-09-08 18:22:35 +00:00
cinap_lenrek 33ac896d47 ndb(2): document txt and txtrr attributes. 2021-09-08 18:20:59 +00:00
cinap_lenrek 1299ea4d89 ndb/dnsdebug: make usage flags consistent 2021-09-08 17:26:31 +00:00
qwx 19a548fd49 joy(1): fix typo (thanks lyndon) 2021-09-01 23:30:52 +00:00
qwx 6d4261baab add joy(1): joystick script for all emulators, and docs
remove old /sys/src/games/nes/joynes in favor of joy(1).
joy(1) has more buttons for the other emulators;  there is
no longer a significance in the order of the keys.
document nusb/joy, add information in each emulator manpage.
2021-09-01 22:47:30 +00:00
Ori Bernstein e6f0abc25e date(1): sync with reality
'date -m' was removed, but evidence of its
existence was left in the manpage.
2021-08-29 01:00:36 +00:00
Ori Bernstein 61f37abf57 git(1): "see also" consistency (thanks sirjofri)
adds commas between "see also" entries to
make it consistent with other man pages.
2021-08-27 14:13:11 +00:00
qwx ad26f82e44 man page fixes (thanks stuart morrow) 2021-08-24 21:45:37 +00:00
amavect 0f58e47551 exportfs, oexportfs, iostats: make -d log to stderr
exportfs -d logs 9p traffic to /tmp/exportdb.
-f allows writing to a different file.
exportfs silently continues if it doesn't have
permissions to create or write to /tmp/exportdb.
These are poor behaviors.

A better default is to write to stderr, since it
is 9P debug info that is better immediately printed,
and not user info that is better handled by syslog().
As a result, -f is obsolete and thus removed.
Redirect responsibility is now on rc.
As a side effect, rc will fail if it doesn't
have permissions to write.

exportfs(4) is updated to reflect all changes
and with a better Synopsis.

oexportfs is changed to match exportfs.
oexportfs(4) is updated to reflect all changes.
The Synopsis is not changed due to the number of flags.

Removed -f from iostats.
iostats(4) is updated to reflect all changes.
---
2021-08-18 17:51:40 +00:00
Alex Musolino 8c796bf8b9 audio(1): replace references to juke(7) and playlistfs(7) with zuke(1) (thanks unobe) 2021-08-20 04:07:37 +00:00
Ori Bernstein b0ae37013c exportfs: revert e524e8d65a
It turns out that the '-f' flag was being used, and removing
it broke things.
2021-08-18 14:44:29 +00:00
amavect e524e8d65a exportfs: make -d log to stderr
exportfs -d logs 9p traffic to /tmp/exportdb.
-f allows writing to a different file.
exportfs silently continues if it doesn't have
permissions to create or write to /tmp/exportdb.
These are poor behaviors.

A better default is to write to stderr, since it
is 9P debug info that is better immediately printed,
and not user info that is better handled by syslog().
As a result, -f is obsolete and thus removed.
Redirect responsibility is now on rc.
As a side effect, rc will fail if it doesn't
have permissions to write.

exportfs(4) is updated to reflect all changes
and with a better Synopsis.
2021-08-14 19:50:23 +00:00
cinap_lenrek 913fdf2497 tinc: fix spelling and update manpage (thanks unobe)
Update tinc(8) man page to:
    1.  state the implementation aligns with 1.0.36 of tinc.org;
    2.  use same hostname as mentioned in usage line.
  Fix typos in tinc.c.
2021-08-15 09:54:09 +00:00
Sigrid Solveig Haflínudóttir 185fe31de4 9p(2): fix a typo (thanks humm) 2021-08-05 13:01:35 +00:00
rodri 28f76455d3 dial(2): dial returns an open data file, not a ctl one. also fixed little typo. 2021-07-25 18:27:59 +00:00
cinap_lenrek 1ec44ec77c libc: use usize for sbrk() increment 2021-07-25 16:03:14 +00:00
cinap_lenrek e4b5f170cf libc: change usize to 64-bit for amd64 and arm64, make memory(2) functions use usize 2021-07-25 15:54:22 +00:00
cinap_lenrek c38fcb5dc3 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.
2021-07-23 15:10:01 +00:00
cinap_lenrek 403149d7de gzip, bzip2: add -n flag to suppress modification timestamp 2021-07-21 17:36:02 +00:00
cinap_lenrek 669b3abd70 brk(2): .... we define lowest addres not used by the program above, so use that instead 2021-07-20 21:49:30 +00:00
cinap_lenrek 7bd6679c82 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.
2021-07-20 21:44:34 +00:00
Jacob Moody be36c092ac aux/cddb: Provide -e option to print commands to rip audio with tags.
Also parse title/track artist and year.
2021-07-17 18:56:11 +00:00
cinap_lenrek fad1b3f7f7 kbdfs: allow to escape ctlr-alt-del with shift for vmx and vnc. 2021-07-16 23:36:40 +00:00
kvik e85aa1089d webfs(4): fix typos 2021-07-15 18:53:42 +00:00
cinap_lenrek 006c4d7ffc archacpi: make *acpi=1 the default 2021-07-15 16:07:54 +00:00
kvik 431dbabcc1 graphics(2): fix typo 2021-07-14 20:38:12 +00:00
Ori Bernstein 6560e7c6fd fs(4): describe the noauth toggle better (thanks izaki) 2021-07-12 23:47:06 +00:00
Jacob Moody 5a23b752eb strcat(2): 0 → nil in manpage in refrence to pointers 2021-07-12 21:42:39 +00:00
Sigrid Solveig Haflínudóttir bf6769d3f0 mouse(3): mousein is NOT exclusive, see 30907f1d00 2021-07-09 14:40:23 +00:00
cinap_lenrek 78cf847bfb rsa(8): document auth/x5092pub, fix usage lines 2021-07-04 22:38:22 +00:00
cinap_lenrek 88060e7501 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.
2021-07-04 22:00:24 +00:00
Ori Bernstein e934530ee4 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.
2021-07-03 20:03:17 +00:00
cinap_lenrek c848ca6267 devmouse: default to no blanking instead of 30 minute blank timeout 2021-07-01 23:11:11 +00:00
Anthony Martin 658757abed 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
%
2021-06-27 00:13:58 +00:00
Anthony Martin d972962f92 pic(1): restore example section
It was erroneously elided when removing
the tpic command in commit 891a8c4f2.
2021-06-27 00:11:17 +00:00
Anthony Martin d019a03f37 segment(3): restore missing phrase
It was accidentally removed when documenting
the sticky segment type in commit 99ed9623b.
2021-06-27 00:18:49 +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 ce73821f35 git(1): we have rebase 2021-06-21 15:38:11 +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
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
kvik e701597109 nusbrc(8): fix typo (thanks igor@9lab.org) 2021-06-19 12:03:53 +00:00
Ori Bernstein b3215c8075 date(1): document '-f' option 2021-06-17 21:12:26 +00:00
glenda 21283578eb ircrc: freenode -> oftc 2021-06-15 14:28:00 +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
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
jacob gw c9bf96e3e0 a.out(1): update manpage to be 64 bit inclusive 2021-06-05 18:48:10 +00:00