Commit graph

5497 commits

Author SHA1 Message Date
cinap_lenrek
1bc20697ed devsegment: return proper write count for ctl message 2017-05-30 16:08:47 +02:00
stanley lieber
db46e826c2 newt: add !cmd 2017-05-28 15:45:07 -04:00
stanley lieber
9c70c81e70 newt: honor environment variables $editor and $pager 2017-05-26 11:15:35 -04:00
aiju
ce17224eaf ?a: getc() needs to increment lineno if it gets \n from peekc 2017-05-26 00:01:53 +00:00
aiju
5fb666453a libmach: add INVEPT and INVVPID instructions 2017-05-24 00:59:14 +00:00
qwx
6f63752d84 igfx: add support for haswell graphics
add support for edp, dp and hdmi on haswell and haswell ult.
vga, dvi and specific configurations like ulx are unimplemented.

remaining issue: edp link training always fails (time out).
2017-05-22 18:19:24 +02:00
aiju
3cc97ac108 io(1): %llx -> %ullx 2017-05-22 09:04:51 +00:00
aiju
82f91a895a libmach: fix wrong offset bug (thanks cinap); add VMX instructions 2017-05-22 00:40:18 +00:00
cinap_lenrek
760e539811 kernel: avoid panic with segio and SG_FAULT segments
the problem is that segio doesnt check segment attributes
and it can't really in case of SG_FAULT which can be
inherited from pseg and toggle at any time.

so instead of returning -1 from fault into the fault$cputype
handler which then panics when fault happend kernel mode,
we jump into segio's waserror() block just like in the
demand load i/o error case (faulterror()).
2017-05-21 16:36:11 +02:00
cinap_lenrek
1dc5f9222a vt: don't flush while there is keyboard input available 2017-05-20 14:45:47 +02:00
BurnZeZ
f308677510 /sys/lib/acid/port: make line() also print the line number 2017-05-11 19:34:54 +00:00
cinap_lenrek
2fda77e404 /sys/doc: fix mkfile to and remove files that now can be regenerated 2017-05-09 16:23:48 +02:00
cinap_lenrek
015956ea61 troff: charlib: fix right hand special character 2017-05-09 16:10:44 +02:00
cinap_lenrek
bff4fad52a rio: implement writable and truncatable /dev/text 2017-05-07 19:05:12 +02:00
cinap_lenrek
7327bd43c0 kernel: fix namelenerror(), avoid memrchr() and make it static
make sure the loop terminates and doesnt get stuck at
name == aname. avoid memrchr() as it conflicts with
libc on unix (drawterm). declare namelenerror() as
static.
2017-05-07 18:13:37 +02:00
aiju
37567f07d1 update ape/bio.h (thanks jpm) 2017-05-06 14:33:52 +00:00
cinap_lenrek
f317d233f4 devproc: can't wait for ourselfs to stop (thanks Shamar) 2017-05-06 00:49:47 +02:00
BurnZeZ
59e8bc0e23 aux/statusmsg: use libbio for textmode output
calling write(1, "\b", 1); for each rune to be removed is a lot of
overhead, and we don’t want rio to turn each of these writes into a
draw operation.

also, it now prints to stderr before exiting if initdraw() fails
2017-05-05 21:43:30 +00:00
cinap_lenrek
74b6d9bda3 ssh: add -h flag to pass host (for compatibility) 2017-05-05 21:04:31 +02:00
aiju
7ade57b678 sed: add -u flag that flushes output buffers before reading in further input 2017-05-05 08:22:13 +00:00
aiju
20b945a382 bio(2): manpage typo 2017-05-04 17:47:03 +00:00
aiju
f681cf835a bio: add support for custom I/O handler via Biofn 2017-05-04 17:42:12 +00:00
cinap_lenrek
414d29e98f ssh(1): document -T tries option, #subsys cmd behaviour 2017-05-03 20:56:20 +02:00
cinap_lenrek
710d4982b7 ssh: quote cmd arguments with unix shell single quotes, request tty even with TERM=dumb 2017-05-03 20:55:32 +02:00
cinap_lenrek
38d421ec00 ctime(2): fix example (thanks raiz)
raiz → the reason that the manpage example works not because
it's a correct timezone file format, but because readtimezone()
(in libc) fails and defaults to GMT.
2017-05-03 20:47:46 +02:00
cinap_lenrek
cd694c6016 upas/fs: handle partial fetches (imap server returning less messages than available) 2017-05-02 04:07:21 +02:00
cinap_lenrek
295c0071c3 dist/ndb: move sources auth server to ndb/common, list root dns servers in ndb/local as a fallback 2017-05-01 22:49:35 +02:00
cinap_lenrek
d63cc467d8 5e: fix special bitshift and rotations 2017-05-01 20:22:23 +02:00
cinap_lenrek
359955ee4b vt(1): the "send" menu became "paste" 2017-05-01 02:31:50 +02:00
cinap_lenrek
f6b68dd79b sshfs(4): fix bad cross reference 2017-05-01 02:18:09 +02:00
cinap_lenrek
fa94532c08 vgamach64xx: remove drawdebug reference 2017-05-01 02:15:03 +02:00
cinap_lenrek
0b85c859f5 merge 2017-05-01 00:03:01 +02:00
cinap_lenrek
2713779ee6 ip/torrent: avoid requesting same chunks
instead of always just requesting the missing range
of the current piece, remember the workpiece offset
and request sequential chunks from the workpiece.

this avoids double requests of the same ranges when
the peer does not respond with the data immidiately.
2017-05-01 00:01:14 +02:00
spew
ff8ae67b70 libregexp: miscellaneous little cleanups 2017-04-30 15:08:36 -05:00
cinap_lenrek
c00c60d327 sshfs: fix -r / retulting in "//foo" paths, memory leaks, use estrdup9p()
just use cleanname() to implement pathcat(), which
handles double slashes and ".." elements already.

have to free the partial dir structue on error in
parsedir().

use estrdup9p() instead of strdup().
2017-04-30 18:28:06 +02:00
cinap_lenrek
607e651c06 vnc: substitute iprint() with fprint(2, (gone from libmemdraw) 2017-04-30 04:06:03 +02:00
cinap_lenrek
24420ab9eb kernel: fix rewinding in directories with pread() offset
reading directories with pread() offset has to work the same
way as read(), otherwise exportfs breaks rewinding in directories.
2017-04-30 01:51:07 +02:00
cinap_lenrek
f8478eb4c4 lib9p: allow rewinding in 9pfile directories 2017-04-30 01:49:21 +02:00
cinap_lenrek
56611ced39 libmemdraw: get rid of kernel iprint() emulation 2017-04-29 21:13:48 +02:00
cinap_lenrek
9a5e55782d libmemdraw/libmemlayer: get rid of drawdebug prints 2017-04-29 21:10:28 +02:00
cinap_lenrek
3c894ece0c devdraw: ignore drawdebug command 2017-04-29 21:09:11 +02:00
cinap_lenrek
d4a6dc8910 libdraw: get rid of _drawdebug variable 2017-04-29 21:03:52 +02:00
aiju
ca2fa9596b sshfs: add -r and -M options 2017-04-29 18:44:01 +00:00
cinap_lenrek
b4b2cd72b0 cwfs: allow "none" user to rename files 2017-04-29 17:28:35 +02:00
cinap_lenrek
51eaebf4f0 sshfs: don't crash when no /etc/password file could be read on the remote side
in a cygwin environment, theres no /etc/passwd file to
translate numeric uid/gid's. changing passwdparse() to
ignore nil string argument.
2017-04-29 16:25:48 +02:00
aiju
f00488ec70 sshfs: check correctly for directory bits; calculate parent directory correctly 2017-04-28 20:42:38 +00:00
aiju
7cc9d944df sshfs: reset SReq->reqid field to fix double-free of request ids 2017-04-28 18:45:32 +00:00
aiju
5ce3f70f72 sshfs: remove debug print 2017-04-28 18:32:04 +00:00
aiju
825ab5d286 sshfs: don't cache directory contents 2017-04-28 18:21:03 +00:00
aiju
31ff4f925d add sshfs(4) manpage 2017-04-28 17:15:20 +00:00
aiju
11954a19a6 sshfs: look up uid/gid from /etc/^(passwd group) 2017-04-28 16:34:24 +00:00
aiju
562fd5b134 add sshfs 2017-04-28 15:41:48 +00:00
aiju
2a920e7361 ssh: add support for subsystems 2017-04-28 15:41:39 +00:00
cinap_lenrek
522f08e5f1 upas/fs: fix warning about unused Err: label 2017-04-27 20:06:00 +02:00
aiju
66c22f3908 games/md: copy updated cpu.c from blit 2017-04-27 08:46:44 +00:00
aiju
8d3bbf373c add blit(1) manpage 2017-04-27 08:42:41 +00:00
aiju
042f98784a ssh: make number of retries configurable 2017-04-24 23:26:43 +00:00
aiju
ef7b428832 ssh: loop keyboard-interactive on failure 2017-04-24 23:16:59 +00:00
aiju
fbf64184df ssh: fix typo 2017-04-24 16:07:34 +00:00
aiju
f8eb5a1d13 ssh: add "none" method to find out list of acceptable methods 2017-04-24 16:04:09 +00:00
spew
1f6a604c23 libavl: fix documentation 2017-04-24 10:50:03 -05:00
cinap_lenrek
403584715f ssh(1): refer to thumbprint(6) for the sshthumbs file format 2017-04-24 02:21:43 +02:00
cinap_lenrek
42f449b9ce ssh: print the whole ssh-rsa hostkey in base64 when thumb check fails
in addition to the thumbprint, also print the whole
hostkey in base64 (same format as openssh uses) to
make verification easier.
2017-04-24 01:46:22 +02:00
cinap_lenrek
346f5828e0 libsec: sha256 support for thumbprint files, use it in ssh as well
initThumbprints() now takes an application tag argument
so x509 and ssh can coexist.

the thumbprint entries can now hold both sha1 and sha256
hashes. okThumbprint() now takes a len argument for the
hash length used.

the new function okCertificate() hashes the certificate
with both and checks for any matches.

on failure, okCertificate() returns 0 and sets error string.

we also check for include loops now in thumbfiles, limiting
the number of includes to 8.
2017-04-23 19:00:08 +02:00
cinap_lenrek
2d1fbbdafa upas/fs: don't abort on malformed unix header 2017-04-23 18:42:26 +02:00
cinap_lenrek
641c9da369 ssh(1): add $home/lib/thumbfile to FILE section 2017-04-23 03:31:20 +02:00
cinap_lenrek
88cdfe76df ssh: document thumbfile options 2017-04-23 02:59:32 +02:00
cinap_lenrek
da0a7ac387 ssh: implement primitive hostkey verification
this checks $home/lib/sshthumbs for the sha256 hash
of the hosts rsa public key. if its not there, it
prints the rc command to add it and exits.
2017-04-23 02:54:41 +02:00
cinap_lenrek
2b10f79119 ssh(1): add bugs section about host not being authenticated 2017-04-23 01:11:12 +02:00
cinap_lenrek
9574e3908f ssh(1): initial documentation, needs examples for authentication 2017-04-23 00:42:33 +02:00
cinap_lenrek
83d5c827b7 vt: handle underline attribute 2017-04-22 22:52:34 +02:00
cinap_lenrek
f80b35faca merge 2017-04-22 22:21:47 +02:00
cinap_lenrek
13a74150ac vt: handle nocolor flag and reversed background colors 2017-04-22 22:19:17 +02:00
spew
7986722cec merge 2017-04-22 14:28:34 -05:00
spew
6261dcb06b replica: use libavl for avl tree implementation 2017-04-22 14:28:02 -05:00
cinap_lenrek
c029a0c913 vt: handle insert/delete/home/end keys for vt220/xterm 2017-04-22 21:07:53 +02:00
spew
9cf5198145 libavl: lookup can return the closest match 2017-04-22 13:59:37 -05:00
cinap_lenrek
f2b7f24e4e vt: handle application/normal mode (really fixes cursor keys) 2017-04-22 20:16:07 +02:00
cinap_lenrek
b58584b057 merge 2017-04-22 18:21:57 +02:00
cinap_lenrek
5d7a77cf57 vt: fix xterm cursor keys 2017-04-22 18:01:49 +02:00
cinap_lenrek
4340dd1b2f merge 2017-04-22 02:42:16 +02:00
cinap_lenrek
c5b2927250 vt: fix background drawing 2017-04-22 02:41:00 +02:00
mischief
5ef9330b6f nusb/ptp: treat any assocation as a directory
previously nusb/ptp showed only 'generic folder' association type as directories, but all associations work as directories. tested with LG G5/android 7.0
2017-04-21 15:09:50 -07:00
cinap_lenrek
ccdb4fca83 merge 2017-04-21 19:25:25 +02:00
cinap_lenrek
a944c37d68 ssh: actually handle flow control and channel id's 2017-04-21 19:23:56 +02:00
aiju
094fc8b15f fix yacc bug (found by dan cross) 2017-04-21 17:16:44 +00:00
cinap_lenrek
99825e22ed ssh: increase initial window size for better throughput 2017-04-21 01:45:11 +02:00
cinap_lenrek
9b33c34e9b rsa(8): fix description of rsa2ssh (now, ssh2 format only) 2017-04-21 00:23:46 +02:00
cinap_lenrek
882f1c492e ssh: cleanup debug messages 2017-04-21 00:09:30 +02:00
cinap_lenrek
9c50712d64 ssh: do not try authentication methods that we know are not possible 2017-04-20 23:45:56 +02:00
cinap_lenrek
2e714ffe7c ssh: implement password and keyboard-interactive authentication methods 2017-04-20 22:28:21 +02:00
cinap_lenrek
bef681b892 vt: cursoron, don't resize winow when replying history 2017-04-19 22:34:47 +02:00
cinap_lenrek
d566a5ca6b ssh: fix locking, and key reexchange handling
when we initiate re-key exchange we data packets can still
come in. so instead we have everything that can come in all
the time in dispatch() function (including KEXINIT) and have
the receiver process just call that in a loop. exclude dispatch
and the sender proc from corrupting each others sendpkt() calls
with the QLock sl.
2017-04-19 21:03:26 +02:00
aiju
b795a6d9dc blit: always show top-left corner; add tony kaku's -m flag 2017-04-19 10:13:36 +00:00
cinap_lenrek
283a1c0788 vt: but not too fast :-)
if drawing can't keep up with the host, make sure we
eventually redraw the screen and check for user events.
2017-04-19 02:18:28 +02:00
cinap_lenrek
219050cc36 vt: make it fast 2017-04-19 01:46:20 +02:00
cinap_lenrek
db729cbb50 vt: send interrupt on exit, open logfile OCEXEC, run host after environment got exported, send rest of arguments to host 2017-04-18 03:13:15 +02:00
cinap_lenrek
d4cc35f387 ssh: close the channel when vt hangs up 2017-04-18 03:06:39 +02:00
cinap_lenrek
378866d6d1 vt: allow for a bit of buffering 2017-04-18 00:21:51 +02:00
cinap_lenrek
1333b4d14e vt: convert from event to threads
the event library doesnt do any flow control. if the host
keeps sending data while the user is mousing arround,
extract() will collect the data until memory fills up.

so instead we abandon the event library and convert
the program to use channels.
2017-04-18 00:18:03 +02:00
cinap_lenrek
1f3f4cd06b vt: increase history buffer to 64K runes 2017-04-17 05:32:01 +02:00
cinap_lenrek
33991ab9cc ssh: weekend project
manpage should follow...
2017-04-17 05:22:16 +02:00
cinap_lenrek
128783a700 factotum: append public rsa encyption exponent after the modulus
this makes implementing ssh-rsa authentication easier, as we
then can convert the public key directly to ssh format and check
if the server will accept that public key.

tlshand just needs the modulus to see if the public key matches
the one it has from the certificate.
2017-04-17 05:18:24 +02:00
cinap_lenrek
242274f733 rsa2ssh: drop support for version 1 key format 2017-04-17 05:13:46 +02:00
cinap_lenrek
ddc6c16515 vt: implement snarf support 2017-04-17 05:12:07 +02:00
cinap_lenrek
34f5a83330 pc64: state mp.h dependency for archacpi.$O 2017-04-11 02:26:39 +02:00
cinap_lenrek
075e1ddd7d upas/fs: remove imap lastread debounding
its unclear why this was here, waketime logic should handle
this already.
2017-04-09 04:36:47 +02:00
cinap_lenrek
1d94a18e56 upas/fs: fix sync condition
we used to check for mb->d->name != nil before stating, to avoid
stating pop3/imap mailboxes who don't really have a local file,
but this breaks when the md->d is reconstructed (faked) from
the index! resulting in the mailbox stop being refreshed.

the solution is to not have mb->d == nil for imap/pop mailoxes.
2017-04-09 04:32:38 +02:00
cinap_lenrek
35f6a75355 upas/fs: make use of Maxmsg consistent 2017-04-08 23:01:19 +02:00
cinap_lenrek
445d64a387 upas/fs: simplify imap4read() 2017-04-08 23:00:48 +02:00
cinap_lenrek
f14ad276c2 upas/fs: fix dir comparsion and skip directories in mdir, avoid stat
- ignore directories in dirskip()
- use sortkey of 0 for invalid items, otherwise it could confuse qsort()
- use file size from dirreadall() instead of doing stat
- various cleanups
2017-04-08 22:59:15 +02:00
cinap_lenrek
a208a93733 upas/send: use openfolder() to deliver mail to avoid code duplication 2017-04-08 22:52:06 +02:00
cinap_lenrek
fd78f6722e upas/common: deliver mail to mdir as .tmp file and rename after it has been fully written
theres a race condition when mail delivery to mdir is slow,
then upas/fs sees partial mail file and caches the truncated
file size.

to avoid this, delivery will create the new mail file with
the .tmp extension (which is ignored by upas/fs) and after
everything has been written, rename it to the final name.
2017-04-08 22:50:17 +02:00
cinap_lenrek
00fbdd622a kernel: avoid waserror() botch in devwalk (from drawterm, thanks aiju)
calculate alloc flag before waserror(), as compilers like
gcc will not notice the value changing later because
setjump() restores the old value due to callee-saves.

change is applies here to make it easier to merge with
drawterm.

thanks to aiju for debugging this; used to cause drawterm
memory leak until compiled with gcc -O0.
2017-04-05 00:34:07 +02:00
cinap_lenrek
30c05fe3dd kernel: fix memory leak in checkpagerefs() debug function (thanks aiju) 2017-04-04 20:13:31 +02:00
cinap_lenrek
249ff9a24c tlshand: simplify tlsReadN() 2017-04-04 19:01:57 +02:00
cinap_lenrek
de80075fc6 tlshand: fix mpint to bytes conversion, reorganize send/recv buffer, check for overflow in msgSend()
when converting mpint to bytes, always pad it to the size of
the modulus (RSA,DHE,ECDHE). mptobytes() now takes a byte len
parameter which the caller usually calculates from the group
modulus using mpsignif(). this bug sometimes caused "bad record mac"
after the handshake.

use a shared buffer, given that msgSend()/msgRecv() don't overlap
we can use the first half for sending, and the top half for
receiving, shifting down as neccesary. the space beween sendp and
recvp is free.

explicitely check for overflow in msgSend().
2017-04-04 01:59:17 +02:00
cinap_lenrek
02ffb19904 merge 2017-04-03 02:50:36 +02:00
cinap_lenrek
6ff5c10ffb tlshand: fix ECDHE and DHE for SSLv3 2017-04-03 02:48:47 +02:00
aiju
1d891d163e fix typo in 9p(2) manpage 2017-04-03 00:11:40 +00:00
cinap_lenrek
8829d51f50 devvga: remove unused copy of checkport() function 2017-04-02 20:17:44 +02:00
cinap_lenrek
8ea31ae7b2 devvga: fix mistake 2017-04-02 20:10:44 +02:00
cinap_lenrek
a6d852d0a6 devvga: include hwgc in vgactl file 2017-04-02 20:08:15 +02:00
cinap_lenrek
6a1841dce5 aux/wpa: go to background when not prompting, handle open networks 2017-04-02 19:05:56 +02:00
aiju
e09adf5944 pc(1): fix memory leak and add clog() function 2017-04-02 14:47:23 +00:00
cinap_lenrek
e0087b2a78 nusb/lib: make usbcmd() return value symmetic; returning size of data phase (if any) (thanks aiju)
usbcmd() with Rh2d used to return the command size (8+ndata) wile returning
only ndata for Rd2h. this changes it to always return ndata for Rh2d. it
mostly doesnt matter as Rh2d callers only check r < 0 for error, but this
makes the interface symmetic.
2017-04-01 22:19:58 +02:00
cinap_lenrek
25725eb0ad hjfs: avoid 8c "non-interruptable temporary" warning 2017-04-01 15:21:28 +02:00
aiju
089d493d96 chgrp: remove unused function declaration (thanks archeus) 2017-04-01 09:01:26 +00:00
aiju
4175b19c94 games/blit: remove strange debugging line 2017-04-01 08:57:03 +00:00
cinap_lenrek
d801a4f300 ndb/dns: double Maxretries for long cname redirection chains 2017-04-01 03:35:30 +02:00
aiju
9cb67a523f nusb/serial: pl2303: better error handling 2017-03-31 20:20:25 +00:00
cinap_lenrek
330916bfa5 merge 2017-03-30 23:39:03 +02:00
cinap_lenrek
557cbe10ad sdnvme: enable in pcf, pccpuf, pc64 kernel configuration 2017-03-30 23:37:28 +02:00
cinap_lenrek
8cacd2cc0a sdnvme: don't write completion queue doorbell register when nothing has been processed
turns out on real hardware, the front falls off if we write
the completion queue doorbell registers without consuming
an entry. so only write the register when we have processed
something.
2017-03-30 23:33:46 +02:00
spew
0d3c3ba935 hjfs: disable hjfs check until more functionality is complete 2017-03-29 13:54:50 -05:00
spew
3525d2f7a7 hjfs: improve error messaging around blocks that are not found 2017-03-28 23:04:28 -05:00
spew
1c13d41b8c hjfs: Fix bugs in ref count scan check. Enable as a console command (caveat: command arguments will change as I implement more functionality) 2017-03-28 20:39:14 -05:00
cinap_lenrek
e51044884b move blit roms to /sys/lib/blit 2017-03-29 01:33:16 +02:00
cinap_lenrek
5a36451a5e blit: fix mkfile 2017-03-29 01:20:13 +02:00
cinap_lenrek
0c1110ace2 kernel: fix twakeup()/timerdel() race condition
timerdel() did not make sure that the timer function
is not active (on another cpu). just acquiering the
Timer lock in the timer function only blocks the caller
of timerdel()/timeradd() but not the other way arround
(on a multiprocessor).

this changes the timer code to track activity of
the timer function, having timerdel() wait until
the timer has finished executing.
2017-03-29 00:30:53 +02:00
cinap_lenrek
bfae9e08be sdnvme: NVMe controller driver (work in progress)
basic NVMe controller driver, reads and writes work.
"namespaces" show up as logical units.
uses pin/msi interrupts (no msi-x support yet).
one submission queue per cpu, shared completion queue.
no recovery from fatal controller errors.
only tested in qemu (no hardware available).

commiting this so it can be found by someone who has
hardware.
2017-03-29 00:21:35 +02:00
aiju
83dd98022d games/blit: mkfile: install into /bin/games 2017-03-28 19:48:50 +00:00
aiju
447672be5c add games/blit 2017-03-28 19:43:09 +00:00
spew
f14e277c58 hjfs: fix broken dprint 2017-03-27 22:05:53 -05:00
spew
3103efb8b0 hjfs: simplify dprinting 2017-03-27 21:38:12 -05:00
spew
2e64925b91 hjfs: add simple scan check of directory entry blocks 2017-03-27 21:27:45 -05:00
spew
e02bc28aaf hjfs: check: check a block if its ref count is _not_ zero. Also check all the ref counts of blocks of a directory and clean up messages 2017-03-27 17:57:10 -05:00
spew
3edac80327 hjfs: merge start of hjfs check implementation 2017-03-27 09:57:08 -05:00
spew
347bb2a7a7 hjfs: start implementation of checking a directory 2017-03-27 09:55:56 -05:00
cinap_lenrek
f59ef5e8e7 devsd: handle case where theres no ifc->enable() function 2017-03-26 16:53:19 +02:00