Commit graph

109 commits

Author SHA1 Message Date
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 46bbeea040 snoopy: fix timestamps for pcap files (thanks BurnZeZ)
the pcap files produced by snoopy had the wrong timestamps because it expected:

/* magic=0xa1b2c3d4 */
ulong ts_sec;	/* seconds*/
ulong ts_usec;	/* microseconds */

but we wrote:

uvlong ts;		/* nanoseconds */

now, we write:

/* magic=0xa1b23c4d */
ulong ts_sec;	/* seconds */
ulong ts_nsec;	/* nanoseconds */
2015-12-23 02:00:09 +01:00
glenda c4fdc6bfdb fix fuckup 2015-08-25 09:35:10 +00:00
mischief 6b402b83cf import E script from bell labs 2015-08-25 02:07:46 -07:00
cinap_lenrek 0d93e2fe70 snoopy: dont rely on atoi() being able to parse hex 2015-08-03 14:58:41 +02:00
cinap_lenrek ab4b7c2573 ip/httpfile: fix flushes, fix concurrent reads, set error string
Tflush handling was wrong, we cannot respond to the old
request if we have not actually removed the req from the
in progress block queue.

when reads are issued concurrently, we have to set b->len
before the block is inserted into the inprogress list.
otherwise findblock() is unable to find it and no requests
can be queued on the block. this caused the same offset
to be downloaded multiple times.

set the errstr in getrange() so in case of an error, we dont
get some random previous error string.
2015-07-23 03:24:39 +02:00
cinap_lenrek 41372f346a httpfile: fix evictblock() so we wont consume all the memory 2015-07-13 05:51:04 +02:00
cinap_lenrek 1d5a2aa487 tftpd: count only options we understand so we wont send empty oack message 2015-07-11 02:35:49 +02:00
cinap_lenrek 036ae2e397 cifsd: smbrename is still ok when file is readonly (fixed git) 2015-06-10 17:18:31 +02:00
mischief a94a8a06de revert httpd log file goof 2015-05-20 18:16:54 -07:00
mischief a1bbf39c34 ip/httpd: fix syslog file 2015-05-20 15:38:56 -07:00
cinap_lenrek 4d0343c9d2 dhcpd: ignore ";" filename from sgi arcs bootp(); command 2015-03-18 19:52:31 +01:00
cinap_lenrek 757354dac6 imap4d: simplify auth code using encodefmt(), use readn() to get multiple of 3*18 in base64 input buffer 2015-03-12 17:29:17 +01:00
mischief a4650bdf83 ip/ipconfig: set ndb database file with -f argument 2015-01-10 11:27:45 -08:00
cinap_lenrek 7f5f69ebb5 socksd: revert back, previous commit broke UdpAssociate request
should probably figure out a better way to get public ip
address on a interface.
2014-12-26 11:41:53 +01:00
cinap_lenrek de349cf9b0 socksd: dont use myipaddr() for announcing address 2014-12-26 09:11:04 +01:00
mischief ee2d30984f ip/ipconfig: treat /32 mask as /0
some dhcp servers send a mask of 255.255.255.255 to indicate the gateway is directly routeable.

thanks to david du colombier for this patch.
2014-12-08 17:27:40 -08:00
cinap_lenrek c79dc3263e httpfile: use webfs, fix 9p flushes
we can improve performance alot by using webfs which
does http keep alives for us, so connection setup
overhead is eleminated.

fix 9p flushes and double frees.
2014-11-12 12:03:51 +01:00
cinap_lenrek 797cc13c70 fix dangerous werrstr() usages
werrstr() takes a format string as its first argument.
a common error is to pass user controlled string buffers
into werrstr() that might contain format string escapes
causing werrstr() to take bogus arguments from the stack
and crash.

so instead of doing:
	werrstr(buf);

we want todo:
	werrstr("%s", buf);

or if we have a local ERRMAX sized buffer that we can override:
	errstr(buf, sizeof buf);
2014-11-07 12:51:59 +01:00
cinap_lenrek 840ade48c4 fix syslog() use with linefeeds for various programs 2014-10-29 17:29:09 +01:00
cinap_lenrek 7f295c2055 telnetd: let the kernel place the shared segment in segattach() (thanks kenji arisawa) 2014-09-14 21:20:13 +02:00
cinap_lenrek a49ddece8b ip/ayiya: experimental anything in anything tunnel protocol client
this is a work in progress implementation of the ayiya (anything
in anything) protocol as used by sixxs.net. hiro tested it and it
worked for him, but progress has stalled as sixxs.net rejected my
request for an account and ignored my emails since.
2014-09-06 22:59:58 +02:00
cinap_lenrek 7996878864 ipconfig: remove sleep() left over from debug :-) 2014-08-27 01:41:02 +02:00
cinap_lenrek 46b8a0ac00 ipconfig: fix readipifc() memory leaks in recvra6 and sendra6 processes
to avoid continuously leaking memory in recvra6 and sendra6
processes, pass the previous Ipifc* pointer to readipifc().
2014-08-27 01:12:42 +02:00
cinap_lenrek 7ad08a8515 ipconfig: cleanup code duplication in ip6cfg() 2014-08-26 21:09:57 +02:00
cinap_lenrek dbf165e1bd ping: don't spin when we get error reading icmp connection, print error and sleep 2014-08-26 21:07:59 +02:00
cinap_lenrek 7ae4e473da ftpfs: dont convert names to latin when string is valid utf-8 2014-08-02 14:37:16 +02:00
cinap_lenrek cc001c31a7 tftpfs: make sure path is null terminated 2014-07-13 01:17:48 +02:00
cinap_lenrek 4b7b1218bf ftpd: dont skip unmountnet() and return proper error string from dialdata() 2014-07-13 01:03:17 +02:00
cinap_lenrek e14eaacce6 tftpd: fix error string packet overflow in nak(), fix syslog reporting 2014-07-13 01:00:02 +02:00
cinap_lenrek 7ae98ac5a6 ip/torrent: use "torrent" as default user agent 2014-05-19 04:56:07 +02:00
cinap_lenrek 1055b951f3 ip/torrent: fix usage, add -A option to set user-agent
trackers do like the new default Mozilla/5.0 (compatible)
user agent. so force useragent to hjdicks and give option
to override it in case trackers get even more clever in
the future.
2014-05-19 23:23:08 +02:00
cinap_lenrek c994152a90 ipconfig: fix dhcp watch
in dhcpwatch, the sleep time "secs" could become
zero potentially freezing the lease time.

give up when in Sinit state in dhcpquery() as this
is a terminal state.
2014-05-18 19:20:31 +02:00
ftrvxmtrx d2c3185bfa fix threadsetname usage in few places 2014-05-03 13:07:52 +02:00
cinap_lenrek 82cec6f585 socksd: close inside udp server one we get a connection (udprelay) 2014-02-14 14:57:05 +01:00
cinap_lenrek 81ea3f24fa cifsd: fix compiler warning 2014-02-14 14:21:07 +01:00
cinap_lenrek 80deec0a7b ip/torrent: remove unneeded assignment 2014-02-14 14:12:02 +01:00
mischief abb4bad701 ip/torrent: print tracker errors/warnings in debug mode and allow setting peerid 2014-02-01 12:04:30 -08: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 f6887b0a3c telnet: simplify previous change by moving the notkbd check into consctlcmd() 2013-12-05 22:43:44 +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 50e3c936fa ip/torrent: check piece offset, vlong cast 2013-10-08 08:12:05 +02:00
cinap_lenrek 3c2b09c9dc ip/torrent: more checking, backoff from piece on hash error 2013-10-08 07:55:26 +02:00
cinap_lenrek 56836bfdbd tls: fix various tlsClient()/tlsServer() related bugs
- TLSconn structure on stack but not initialized (zeroed)
- original filedescriptor double closed in error case
- original filedescriptor leaked in success case
- leaked TLSconn.sessionID and TLSconn.cert
- clarify in pushtls(2) and pushssl(2)
2013-09-14 19:19:08 +02:00
cinap_lenrek d76eccaf88 imap4d: apply djc's patch to fix search (from /n/sources/patch/imap4d-cistrcmp)
Fix SEARCH command in imap4d by replacing the cistrstr typo with cistrcmp.
2013-08-27 00:34:17 +02:00
cinap_lenrek 508b53a29a libdraw: fix leftover processes or programs failing to restore window labels when receiving interrupt note
fix the default note handler for event programs. only handle non system
notes or notes in the slave processes. for interrupt in the main process,
just call exits() which will do the cleanup and restore window label
properly.

this makes completely overriding the note handler in gping and
stats uneccesary.
2013-08-13 21:46:13 +02:00
cinap_lenrek e36d9f5c4e make filesystem handling of read9pmsg() consistent 2013-06-16 06:26:31 +02:00
cinap_lenrek e9c8ef5e16 ftpd: "opts utf8 on" 2013-04-23 19:37:56 +02:00
cinap_lenrek 8858fdf15f ftpd: fix nil pointer derefernece when ominiting arguments to opts command 2013-04-23 22:47:27 +02:00
cinap_lenrek 922d6d0780 ftpd: implement "OPTS UTF-8 ON", fix uninitialized printing uninitialized memory in HELP command 2013-04-23 22:38:03 +02:00