Commit graph

5289 commits

Author SHA1 Message Date
BurnZeZ 33131a98b9 plot: handle create() failure 2016-03-01 19:40:14 -05:00
BurnZeZ 9d1e80cbbb map/libmap: remove unused function/definitions 2016-03-01 19:36:24 -05:00
BurnZeZ dacebbb2e7 vt: add -r flag to start in raw mode 2016-03-01 19:17:54 -05:00
BurnZeZ db509b8466 sort: code cleanup 2016-03-01 19:09:40 -05:00
BurnZeZ f0744bae5e cc: populate the flag list comment in lex.c
This way the various compiler flags are documented
somewhere, even if not in full.

Also fixed a typo. 'r' should have been 'R'
2016-03-01 19:00:41 -05:00
BurnZeZ edec6e6a70 cc: sort the lex.c comment listing debug flags 2016-03-01 18:12:04 -05:00
cinap_lenrek 7314601f9d pppoe: Avoid double free (thanks k0ga)
k0ga reports:

Hello,

While I was setting my pppoe conexion with my ISP
I discovered several problems in ip/pppoe. I used
the command line ip/pppoe -A '' ether0 and I got
this:

...
dropping unwanted pkt: wrong ac name
panic: D2B called on non-block dc10 (double-free?)
note rcved: sys: trap: fault read addr=0x0 pc=0x000066e1
pppoe 1013: suicide: sys: trap: fault read addr=0x0 pc=0x000066e1
cpu% acid 1013
/proc/1013/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: stk()
abort()+0x0 /sys/src/libc/9sys/abort.c:6
ppanic(p=0xd1b8,fmt=0xc7f9)+0x146 /sys/src/libc/port/malloc.c:166
D2B(p=0xd1b8,v=0xdc10)+0x57 /sys/src/libc/port/pool.c:926
poolfreel(v=0xdc10,p=0xd1b8)+0x20 /sys/src/libc/port/pool.c:1152
poolfree(p=0xd1b8,v=0xdc10)+0x3b /sys/src/libc/port/pool.c:1287
free(v=0xdc18)+0x23 /sys/src/libc/port/malloc.c:250
clearstate()+0x1b /sys/src/cmd/ip/pppoe.c:328
pppoe(ether=0xdfffefc1)+0x123 /sys/src/cmd/ip/pppoe.c:426
main(argv=0xdfffefa0,argc=0x1)+0x89 /sys/src/cmd/ip/pppoe.c:100
_main+0x31 /sys/src/libc/386/main9.s:16
acid:


clearstate() is called in pppoe.c:424, and it frees acname and sets it
to nil.  pktread() is called in pppoe.c:434 with parameter wantoffer,
which frees acname again in line pppoe.c:360 but doesn't set it to
nil, so clearstate() makes a double free in the next iteration.
2016-03-01 23:54:37 +01:00
BurnZeZ 4f2bf182bf fix /lib/keyboard spacing 2016-03-01 17:30:42 -05:00
BurnZeZ 9262c3f346 add a couple runes to /lib/keyboard 2016-03-01 17:29:38 -05:00
BurnZeZ d491a0ae04 add bug to yesterday(1), fix /sys/man/3/cons permissions 2016-03-01 15:27:39 -05:00
BurnZeZ 63abfb5056 manpage references/typos 2016-03-01 15:24:07 -05:00
cinap_lenrek 169bfb4610 libsec: fix verifyDHparams() for version <= TLS1.1
for version <= TLS1.1, there is no sigalg field in the ServerKeyExchange
message and the signature digest algorithm is fixed to md5+sha1 and we
only support RSA signatures (TLS1.1 doesnt know about ECDSA).
2016-03-01 11:30:01 +01:00
cinap_lenrek bb81a10687 glenda's default profile: remove /n/other mount, done by /lib/namespace 2016-02-29 00:25:14 +01:00
cinap_lenrek e3434eb5fb authsrv(2): document _asgetpakkey(), authpak_hash(), authpak_new(), authpak_finish() 2016-02-28 23:23:05 +01:00
cinap_lenrek 02dce7a2e4 games/doom: handle allocimage() failure 2016-02-28 11:44:53 +01:00
cinap_lenrek 4a92397236 libsec: have 16 32-bit words in DigestState to avoid out of bounds warnings for poly1305 2016-02-28 09:09:41 +01:00
cinap_lenrek 5ebb1a29d8 devdraw: remove unused Edepth[] 2016-02-28 03:06:42 +01:00
cinap_lenrek 75186be2c2 libdraw: remove unused static log2[] array 2016-02-28 01:38:29 +01:00
cinap_lenrek e02b986a80 rio: exit rio when /dev/cons or /dev/kbd read loop terminates 2016-02-27 02:39:45 +01:00
cinap_lenrek 09b250f079 kbdfs: read outer /dev/kbd file and use it just like /dev/kbdin
this allows running kbdfs under kbdfs :-)

going use this in new drawterm. drawterm provides the initial
/dev/kbd, but only sends rune up/down messages (keeps it simple).
the servers kbdfs reads that and exports itself the full
set of files, similar to what we do in vncs. this also
provides note processing.
2016-02-27 02:36:54 +01:00
cinap_lenrek e95f557ba5 rcpu: post hangup note to remote when connection breaks
when the cat that forwards notes on the remote exits,
send a hangup note so processes wont keep hanging arround.
2016-02-27 02:08:00 +01:00
cinap_lenrek f2ddc5f813 rcpu(1): fix manpage reference 2016-02-22 23:26:35 +01:00
cinap_lenrek 59ef622240 libauthsrv: can write p = 2^448 - 2^224 - 1 now, as mpc has constant folding. 2016-02-22 22:56:55 +01:00
cinap_lenrek f43a5c825c libfis: dont reject drives lacking SSP (sata ssd connected to ide with adapter) 2016-02-22 22:53:19 +01:00
cinap_lenrek b31cc134e7 ndb/dns: initialize unknown fids to point to the root qid
the dns file service can be restarted, which causes it to forget
all fid state. given the simple file system structure of the dns
service (just a single dns file), we can assume that rpcs
on a unknown fid refers to the root, so the mountpoint will stay
valid and /net/dns can be reopend avoiding the need for a remount
of the dns service after restart.
2016-02-22 22:44:01 +01:00
cinap_lenrek 258fe87faf rc: terminate rc when exec fails, cleanup
The execexec() function should never return, as it irreversably changes
the filedescriptor table for the new program. This means rc's internal
filedesciptors for reading the script get implicitely closed and we cannot
continue the rc interpreter when Execute() fails. So Execute() now sets the
error status, and execexec() runs Xexit() in case Execute() returns.
2016-02-22 22:25:21 +01:00
cinap_lenrek a9639c6894 smtpd: remove unused lastsender logic 2016-02-22 21:55:41 +01:00
cinap_lenrek 95d6ca9f3c factotum: fix memory leak for p9any key confirmation, fix key handling for role=client
when we look up role=speakfor key and askforkeys is set, the
findkey() can return RpcNeedkey, which causes us to skip the
query for a role=client key. Instead, we now check for the
return value != RpcOk (and != RpcConfirm which we want to
handle the same for both queries).

we have to free the attribute lists when returning RpcConfirm.
2016-02-22 20:55:51 +01:00
cinap_lenrek 4410517b44 stats: use rimport or import to mount remote system 2016-02-22 19:38:01 +01:00
cinap_lenrek 046e0ee259 exportfs: fix endless loop for eof/error on second read in localread9pmsg()
the ini buffer was not reset when we got eof in the message
body read causing a endless loop. instead of defining our
own read9pmsg() function, just handle the first read specially
when we consumed the first 4 bytes for the "impo" protocol
escape check.
2016-02-21 20:11:04 +01:00
cinap_lenrek 688c1f15cd fix ipv6 icmphostunr() locking and memory free bugs (from sources) 2016-02-21 16:36:41 +01:00
cinap_lenrek 9d30cabbaf sgi: add chmod to bootfs.proto for sgi kernel 2016-02-20 16:39:52 +01:00
cinap_lenrek e1633ed338 libsec: remove unused tlsSecKill() 2016-02-19 09:14:09 +01:00
cinap_lenrek 0cad8a59ed libsec: fix memset() size in tlsConnectionFree(), remove #include <bio.h> 2016-02-18 18:42:04 +01:00
cinap_lenrek 7f2599254a libsec: add libc.h include for aes_xts.c (drawterm) 2016-02-17 18:50:23 +01:00
stanley lieber e5ead1a980 rcpu(1) man page: english 2016-02-16 20:53:21 -05:00
cinap_lenrek a1fa3d75d8 ndb/dns: removing the buggy /net.alt remount hack 2016-02-16 19:06:54 +01:00
cinap_lenrek c9d2fecbd0 usbuhci: removing "uhci bug" print spam from interrupt handler
this code was if(0) for a long time due to wrong parentesis,
fixed parentesis cause print spam on some machines making them
unusage (kenji okomoto). removing the check alltogether.
2016-02-16 08:52:33 +01:00
cinap_lenrek 86dfd3cf16 provide rcpu(1), make usage line consistent 2016-02-15 17:30:56 +01:00
cinap_lenrek b450cb7e32 devmnt: deal with partial response for Tversion request in mntversion() 2016-02-15 01:03:44 +01:00
cinap_lenrek 61dea9012e cron: just run /bin/rx to execute remote commands 2016-02-14 05:59:42 +01:00
cinap_lenrek 373723d4f6 rx: rcpu service support 2016-02-14 05:37:55 +01:00
cinap_lenrek fde5906b30 adding experimental rcpu service
this is a reimplementation of cpu and import utilities in rc using a tlsclient
and tlssrv as the encryption and authentication layers. there is only one new
service, which after authentication and encryption setup accepts an arbitrary
rc script over the network and executes it with the standard filedescriptors
redirected to the conversaion (this is *after* authentication and in the
context of the authorized user).

the new rcpu program has a few improvements over cpu(1):

- doesnt mangle program arguments
- the remote process will get the clients standard file descriptors, so error
  and output are separated and you can consume the clients input from the
  remote side :-)
- forwards error status of remote process

theres no backwards mode for rimport, but a new program called rexport
for the same purpose.

all these services use exportfs without the bolted on initial handshake,
so the hope is to clean up exportfs in the future and remove all the ugly
crap in there.
2016-02-14 05:18:33 +01:00
cinap_lenrek 4fe7daeca4 exportfs: retry execing ourselfs as "/bin/exportfs" (argv0 might be relative path) 2016-02-14 04:49:48 +01:00
cinap_lenrek 232a064f3a exportfs: properly reply to chdir() error when we speak 9p
when we got a bad root tree, we should speak the right language
and return a Rerror response instead of crapping ascii into
the 9p conversation.
2016-02-14 04:48:48 +01:00
cinap_lenrek a9b1e990b8 tlsclient: add -o option to establish connection over a file, free the AuthInfo structure to avoid leaking secrets 2016-02-14 02:06:08 +01:00
cinap_lenrek 9ec9a47789 newuser: /n/other now handled in /lib/namespace 2016-02-14 01:52:51 +01:00
cinap_lenrek ecebba779f provide /n and /mnt early in bootrc to allow consistent use in /lib/namespace
theres a bootstrap problem:

when /bin/init is run, it processes /lib/namespace where we might want to
mount or bind resources to /n or /mnt. but mntgen was run later in
cpurc/termrc so these mounts would be ignored.

we already have mntgen in bootfs, so we can provide these mountpoints early.

i keep the termrc/cpurc mntgens where they are, but ignore the error
prints. this way old kernels will continue to work.
2016-02-14 01:42:32 +01:00
cinap_lenrek 24150b1171 tlssrv: add -A flag to skip changing user after authentication (usefull for aan) 2016-02-13 17:24:59 +01:00
cinap_lenrek 3b835a1d23 merge 2016-02-13 16:43:15 +01:00