Commit graph

1862 commits

Author SHA1 Message Date
ftrvxmtrx fb1551e997 libvorbis: update to 1.3.5 2016-03-10 22:43:00 +01:00
cinap_lenrek 3e52ada202 merge 2016-03-10 19:03:28 +01:00
cinap_lenrek 51115b9214 aan: handle case when reader closes netfd
when netfd is closed and set to -1 by the fromnet()
reader proc, handle it like network failure and try
reconnecting.
2016-03-10 18:50:29 +01:00
cinap_lenrek 9dc9c6c5ef rio, libdraw: experimental removal of redundant flushimage() calls for roundtrip latency reduction
- remove redundant flushimage() calls before readmouse()
- remove flushimage() calls for allocimage(),freeimage() and originwindow()

this is experimental. it will break allocimage() error handling unless the
caller does explicit flushimage() calls, tho the gains
in usability over high latency connections is huge. in most cases, programs
will just terminate when encountering these errors.
2016-03-08 16:45:29 +01:00
cinap_lenrek bf6ba56817 aan: use sync messages as keep alives
both server and client need to be convinced that the connection
is broken for a connection reestablishment to happen as the server
will only start looking for incoming clients when the connection
already broke. so use the 8 second interval sync messages
to check for connection lifeness. if we miss two syncs in time,
we declare the connecton to be broken and will try to reconnect.
2016-03-07 20:27:34 +01:00
cinap_lenrek 481ae71940 vncs: fix dead Kend key 2016-03-07 19:20:05 +01:00
ftrvxmtrx ba2c2fcab7 libFLAC/mkfile: -DFLAC__NO_ASM 2016-03-05 11:00:00 +01:00
ftrvxmtrx 2d2ffac86f libFLAC: update to 1.3.1 2016-03-05 10:32:47 +01:00
BurnZeZ 897da507f4 auth/pemencode: fix usage() 2016-03-01 21:27:37 -05:00
BurnZeZ c6aa11d04e dict: similar fixes, different files. also remove runescpy 2016-03-01 21:24:35 -05:00
BurnZeZ 2a5b2f4c76 dict mkindex: code cleanup
handle malloc failure
check if open failed _before_ seeking
better arg handling
2016-03-01 21:21:06 -05:00
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
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 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 a1fa3d75d8 ndb/dns: removing the buggy /net.alt remount hack 2016-02-16 19:06:54 +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 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 24150b1171 tlssrv: add -A flag to skip changing user after authentication (usefull for aan) 2016-02-13 17:24:59 +01:00
cinap_lenrek c3867623ae rio: fix wrong frame colors when moving non-current window
When a window is moved or reshaped, that implicitely tops
the window and makes it current. The conseqence of this
is that we always have to redraw the window as if it where
a current window in any case. This was handled for Reshaped
windows, but not when the window was just moved. We now
handle both cases the exact same way, getting rid of the
Moved wctl message.
2016-02-13 16:36:24 +01:00
cinap_lenrek 3d20565a78 webfs: faster shutdown using postnote()
when the 9p end is closed, post a note to our private note
group to shoot down http procs. this results in quicker
release of namespace resources.
2016-02-08 19:35:26 +01:00
cinap_lenrek faecd86ee6 factotum: fix nil pointer crash on p9skclosekey(), thanks k0ga
oversight, closekey is called again even if addkey failed, which
will have Key.priv nil.

stack trace:

 memset(data=0x0,n=0x1f8)+0x58 /sys/src/libc/arm/memset.s:40
 p9skclosekey(k=0x55358)+0x18 /sys/src/cmd/auth/factotum/p9sk1.c:493
 closekey(k=0x55358)+0x7c /sys/src/cmd/auth/factotum/util.c:247
 ctlwrite(a=0x552f8,atzero=0x0)+0x320 /sys/src/cmd/auth/factotum/rpc.c:503
 fswrite(r=0x53b78)+0x1b0 /sys/src/cmd/auth/factotum/fs.c:574
 swrite(r=0x53b78,srv=0x423e8)+0x134 /sys/src/lib9p/srv.c:559
 srvwork()+0x2a4 /sys/src/lib9p/srv.c:746
 srv(srv=0x423e8)+0xcc /sys/src/lib9p/srv.c:825
 postproc()+0x3c /sys/src/lib9p/post.c:120
 rforker(flag=0x1,fn=0x39f98,arg=0x423e8)+0x34 /sys/src/lib9p/rfork.c:16
 _postmountsrv(s=0x423e8,name=0x0,mtpt=0x46f70,flag=0x1)+0xb8 /sys/src/lib9p/post.c:27
 postmountsrv(name=0x0,mtpt=0x46f70,flag=0x1)+0x20 /sys/src/lib9p/rfork.c:32
 main(argv=0x1fffff9c,argc=0x0)+0x23c /sys/src/cmd/auth/factotum/fs.c:157
 _main+0x28 /sys/src/libc/arm/main9.s:19
 acid: /sys/src/cmd/auth/factotum/p9sk1.c:493
2016-02-06 22:26:29 +01:00
cinap_lenrek cc8e8c978c tlssrv: p9any authentication support using TLS-PSK cipher suits 2016-02-01 22:49:20 +01:00
cinap_lenrek a291bbdedd libsec: ecdsa client support for tlshand, cleanups 2016-02-01 21:34:49 +01:00
cinap_lenrek 0bfac109a4 mpc: constant expression folding 2016-02-01 19:27:57 +01:00
cinap_lenrek 5243969ba2 ndb/dnstcp: -x specifies the mountmoint 2016-01-12 08:53:06 +01:00
cinap_lenrek 772afbe98c format pointer subtraction results with %zd instead of %ld (for long -> intptr on amd64) 2016-01-07 04:44:13 +01:00
cinap_lenrek 9c99d0c8d3 6c: return vlong result for pointer subtraction 2016-01-07 04:40:47 +01:00
cinap_lenrek 3e38194d72 introduce signed intptr and %z format modifier for formating uintptr and intptr 2016-01-07 04:39:09 +01:00
cinap_lenrek 59245c73f0 venti/fixarenas: more %z -> %Z 2016-01-07 03:38:07 +01:00
cinap_lenrek 9a337f8dfc venti/fixarenas: replace %z fmt with %Z 2016-01-07 02:27:00 +01:00
cinap_lenrek 094f0c9601 rx: theres no p9sk2 anymore 2016-01-06 06:00:22 +01:00
cinap_lenrek 4cf801b853 add missing /sys/src/cmd/auth/lib/private.c 2016-01-06 03:58:04 +01:00
cinap_lenrek 2dae1ed53a auth: release dp9ik implementation and reentrant factotum 2016-01-06 03:09:00 +01:00
cinap_lenrek dd8908cff0 fdisk: properly convert byte units K,M,G and T to cylinders/sectors
the shared command language assumed 512 byte sectors, which is
not the case for fdisk as it uses cylinders for the block unit.
so we introduce an extra argument in the Edit structure and
parseexpr() function so byte sizes are properly converted to
the block unit when the K,M,G and T postfixes are used.
2016-01-05 03:57:50 +01:00
cinap_lenrek 263b0e34b2 mpc: use new strtomp() c-style prefixes to parse integer constants 2016-01-04 18:35:04 +01:00