Commit graph

599 commits

Author SHA1 Message Date
cinap_lenrek
16ba4693e5 netaudit: check none attach too 2022-12-14 18:06:17 +00:00
cinap_lenrek
ac0c7a5c96 netaudit: fix it for multiple results 2022-12-14 17:57:12 +00:00
Jacob Moody
f8509c37cb netaudit: perform a clean connection to test auth status
if we did connect with authentication to cwfs to set up
/srv/boot, then this would spout lies.
2022-12-14 17:42:39 +00:00
Jacob Moody
65d044deae netaudit: uncomment out warning about /srv/boot
In light of recent cwfs state, this is more useful.
2022-12-14 17:09:32 +00:00
cinap_lenrek
a7b30a349b rc: use /fd/0 for standard-input instead of '#d/0' in non-interactive mode 2022-12-12 21:21:22 +00:00
cinap_lenrek
7054405409 rc: read standard-input from /fd/0 instead of '#d/0' 2022-12-12 20:54:53 +00:00
qwx
618b7b861b play: use doom1.wad and dmid/opl3 for midi files by default 2022-11-28 00:26:07 +00:00
cinap_lenrek
4939948263 play: aac support 2022-11-27 23:07:26 +00:00
Ori Bernstein
2380532ff5 sysupdate: only pull on 'front' branch
prevent accidental merges and clobbers of work in progress
2022-11-24 03:11:14 +00:00
qwx
e2566e93e8 history: fix walking and handling files with spaces 2022-11-15 21:58:00 +00:00
Michael Forney
b7cc14789a ircrc: fix race with pipe causing hangup
If the work function opens and closes $netdir/data for an echo
redirection *before* the asynchronous cat process opens it,
aux/trampoline (or tlsclient) will receive a hangup, terminating the
connection.

To fix this, redirect work's stdout to $netdir/data so that it remains
open, and adjust the echo commands accordingly.
2022-11-05 02:57:49 +00:00
cinap_lenrek
0e66f87316 florenate: not funny 2022-10-31 15:53:53 +00:00
Jacob Moody
58339beadd window: fix regression w.r.t subrios
When running a plumber and rio combo within a window we were wrongly
using the 'root' rios /dev/wctl.  This change happened when we removed
$wctl and had subtly changed the priority of ways /bin/window used to
talk to rio.  This mimics the old behavior.
2022-10-18 00:07:30 +00:00
Ori Bernstein
d848292549 valley, feminize: these jokes suck. 2022-10-14 02:58:06 +00:00
Jacob Moody
ed06d70343 window: add wsys 'none' attach to attempted wctl search
While window did work when run under riostart without $wctl,
the change window running from the plumber. It is typical
for lib/profile to contain:

plumber
rio -s riostart

Previously this worked because rio polluted the envgroup
with $wctl and $wsys, but without $wctl or /dev/wctl the
plumber's window fails to find rio. In favor of not breaking
this configuration we allow window to fallback to checking $wsys
and attaching to the none window. This should keep window working
in all cases in which the wctl pollution worked before.
2022-09-11 03:47:48 +00:00
Sigrid Solveig Haflínudóttir
25ad7eef2c fshalt: optionally use /dev/pmctl to shut down the machine 2022-09-07 19:49:38 +00:00
Sigrid Solveig Haflínudóttir
f05b00e7be fshalt: shut up about #P not being present 2022-08-20 16:40:11 +00:00
Sigrid Solveig Haflínudóttir
a078bdb66a fshalt: support relative paths to the new kernel 2022-08-20 16:38:45 +00:00
Ori Bernstein
0986cc7a92 fshalt: remove unused variable 2022-08-20 12:39:23 +00:00
sl
d4bd31d871 add /rc/bin/splitmbox (we've already shipped the splitmbox(8) man page for years) (thanks, umbraticus) 2022-08-14 00:37:32 +00:00
Ori Bernstein
efc7a9a729 fshalt: allow passing a kernel to 'fshalt -r'
reboot(1) doesn't shut down the file system gracefully,
and fshalt -r didn't support passing a kernel; this
change allows rebooting into a new kernel with fshalt.
2022-08-12 10:36:55 +00:00
Roberto E. Vargas Caballero
e55b6a5aff Rewrite history: 9front was first
History was built using a heuristic where a file not present in
the dump in 30 days was considered as a deleted file, without
being important if those days had an actual dump. Having the file
server off 30 days made all the files to be deleted from the
history point of view. This new version is rewriten from scratch
in rc and it does not try to detect deleted files since it can
be derived only with fragile assumptions.
2022-08-08 16:56:11 +00:00
glenda
e92e9cf193 rcpu: show error when we auth but don't connect
When a user isn't allowed to log into a file server, we
used to silently dump the user back to the console,
reporting that the command succeeded.

We should give the user an error when they fail to log in,
and we should exit unsuccessfully.

This status is communicated by setting up a sentinel env
var, and clearning it just before we execute the user
command.
2022-08-07 09:11:25 +00:00
Ori Bernstein
dd029bddc8 src: 'test -x' instead of 'test -f'
while we're here, remove spare curly braces.
2022-08-05 22:57:36 +00:00
Ori Bernstein
53f2b41ec6 src: search for binaries in path, not random places
it's confusing and overly cute when 'src notinpath' works.
only accept paths that you can execute.
2022-08-05 22:46:08 +00:00
Ori Bernstein
db6883559f delkey: stop being clever about which factotum to use
use only /mnt/factotum: if you want to delete from your
terminal, bind the terminal in as your factotum.
2022-08-05 22:43:16 +00:00
cinap_lenrek
23620b2e70 inst: make bootsetup work for on pc architectures 2022-07-17 16:27:15 +00:00
Jacob Moody
c539d64d22 man: turn on troff -mnihongo if JP font is used
This specifically fixes
	% man -P ktrans

We dont have font widths for kanji in our troff
font files, so we can use aux/mnihongo to render
the character using libdraw, and grab the bitmap from
there. It's not pretty, but aux/mnihongo exists so
lets at least use it.

This also updates /sys/man/1/ktrans to specify the
Jp font to comply with aux/mnihongo.
2022-07-09 03:43:33 +00:00
Jacob Moody
6efb7620e6 chdev: dont pollute environment 2022-05-31 19:30:23 +00:00
Jacob Moody
57fa781188 aux/listen: Allow per service namespace files 2022-05-28 02:34:43 +00:00
Jacob Moody
6926080a2d add chdev(1) 2022-05-28 02:25:56 +00:00
Ori Bernstein
a59e61a6a4 patch(1): remove bell labs patch scripts
bell labs is dead, and nobody is listening; 9front
has our own patch submission proces.
2022-05-22 17:27:31 +00:00
Sigrid Solveig Haflínudóttir
2479bd2fb0 g: add .ha (Hare) 2022-05-15 08:21:34 +00:00
Alex Musolino
51669adf24 inst/prepdisk: fix invocations of test(1)
Test(1) was fixed some time ago [1] to properly parse all of its
command line arguments.  As such, we need to be more careful about
using test(1) with globbing patterns.

[1] changeset b562b269ce
2022-05-11 16:33:37 +00:00
qwx
3cf83fa259 /rc/bin: amend usage misdirections (thanks umbraticus) 2022-05-10 20:47:26 +00:00
glenda
78953b41e4 /rc/bin/9fs: case 9front: restore extra/ and iso/ 2022-04-27 23:24:07 +00:00
glenda
99d69b52b3 /rc/bin/9fs: fix case 9config for new contrib.9front.org server. 2022-04-24 02:51:46 +00:00
glenda
1d9d4ffef8 /rc/bin/9fs: update case 9front 2022-04-09 01:07:24 +00:00
glenda
4daf4ffdbe /rc/bin/rc-httpd/handlers/error: restore fn 400 (thanks, qeed) 2022-04-01 02:12:30 +00:00
glenda
241667b933 /rc/bin/rc-httpd/handlers/{dir-index, serve-static}: commit the correct files this time (thanks, igor) 2022-04-01 01:59:47 +00:00
glenda
60ef662b98 /rc/bin/rc-httpd/handlers/{dir-index, serve-static}: fix directory traversal bug (thanks, igor) 2022-04-01 01:53:29 +00:00
cinap_lenrek
fc0357b3de nusbrc: fix FTDI detection 2022-02-06 00:11:49 +00:00
Ori Bernstein
1290c534be g: show all file names when grepping
When grep gets a single file argument, it does
not show the file name. This makes seeing the
file name in the output of 'g' difficult.

Pass a spare /dev/null to each invocation of g,
in order to force it to show the file name.
2022-02-05 00:40:45 +00:00
Michael Forney
33231f9222 g: use xargs instead of finding complete file list before greping 2022-01-01 10:26:14 +00:00
Michael Forney
4db9bebede g: fix duplicate files with directory argument
When we encounter a directory in the argument list, we don't want to
walk every argument, just that directory.
2022-01-01 22:51:39 +00:00
cinap_lenrek
3ec59c7b70 ape/psh: provide /dev/fd 2022-01-03 18:44:22 +00:00
cinap_lenrek
49e991eaed /rc/lib/rcmain: remove useless exit $staus at the end 2021-12-31 16:15:20 +00:00
cinap_lenrek
917f57b6c3 consolefs(4): import -> rimport 2021-12-31 15:50:22 +00:00
cinap_lenrek
a33e93a752 listen(8): remove old cpu, exportfs and rexec listeners 2021-12-31 15:43:16 +00:00
Igor Böhm
614f1d6268 rio: allow spaces in working directory path (-cd) when creating a new window via wctl
The initial working directory of a new window may be set by a
`-cd directory` option. However, the `-cd directory` option is
not capable of handling paths with spaces when used via wctl.

To enable paths with spaces the function
/sys/src/cmd/rio/wctl.c:/^parsewctl is extended to handle quoted
directory paths.

Before applying the patch the following will fail to open a new
window by writing to /dev/wctl:

<snip>
 % rio -i window
 % mkdir '/tmp/path with space'
 % echo new -cd '''/tmp/path with space''' window -x rc >> /dev/wctl
 % pwd
 /tmp/path with space
<snap>

The following invocation fails as well:

<snip>
 % window -cd '/tmp/path with space'
 % pwd
 /tmp/path with space
<snap>

After applying the patch the above sequences work as expected,
opening a window running rc with the working directory set to
'/tmp/path with space'.
2021-11-29 00:06:45 +00:00
cinap_lenrek
5465c4c01a netaudit: simplify 2021-12-01 21:59:22 +00:00
cinap_lenrek
efd4d75082 netaudio: fix auth check, can have multiple auth servers! 2021-12-01 21:53:18 +00:00
cinap_lenrek
43eb7eea62 netaudit: check for sys= attribute to be free of periods 2021-11-29 20:26:12 +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
glenda
e2a8d3493a /rc/bin/rc-httpd/{rc-httpd, handlers/error}: do some minimal sanitization on $SERVER_NAME before handing it off to select-handler. this prevents malformed Host: headers from retrieving arbitrary files from the file system. (thanks, Lightning) 2021-11-21 23:42:13 +00:00
Igor Böhm
07f8584723 rc-httpd: fold two sed calls into one when computing location 2021-10-29 22:59:06 +00:00
glenda
3e7a249f14 /rc/bin/9fs: remove case 9bugs (defunct) 2021-09-04 01:49:04 +00:00
glenda
79b325528a /rc/bin/9fs: update case 9contrib for new server 2021-09-04 01:32:00 +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
glenda
1bb1b1a937 /rc/bin/9fs: 9front.org files now live on port 9000. 2021-08-27 01:09:12 +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
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
Fulton Browne
af95aa431d Remove ap(1)
Cool script - does not work.
2021-06-11 23:26:50 +00:00
Ori Bernstein
1bce186f6c homespool: remove obsolete lp config tool
homespool configures directories that it seems
lp no longer usees. we can drop it.
2021-06-07 16:46:57 +00:00
Ori Bernstein
01f7286521 see last try. 2021-06-06 17:44:10 +00:00
cinap_lenrek
f9ae020332 sysupdate: revert thumbstone temporarily
experiencing some issues with git9 transition... we likely need
to update git9 again before doing another attempt...
2021-06-06 13:07:51 -04:00
Ori Bernstein
4f3437a3cc sysupdate: insert tombstone
after this update, we're on git: update sysupdate
to switch repositories.
2021-06-05 05:17:03 -07:00
cinap_lenrek
014197f8d3 iwhois: add some improvements (thanks gall0ws)
patch from gall0ws:

> It's impossible to get whois right and probably nobody cares about it,
> nevertheless this small patch fixes some issues with the current version:
>
> * use a more common filter for default boilerplate (useful when
>   following the referral chain)
> * updated boilerplate for *.co.uk *.net.uk *.org.uk
> * added case *.com *.net (got it from iana.org)
> * use ARIN for IPv6 addresses
> * when unsure, check first whether whois.nic.$tld exists otherwise
>   usual fallback to InterNIC
> * fixed regexp for the referral chain (case, extra spaces or /)

- add usage handling.

--
cinap
2021-05-09 15:19:05 +02:00
Sigrid
c613382caf remove juke (use play or zuke instead) 2021-04-13 13:25:24 +02:00
Sigrid
b777d3fe7d remove old, broken scripts: fedex, u(s)ps, weather (thanks fulton) 2021-04-13 11:26:55 +02:00
cinap_lenrek
5d0c3ab7df termrc, cpurc: silence /net/ether* error message when there are no ethernet devices 2021-04-10 15:01:09 +02:00
kvik
1b4758d596 g: add lua, mk, ml, mli, myr, and sh suffixes 2021-04-09 03:18:53 +02:00
cinap_lenrek
777b1949b2 nusbrc: ignore rndis ethernet in /rc/bin/nusbed, handled by /sys/src/9/boot/nusbrc (thanks romano) 2021-04-08 21:57:24 +02:00
cinap_lenrek
c77b3ba143 whois: suppress missing file errors (thanks kivik) 2021-04-02 17:26:34 +02:00
moody
f704965a45 B, Bfn: fix invocation with multiple files, improve manual page 2021-02-27 19:35:06 +01:00
sl
72868594c7 newt: remove fn f, replace with walk 2021-02-09 22:50:31 -05:00
Sigrid
58b3f96f98 9fs: bell labs is very dead 2021-01-15 19:32:02 +01:00
cinap_lenrek
2e6a5e7046 fax, psfax, vwhois: use $user instead of /dev/user 2020-12-23 01:44:44 +01:00
cinap_lenrek
cad697d6ed B: dont pollute the environment 2020-12-23 01:44:10 +01:00
cinap_lenrek
4675de1ba0 kill, slay, broke: dont pollute environment, use $user 2020-12-23 01:43:29 +01:00
cinap_lenrek
e45c7480b6 Kill: don't pollute environment 2020-12-23 01:42:52 +01:00
cinap_lenrek
c8c5499d7f start, stop: avoid null list in concatenation witout arguments, use $user 2020-12-23 01:41:52 +01:00
cinap_lenrek
c7fd8fe47a nusbrc: delect lenovo camera 2020-12-23 01:23:09 +01:00
Alex Musolino
a203d90474 hpost: fix usage text 2020-12-22 00:16:26 +10:30
Sigrid
d0cc9e2eb6 g: initialize files env var 2020-12-19 13:33:11 +01:00
Ori Bernstein
c2aa8c997a hpost: support custom headers (thanks julienxx)
hget supports adding custom headers with -r;
it makes sense for hpost to do the same, both
because custom headers are more likely necessary
with POSTs, and for consistency.
2020-12-17 20:26:38 -08:00
cinap_lenrek
27a83106f4 oexportfs: move legacy code for cpu and import to separate program
The initial protocol handling in exportfs for
cpu and import services is a huge mess.

Saparate the code out into its own program with
its own oexportfs(4) manpage.
2020-12-13 20:09:03 +01:00
Sigrid
d7120ecb77 src: work on awk scripts too, see "src valley" (thanks phil9) 2020-12-10 10:33:42 +01:00
Ori Bernstein
e60216c2b7 g: fix typo in last commit 2020-11-22 17:42:25 -08:00
Ori Bernstein
97008caa41 g: filter directory arguments
When searching directories recursively, it's still
desirable to filter the contents by the file pattern,
so that 'g foo /sys/src' doesn't end up searching for
foo within .$O files.

Files passed explicitly are still searched, so for the
old behavior, just use walk:

	g foo `{walk -f $dir}
2020-11-21 21:23:46 -08:00
kvik
58861fff63 window: fix error exit with the -m flag
When called with the -m flag window would always exit with
some error, usually status='no match', because of an if-match
being the last status-setting command in the script.
2020-09-16 13:12:13 +02:00
Alex Musolino
cf69bb920a rc-httpd: fix invalid test(1) invocation in dir-index 2020-08-02 18:30:01 +09:30
Ori Bernstein
03499e53cc g: add '.hs' and 'mkfile' to the walk. (thanks joe9)
This expands the set of files that we grep through by default to
include mkfiles and haskell.
2020-07-14 20:46:00 -07:00
Ori Bernstein
7364a96b28 bell labs is dead, man
remove the last reference from 9fs.
2020-03-20 14:12:23 -07:00
Ori Bernstein
5bc9b0c3ca improve usage messages (thanks henesy)
Fix inconsistencies between programs and their usage
messages,  correct instances where information seems
to be missing or lost. This  includes missing arguments,
making usage consistent with manuals, and so on.
2020-03-10 10:09:34 -07:00
Ori Bernstein
06ea44c895 fix -T option for doctype
We used to set $dev to -T, and leave the device type
in the argument list. Now, we set it to -T$2, and shift
it out of the list.
2020-03-10 09:35:06 -07:00
Ori Bernstein
e652be5559 "": output previous action to stderr
When redirecting output from "", it prints the command
to stdout, which garbles things like:

	% foo
	<inspect output>
	% "" > /dev/snarf

Now, we send it to stderr.
2020-03-08 11:46:34 -07:00