Commit graph

3167 commits

Author SHA1 Message Date
cinap_lenrek cad92eedd9 json(2): fix out of order SOURCE heading 2013-12-25 20:09:00 +01:00
cinap_lenrek bb4aba830b devmouse: exclude sroll-wheel buttons from differential button handling
preventing wheel buttons 4 and 5 fron getting stuck
with multiple input devices.
2013-12-25 16:52:55 +01:00
cinap_lenrek 3e8764aef1 acid leak: remove arena pointer a < 0xff000000 check
in the kernel, area can lie above 0xff000000
2013-12-25 15:00:39 +01:00
cinap_lenrek 3f9867c4ce devdraw: fix drawdelname() string memory leak 2013-12-25 14:55:16 +01:00
cinap_lenrek 221129dc30 window: fix various problems, cleanup
with window -m, properly remove the old wsys from /dev before
binding new window to it, so the original window wont leak
into the new namespace.

do not pass -pid when $wsys does not refer to a local running rio.

cleanup environment before running sub-process.

set window label consistentently no matter if -m is used or not.
2013-12-25 01:30:43 +01:00
cinap_lenrek 1059da0066 page: scrollwheel, better backwards scrolling, fix blit bug when page was translated offscreen 2013-12-23 15:38:52 +01:00
stanley lieber 9e021d9230 /sys/lib/plumb/basic: add commas to some rules for file names that will frequently contain commas 2013-12-22 14:56:04 -05:00
cinap_lenrek 66f86d03a5 fshalt: rfork n to avoid limbo namespace when the command fails 2013-12-22 17:26:31 +01:00
cinap_lenrek 5fbc2ea9ce merge 2013-12-21 18:06:24 +01:00
cinap_lenrek 5dae7fcc68 add plumbing rules for page bookmarks and audio playback 2013-12-21 18:04:50 +01:00
cinap_lenrek 48d2f14f80 page: implement bookmarks (thanks trav_ for starting it)
add new functions pageaddr() that returns a string describing
the page to be loaded. it is in the form of:

/path/to/file!pagename!subpage!....

one can jump to such a page by calling trywalk(name, addr)
where name and addr get concatinated with ! to form a page
address and then the currently loaded pages are walked up
to the nearest page which is then returned. (or nil when
not found). the remaining address will be set in the global
pagewalk variable.

once pages get loaded (asynchronously), pagewalk1() gets
called again on addpage() and continues the walking up to the
last page.

new program flag -j <addr> was added to jump to a page on
startup.

page address (without filename) can also be supplied in
plumb message with the "addr" attribute.
2013-12-21 18:04:14 +01:00
stanley lieber 190653f049 fortunes: What an amazing year for the Web. 2013-12-19 15:08:28 -05:00
stanley lieber 9b03130bb9 json(2): fix spelling error 2013-12-19 14:59:50 -05:00
cinap_lenrek 803bc88a5f add medium to low quality json(2) manual page 2013-12-19 19:56:04 +01:00
cinap_lenrek 56300f72e8 rio: dont consider shell characters as part of the filename for auto completion
rio looks backwards in the line for the beginning of a filename
that needs to be completed with ^F. this change makes the
characters: =, ^, ( and { stoppers, so filename completion
will work in all these cases:

foobar=/foo/ba^F; for(i in (fo^F ba^F)){/bin/baz^F

this means completion will not work for prefixes having these
special characters in them.

thanks to burnzez for bringing it up.
2013-12-19 18:12:16 +01:00
cinap_lenrek 0866d65f8e acid leak: handle ALIGN_MAGIC padding of skip area for mallocalign()
the alloc and realloc tag words do not start at the beginning of
a block created by mallocalign(). instead, the block is padded
with ALIGN_MAGIC.
2013-12-17 15:40:12 +01:00
cinap_lenrek 65f426c0bd pool: update debug log format string for poolallocalign() 2013-12-17 15:32:48 +01:00
cinap_lenrek 6e2bea734b devether: fix spelling mistype 2013-12-17 12:48:17 +01:00
cinap_lenrek f3f89e03ed ether82598, ether82563: remove packblock() avoidance hack 2013-12-16 21:47:06 +01:00
cinap_lenrek ce5f9d8210 etheryuk: fix problems with yukon2 ep+ rev0, deoptimize 2013-12-16 21:39:22 +01:00
cinap_lenrek ea6fea596b devether: remove qfull prints and fix loopback packet handling of etheroq()
dont spam the console with qfull warnings. this makes things worse.

handle loopback packets as stated in the comment. we call etheriq()
with fromwire=1 for loopback packets so etheriq() can pass the packet
on (without copying) or free it. dont inhibit interrupts while calling
etheriq(). etheriq() can safely be called from process and interrupt
context. it is unclear what this was supposed to fix and testing didnt
seem to have any odd effects.
2013-12-16 19:19:15 +01:00
cinap_lenrek 6946118644 devssl: use parsecmd() to process control message to get rid of 128 byte stack buffer limit
(11:02:29 PM) me: why is buf in /sys/src/9/port/devssl.c:/^sslwrite only 128 bytes?
 (11:02:58 PM) me: it makes it so you can't use a 128 bytes secret as negotiated by infauth in a secretin or secretout ctl message
 (11:03:30 PM) me: which in turn means you can't use such a secret with pushssl(2)
 (11:06:15 PM) me: inferno's sslwrite is limited to 32 bytes, but its ssl library writes to the secret files instead of to the ctl file
 (11:08:50 PM) mischief: what should it be instead of 128 bytes
 (11:08:58 PM) me: larger
 (11:09:16 PM) mischief: how about 129 bytes?
 (11:09:59 PM) me: also broken in 9front, by the way
 (11:15:14 PM) me: i guess it should be replaced with parsecmd
2013-12-16 10:06:34 +01:00
cinap_lenrek 35484945e2 exportfs: get rid of limits, cleanup
get rid of the service buffer limit. keep service buffers
on a global freelist protected by lock.

dont fatal when we hit the process limit. instead, just
abort the rpc with an error.

handle rendezvous() interrupts.
2013-12-15 07:49:53 +01:00
Matthew Veety 7d001bd2b2 god damn it forgot fucking fns.h from my last commit 2013-12-13 02:24:15 -05:00
Matthew Veety 9c52f4d9d4 Added in /dev/cputemp for bcm kernel (Thanks Krystian!) 2013-12-13 02:20:29 -05:00
cinap_lenrek 91e9d7466f cifs(4): fix documentation for -d flag 2013-12-11 06:48:02 +01:00
cinap_lenrek 3c8db40def factotum: add ntlmv2 (mschap2) client auth for cifs 2013-12-11 05:48:48 +01:00
cinap_lenrek 71dbddef16 draw: fix drawing of replicated source image on memlayer with a clip rectangle
when a replicated source image with a clipr with clipr.min > Pt(0, 0),
drawclip() would properly translate the src->clipr on the dstr
but then clamp the source rectangle back on src->r.

while traversing down multiple layers, this would cause the translation to
be applied multiple times to the dst rectangle giving the wrong image result.

this change adds a new drawclipnorepl() function that avoids the clamping
of source and mask rectangles to src->r and mask->r. this is then used in
libmemlayer.

the final memimagedraw() call will call drawclip() which will do the final
claming.

a testcase is provided:

#include <u.h>
#include <libc.h>
#include <draw.h>

Image *blue;
Image *red;

void
main(int, char *argv[])
{
	Image *i;

	if(initdraw(nil, nil, argv[0]) < 0)
		sysfatal("initdraw: %r");
	i = allocimage(display, screen->r, screen->chan, 1, DWhite);

	red = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DRed);
	blue = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DPaleblue);
	replclipr(red, 1, Rect(10, 10, 110, 110));
	replclipr(blue, 1, Rect(11, 11, 111, 111));

	/* draw on non-layer, works correctly */
	draw(i, i->r, red, nil, ZP);
	draw(i, i->r, blue, nil, ZP);
	draw(screen, screen->r, i, nil, i->r.min);
	flushimage(display, 1);

	/* draw on (screen) layer is too far to the right */
	draw(screen, screen->r, red, nil, ZP);
	draw(screen, screen->r, blue, nil, ZP);
	flushimage(display, 1);

	for(;;){
		sleep(1000);
	}
}
2013-12-09 03:35:01 +01:00
cinap_lenrek 193e55b88c cifs: fix compiler warning 2013-12-08 08:38:44 +01:00
cinap_lenrek 007520e3fe handle NIL user domain, and Z(4) at end of nt blob for ntlmv2
the nt blob ends with 4 zero bytes, this is not the same as
the EOL av-pair terminator!

this makes ntlmv2 work with windows xp with LmCompatibityLevel = 3
2013-12-08 08:34:31 +01:00
cinap_lenrek c940e98630 experimental ntlmv2 server authenticaion support for cifsd
extending factotums and the auth servers mschap implementation
to handle variable length NT response for NTLMv2.

fix some minor bugs.

only tested with cifs so far.
2013-12-08 02:22:12 +01:00
cinap_lenrek d7f90a9096 kernel: simplify pexit(), avoid making wait record for RFNOWAIT (parentless) procs
replaced the p->pid != 0 check with up->parentpid != 0 so
p->pid == up->parentpid is never true for p->pid == 0.

avoid allocating the wait records when up->parentpid == 0.
2013-12-07 08:25:26 +01:00
cinap_lenrek 7761128093 devproc: make sure /proc/n/wait waits for the right process children
theres a race when we wait for a process children and that
process exits before we sleep().
2013-12-07 07:17:32 +01:00
cinap_lenrek 4fd55abb8e kernel: fix pexit() Waitmsg memory leak.
when a process got forked with RFNOWAIT, its p->parent will still
point to the parent process, but its p->parentpid == 0.

this causes the "parent still alive" check in pexit to get confused
as it only checked p->pid == up->parentpid. this condition is *TRUE*
in the case of RFNOWAIT when the parent process is actually dead
(p->pid == 0) so we attached the wait structure to the dead parent
leaking the memory.
2013-12-07 05:38:31 +01:00
cinap_lenrek e2da074d28 gif: remove warning when animated gif is rendered to bitmap 2013-12-07 00:53:01 +01:00
cinap_lenrek 66cc2fa960 mothra: remove debug code, dont create $home/lib/mothra/mothra.err file 2013-12-07 00:51:19 +01:00
stanley lieber a989f89f3e etheriwl.c: add did 4232 for intel wifi link 5100 (thanks, hmr) 2013-12-06 09:43:52 -05:00
cinap_lenrek 6e1c833585 libthread: avoid calling thread waiting for fork/execed process to finish if we dont have to
we do not need to wait for fork/execed program to finish when
not collecting waitmsg. this reduces the number of rio
processes hanging arround for each window shell just waiting
for it to terminate and then dumping the waitmsg.
2013-12-06 05:03:35 +01:00
cinap_lenrek f6887b0a3c telnet: simplify previous change by moving the notkbd check into consctlcmd() 2013-12-05 22:43:44 +01:00
cinap_lenrek 5c000bbe63 cpu: add -n flag for the remote site to allow "none" authentification method (inspired from sources cpu-noauth patch) 2013-12-05 22:39:43 +01:00
cinap_lenrek 919863dab3 telnet: disable changing raw mode when a pipe was being used (from sources telnet-notkbd patch)
This patch corrects a minor problem with telnet when using
the notkbd option (-n).
2013-12-05 22:05:57 +01:00
cinap_lenrek ad3ba8838d ndb/dns: check bad name length in convM2DNS.c:^gname() 2013-11-28 23:47:49 +01:00
cinap_lenrek b77eda8fc7 u9fs: fix misuse of Fcall.afid in p9any authentication module. (from sources patch/u9fs-afid)
U9fs(4) misuses Fcall.afid in its p9any authentication module.

The afid field of Fcall structure is only valid with Tauth or Tattach.
Tread, Twrite, Tclunk should use rx->fid instead.  It's been lucky so
far to get the job done because rx->afid survives from previous
Tauth/Tattach.  The issue pops up when several authentications happen
concurrently.

Test case:
	u9fs = 'host with u9fs on tcp!*!564'
	9fs $u9fs; for(i in 1 2 3 4 5 6 7 8){ 9fs $u9fs & }; wait
Should:
	no errors
Should not:
	mount failed: authentication failed
2013-11-28 23:06:03 +01:00
cinap_lenrek da6a10c417 ndb/dns: do dnresolve() loopcheck only on hosts that we havnt already tried
we might get a unreachable nameserver ip from a parent
nameserver. if the remaining set of nameservers does not
loop, we should try to resolve them.

so skip the loopcheck for nameservers already tried.
2013-11-26 22:31:23 +01:00
stanley lieber 82defc8152 theo: Don't like it? Then walk away. 2013-11-24 22:11:46 -05:00
cinap_lenrek 0ef4ecc7aa faces: use 9front icon for googlecode.com/plan9front 2013-11-25 23:22:05 +01:00
cinap_lenrek 707698ce10 abaco: make validurl() accept internationalized domain names
validurl() is just used to check if the string is a full
absolute url with a protocol scheme. we do not have to
match the host part *exactly*, only if there is *something*
in the hostpart.
2013-11-25 23:04:06 +01:00
cinap_lenrek 1561f0c4ea webfs: preserve unicode hostname, only convert to ascii when sending over the wire
we'd like to keep Url.host in unicode for factotum key
lookup. only when we send the url in a request, we have
to convert it to ascii.
2013-11-24 21:28:48 +01:00
cinap_lenrek f2bd1de5bd webfs: support for internationalized domain name urls 2013-11-24 11:56:33 +01:00
cinap_lenrek 3720b5ab9c ndb/dns: add support for internationalized domain names 2013-11-24 11:55:26 +01:00