]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
8 years agolibsec: make sure Elem is zero initialized so freevalfields() wont cause accidents
cinap_lenrek [Tue, 22 Sep 2015 16:39:48 +0000 (18:39 +0200)]
libsec: make sure Elem is zero initialized so freevalfields() wont cause accidents

8 years agolibsec: implement dh parameter signature verification, stop lying about non-rsa ciphe...
cinap_lenrek [Tue, 22 Sep 2015 16:10:52 +0000 (18:10 +0200)]
libsec: implement dh parameter signature verification, stop lying about non-rsa ciphers, fix memory leaks in X509 code

actually verify the diffie hellman parameter signature, this
comes in two flavours. TLS1.2 uses X509 signature with a
single hash specified by the signature algorithm field in
the signature itself and pre TLS1.2 where md5+sha1 hashes
of the signed blob are pkcs1 padded and encrypted with the
rsa private key.

stop advertizing non-rsa cipher suits (DSS and ECDSA), as
we have not implmenented them.

fix some memory leaks in X509 code while we'r at it.

8 years agolibsec: fix memory leak in ecmul()
cinap_lenrek [Tue, 22 Sep 2015 16:04:06 +0000 (18:04 +0200)]
libsec: fix memory leak in ecmul()

8 years agoscuzz: uncomment synccache command
cinap_lenrek [Tue, 22 Sep 2015 10:23:49 +0000 (12:23 +0200)]
scuzz: uncomment synccache command

8 years agomothra: <hr> drawing
cinap_lenrek [Tue, 22 Sep 2015 09:49:07 +0000 (11:49 +0200)]
mothra: <hr> drawing

<hr> is handled by drawing replicated bitmap across the with of
the page.

8 years agolibdraw: remove unneeded check (thanks BurnZeZ)
cinap_lenrek [Sun, 20 Sep 2015 19:52:47 +0000 (21:52 +0200)]
libdraw: remove unneeded check (thanks BurnZeZ)

8 years agodevsd: handle SYNCHRONIZE CACHE scsi commands as nops in sdfakescsi()
cinap_lenrek [Sun, 20 Sep 2015 12:54:49 +0000 (14:54 +0200)]
devsd: handle SYNCHRONIZE CACHE scsi commands as nops in sdfakescsi()

8 years agosdmmc: handle fakescsi emulation
cinap_lenrek [Sun, 20 Sep 2015 12:53:44 +0000 (14:53 +0200)]
sdmmc: handle fakescsi emulation

8 years agodevsd: remove unused timeout field from SDreq
cinap_lenrek [Sun, 20 Sep 2015 12:27:41 +0000 (14:27 +0200)]
devsd: remove unused timeout field from SDreq

8 years agolibdraw, screenrc: bind devdraw and devmouse in screenrc instead of handling it in...
cinap_lenrek [Sun, 20 Sep 2015 10:25:01 +0000 (12:25 +0200)]
libdraw, screenrc: bind devdraw and devmouse in screenrc instead of handling it in libdraw

libdraw was attempting to bind '#i' and '#m' to /dev when it could not find
/dev/mouse or /dev/draw. a library shouldnt be that clever and do namespace
manipulations on behalf of the caller. so instead, we setup the graphics
environment in screenrc on boot time.

8 years agopc, pc64: fix sdvirtio descriptor count when sending flush
mischief [Sun, 20 Sep 2015 08:56:56 +0000 (01:56 -0700)]
pc, pc64: fix sdvirtio descriptor count when sending flush

8 years agoircrc: add -P option for server password (thanks, nick)
stanley lieber [Sat, 19 Sep 2015 18:03:22 +0000 (14:03 -0400)]
ircrc: add -P option for server password (thanks, nick)

8 years ago/sys/lib/dist/ndb/common: correct authdom=inri
stanley lieber [Wed, 16 Sep 2015 17:29:04 +0000 (13:29 -0400)]
/sys/lib/dist/ndb/common: correct authdom=inri

8 years agoigfx: fix typos (thanks qwx)
cinap_lenrek [Mon, 14 Sep 2015 13:15:14 +0000 (15:15 +0200)]
igfx: fix typos (thanks qwx)

8 years agolibsec: save some space making weakCipher bitamp of type char[] instead of int[]
cinap_lenrek [Mon, 14 Sep 2015 07:46:40 +0000 (09:46 +0200)]
libsec: save some space making weakCipher bitamp of type char[] instead of int[]

8 years agolibsec: add TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 and TLS_ECDHE_RSA_WITH_AES_128_CB...
cinap_lenrek [Mon, 14 Sep 2015 07:27:06 +0000 (09:27 +0200)]
libsec: add TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 and TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 cipher suits

8 years agolibfis: fix wrong shift for lba40 (thanks geoff and charles)
cinap_lenrek [Sun, 13 Sep 2015 11:51:00 +0000 (13:51 +0200)]
libfis: fix wrong shift for lba40 (thanks geoff and charles)

---------- Forwarded message ----------
From: Charles Forsyth <charles.forsyth@gmail.com>
Date: 13 September 2015 at 12:38
Subject: fis bug
To: erik quanstrom <quanstro@quanstro.net>

geoff spotted something similar in sdiahci.c, but it's in libfis as well:

c[Flba24] = lba >> 24;
c[Flba32] = lba >> 32;
c[Flba40] = lba >> 48;

>> 48??  should be >> 40, especially with drive sizes getting up there.

8 years agolibsec: send sigature_algoritms extension for TLS1.2, order ciphers
cinap_lenrek [Sun, 13 Sep 2015 11:39:51 +0000 (13:39 +0200)]
libsec: send sigature_algoritms extension for TLS1.2, order ciphers

TLS1.2 requires the client to send the list of supported
signature and hash algorithm pairs. some servers will simply
reject the client hello otherwise. note that we do not implement
any dh/ecdh param signature verification.

order the cipher list to strogest first. aes128 is actually more
secure than aes256.

8 years agolibsec: handle TLS 1.2 changes in CertificateRequest message
cinap_lenrek [Sat, 12 Sep 2015 11:04:47 +0000 (13:04 +0200)]
libsec: handle TLS 1.2 changes in CertificateRequest message

8 years agocwfs: initialize /env/timezone on boot so dumps are in localtime
cinap_lenrek [Sat, 12 Sep 2015 01:58:46 +0000 (03:58 +0200)]
cwfs: initialize /env/timezone on boot so dumps are in localtime

when /env/timezone file is missing (boot case), copy /adm/timezone/local
to /env/timezone so localtime() can correct timezone offset.

8 years agomkfile.proto: LIB should not be inherited during recursive mk
mischief [Thu, 10 Sep 2015 01:59:40 +0000 (18:59 -0700)]
mkfile.proto: LIB should not be inherited during recursive mk

8 years agohtml2ms: bold table headings, remove wrong tag space handling
cinap_lenrek [Tue, 8 Sep 2015 17:55:55 +0000 (19:55 +0200)]
html2ms: bold table headings, remove wrong tag space handling

8 years agomothra: make text inside <td> bold
cinap_lenrek [Tue, 8 Sep 2015 17:23:23 +0000 (19:23 +0200)]
mothra: make text inside <td> bold

8 years agotar: remove unneccesary { }
cinap_lenrek [Tue, 8 Sep 2015 16:30:38 +0000 (18:30 +0200)]
tar: remove unneccesary { }

8 years agotar: make z flag work, even when no file name was provided (thanks aiju)
cinap_lenrek [Tue, 8 Sep 2015 16:27:48 +0000 (18:27 +0200)]
tar: make z flag work, even when no file name was provided (thanks aiju)

tar used to infer compression type from the filenames extension, but when
no file name is given (stdin/stdout), the -z flag was ignored and no
compression filter applied. this changes tar to assume the default
gzip compression method when z is given and no file name is specified.

8 years agomothra: add missing initializations for plaintext html state
cinap_lenrek [Sun, 6 Sep 2015 22:13:40 +0000 (00:13 +0200)]
mothra: add missing initializations for plaintext html state

8 years agolibthread: get rid of tprivalloc()/tprivfree()/tprivdata() and _workerdata() (thanks...
cinap_lenrek [Sun, 6 Sep 2015 21:25:14 +0000 (23:25 +0200)]
libthread: get rid of tprivalloc()/tprivfree()/tprivdata() and _workerdata() (thanks qrstuv)

these functions where undocumented and unused. especially
tprivfree() was buggy missing a unlock() call. theres not
much point in supporting these functions as theres
threaddata() and procdata().

8 years agolibc: remove privfree(), simplify privalloc()
cinap_lenrek [Sun, 6 Sep 2015 18:43:05 +0000 (20:43 +0200)]
libc: remove privfree(), simplify privalloc()

8 years agodevqspi: fix qunlock error on stat() -> close()
cinap_lenrek [Sat, 5 Sep 2015 11:18:28 +0000 (13:18 +0200)]
devqspi: fix qunlock error on stat() -> close()

8 years agozynq: clean cache unconditionally *before* dma, invalidate cache *after* dma for...
cinap_lenrek [Sat, 5 Sep 2015 08:36:53 +0000 (10:36 +0200)]
zynq: clean cache unconditionally *before* dma, invalidate cache *after* dma for read case

processor might bring data speculatively into the cache,
before the dma completes.

8 years agousbehci: clean cache unconditionally before handing a buffer to the hardware
cinap_lenrek [Sat, 5 Sep 2015 08:14:19 +0000 (10:14 +0200)]
usbehci: clean cache unconditionally before handing a buffer to the hardware

even in the read case, we need to clean the cache
so the cpu will not flush out old changes while
the hardware updates the buffer.

8 years agodist/mkfile: add target for the aijuboard *.zynq.img
cinap_lenrek [Sat, 5 Sep 2015 01:29:17 +0000 (03:29 +0200)]
dist/mkfile: add target for the aijuboard *.zynq.img

this generates a disk image (to be written to usb or
sdmmc card) containing 9fat partition with kernel and
a hjfs filesystem partition with the 9front distribution.

this could be easily extended to generate raspberry pi
images as well, but i have no hardware to test.

8 years agomove screen and mouse setup code to /rc/bin/screenrc
cinap_lenrek [Sat, 5 Sep 2015 01:14:44 +0000 (03:14 +0200)]
move screen and mouse setup code to /rc/bin/screenrc

8 years agomerge
cinap_lenrek [Fri, 4 Sep 2015 22:37:32 +0000 (00:37 +0200)]
merge

8 years agozynq: fix cache flush bug for emmc driver (have to invalidate cache *before* read)
cinap_lenrek [Fri, 4 Sep 2015 22:33:57 +0000 (00:33 +0200)]
zynq: fix cache flush bug for emmc driver (have to invalidate cache *before* read)

8 years agofortunes: Please be respectful in this forum.
stanley lieber [Thu, 3 Sep 2015 21:01:49 +0000 (17:01 -0400)]
fortunes: Please be respectful in this forum.

8 years agohtml2ms: handle subscripts and superscripts
cinap_lenrek [Thu, 3 Sep 2015 19:24:00 +0000 (21:24 +0200)]
html2ms: handle subscripts and superscripts

8 years agomothra: subscript and superscript support
cinap_lenrek [Thu, 3 Sep 2015 17:07:48 +0000 (19:07 +0200)]
mothra: subscript and superscript support

8 years agoauth/passwd: fix structure zeroing order
cinap_lenrek [Wed, 2 Sep 2015 09:41:41 +0000 (11:41 +0200)]
auth/passwd: fix structure zeroing order

8 years agolibsec: add rfc5869 hmac-based key derivation function hkdf_x()
cinap_lenrek [Wed, 2 Sep 2015 09:30:17 +0000 (11:30 +0200)]
libsec: add rfc5869 hmac-based key derivation function hkdf_x()

8 years agolibsec: generalize pbkdf2_hmac_sha1() to pbkdf2_x() passing the hmac as an argument
cinap_lenrek [Wed, 2 Sep 2015 09:28:11 +0000 (11:28 +0200)]
libsec: generalize pbkdf2_hmac_sha1() to pbkdf2_x() passing the hmac as an argument

8 years agolibsec: declare aes_setupEnc static
cinap_lenrek [Wed, 2 Sep 2015 04:15:02 +0000 (06:15 +0200)]
libsec: declare aes_setupEnc static

8 years agotcp: fix mtu on server sockets again (thans mycroftix)
cinap_lenrek [Tue, 1 Sep 2015 23:50:55 +0000 (01:50 +0200)]
tcp: fix mtu on server sockets again (thans mycroftix)

for incoming connection, we used s->laddr to lookup the interface
for the incoming call, but this does not work when the announce
address is tcp!*!123, then s->laddr is all zeros "::". instead,
use the incoming destination address for interface mtu lookup.

thanks mycroftix for troubleshooting!

8 years agolibsec: add curve25519 diffie hellman
cinap_lenrek [Tue, 1 Sep 2015 19:38:20 +0000 (21:38 +0200)]
libsec: add curve25519 diffie hellman

8 years agolibsec: remove flawed aes() digest and hmac_aes() implementations (thanks aiju)
cinap_lenrek [Tue, 1 Sep 2015 19:35:43 +0000 (21:35 +0200)]
libsec: remove flawed aes() digest and hmac_aes() implementations (thanks aiju)

8 years agolibsec: work arround 8c running out of registers compiling curve25519.c
cinap_lenrek [Fri, 28 Aug 2015 14:31:44 +0000 (16:31 +0200)]
libsec: work arround 8c running out of registers compiling curve25519.c

8 years agolibsec: add curve25519() from http://code.google.com/p/curve25519-donna/
cinap_lenrek [Fri, 28 Aug 2015 10:08:54 +0000 (12:08 +0200)]
libsec: add curve25519() from http://code.google.com/p/curve25519-donna/

this is a portable version of curve25519() by google.

8 years agomerge
cinap_lenrek [Fri, 28 Aug 2015 06:42:35 +0000 (08:42 +0200)]
merge

8 years agolibauthsrv: fix _asgetresp() for passwd
cinap_lenrek [Fri, 28 Aug 2015 06:41:16 +0000 (08:41 +0200)]
libauthsrv: fix _asgetresp() for passwd

8 years agomp.h: third time's a charm
glenda [Thu, 27 Aug 2015 13:40:34 +0000 (13:40 +0000)]
mp.h: third time's a charm

8 years agomp.h: oops
glenda [Thu, 27 Aug 2015 13:35:13 +0000 (13:35 +0000)]
mp.h: oops

8 years agomp.h: define mpnrand
glenda [Thu, 27 Aug 2015 13:34:02 +0000 (13:34 +0000)]
mp.h: define mpnrand

8 years agolibsec: add TLS_RSA_WITH_AES_128_CBC_SHA256 and TLS_RSA_WITH_AES_256_CBC_SHA256 ciphers
mischief [Thu, 27 Aug 2015 08:53:48 +0000 (01:53 -0700)]
libsec: add TLS_RSA_WITH_AES_128_CBC_SHA256 and TLS_RSA_WITH_AES_256_CBC_SHA256 ciphers

8 years agodevtls: add sha256 mac
mischief [Thu, 27 Aug 2015 08:46:28 +0000 (01:46 -0700)]
devtls: add sha256 mac

8 years agolibsec: add q parameter to dh_new() for subgroup support, sanitize dh parameters
cinap_lenrek [Wed, 26 Aug 2015 03:59:42 +0000 (05:59 +0200)]
libsec: add q parameter to dh_new() for subgroup support, sanitize dh parameters

8 years agolibmp: simplify mpnrand(), as mpnew() cannot return nil
cinap_lenrek [Wed, 26 Aug 2015 03:44:26 +0000 (05:44 +0200)]
libmp: simplify mpnrand(), as mpnew() cannot return nil

8 years agolibmp: add mpnrand() function to generate uniform random number 0 ≤ x < n
cinap_lenrek [Tue, 25 Aug 2015 18:20:25 +0000 (20:20 +0200)]
libmp: add mpnrand() function to generate uniform random number 0 ≤ x < n

8 years agotput: check sbrk return value
mischief [Tue, 25 Aug 2015 10:06:36 +0000 (03:06 -0700)]
tput: check sbrk return value

8 years agomerge
glenda [Tue, 25 Aug 2015 09:35:48 +0000 (09:35 +0000)]
merge

8 years agofix fuckup
glenda [Tue, 25 Aug 2015 09:35:10 +0000 (09:35 +0000)]
fix fuckup

8 years agoimport E script from bell labs
mischief [Tue, 25 Aug 2015 09:09:22 +0000 (02:09 -0700)]
import E script from bell labs

8 years agoimport E script from bell labs
mischief [Tue, 25 Aug 2015 09:07:46 +0000 (02:07 -0700)]
import E script from bell labs

8 years agolibc: import more endianness fixes (thanks cherry9)
mischief [Tue, 25 Aug 2015 08:58:41 +0000 (01:58 -0700)]
libc: import more endianness fixes (thanks cherry9)

from https://bitbucket.org/cherry9/plan9-loongson/

8 years agolibsec: fix probably_prime() endless loop for n == 3
cinap_lenrek [Sun, 23 Aug 2015 21:49:31 +0000 (23:49 +0200)]
libsec: fix probably_prime() endless loop for n == 3

8 years agoremove convkeys2
cinap_lenrek [Fri, 21 Aug 2015 22:21:11 +0000 (00:21 +0200)]
remove convkeys2

8 years agoinit: remove dependency to <authsrv.h>
cinap_lenrek [Fri, 21 Aug 2015 21:40:31 +0000 (23:40 +0200)]
init: remove dependency to <authsrv.h>

8 years agotapefs: remove dependency to <authsrv.h>
cinap_lenrek [Fri, 21 Aug 2015 21:38:56 +0000 (23:38 +0200)]
tapefs: remove dependency to <authsrv.h>

8 years agoimport(4): -o, -O flags gone
cinap_lenrek [Fri, 21 Aug 2015 21:29:10 +0000 (23:29 +0200)]
import(4): -o, -O flags gone

8 years agoremove srvold9p
cinap_lenrek [Fri, 21 Aug 2015 21:23:35 +0000 (23:23 +0200)]
remove srvold9p

8 years agocpu, import: remove old9p support
cinap_lenrek [Fri, 21 Aug 2015 21:22:59 +0000 (23:22 +0200)]
cpu, import: remove old9p support

8 years agoremove old9p cpu service
cinap_lenrek [Fri, 21 Aug 2015 21:21:41 +0000 (23:21 +0200)]
remove old9p cpu service

8 years agocmd/auth: remove private /dev/random reading routines, use genrandom()
cinap_lenrek [Fri, 21 Aug 2015 20:46:26 +0000 (22:46 +0200)]
cmd/auth: remove private /dev/random reading routines, use genrandom()

8 years agoauth/changeuser: set the aes key in plan9 database, but not in securenet db
cinap_lenrek [Fri, 21 Aug 2015 18:36:19 +0000 (20:36 +0200)]
auth/changeuser: set the aes key in plan9 database, but not in securenet db

8 years agokeyfs: fix typo (thanks jpm)
cinap_lenrek [Fri, 21 Aug 2015 18:11:11 +0000 (20:11 +0200)]
keyfs: fix typo (thanks jpm)

8 years agokernel/boot: do not handle kfs boot
cinap_lenrek [Fri, 21 Aug 2015 17:53:43 +0000 (19:53 +0200)]
kernel/boot: do not handle kfs boot

8 years agoremove kfs and kfscmd
cinap_lenrek [Fri, 21 Aug 2015 17:52:57 +0000 (19:52 +0200)]
remove kfs and kfscmd

8 years agoremove kfs references from manual
cinap_lenrek [Fri, 21 Aug 2015 17:51:03 +0000 (19:51 +0200)]
remove kfs references from manual

8 years agofshalt: remove kfs support
cinap_lenrek [Fri, 21 Aug 2015 17:40:29 +0000 (19:40 +0200)]
fshalt: remove kfs support

8 years agomkfs(8): dont mention kfs
cinap_lenrek [Fri, 21 Aug 2015 17:35:56 +0000 (19:35 +0200)]
mkfs(8): dont mention kfs

8 years agodisk/mkfs: rmeove kfs support
cinap_lenrek [Fri, 21 Aug 2015 17:32:48 +0000 (19:32 +0200)]
disk/mkfs: rmeove kfs support

8 years agocwfs: remove 9p1 support
cinap_lenrek [Fri, 21 Aug 2015 16:43:25 +0000 (18:43 +0200)]
cwfs: remove 9p1 support

8 years agoauthsrv: randomize aes key in mkkey(), not used yet.
cinap_lenrek [Fri, 21 Aug 2015 01:32:05 +0000 (03:32 +0200)]
authsrv: randomize aes key in mkkey(), not used yet.

8 years agoauthsrv: more aes key stuff
cinap_lenrek [Fri, 21 Aug 2015 01:16:50 +0000 (03:16 +0200)]
authsrv: more aes key stuff

8 years agointroduce AES key into nvram and keyfs
cinap_lenrek [Fri, 21 Aug 2015 00:43:31 +0000 (02:43 +0200)]
introduce AES key into nvram and keyfs

8 years agokfs: adjust to new libauthsrv
cinap_lenrek [Thu, 20 Aug 2015 18:56:00 +0000 (20:56 +0200)]
kfs: adjust to new libauthsrv

8 years agocwfs: adjust for new libauthsrv changes
cinap_lenrek [Thu, 20 Aug 2015 18:44:17 +0000 (20:44 +0200)]
cwfs: adjust for new libauthsrv changes

8 years agolibauthsrv: add missing files (thanks mischief)
cinap_lenrek [Thu, 20 Aug 2015 13:47:49 +0000 (15:47 +0200)]
libauthsrv: add missing files (thanks mischief)

8 years agolibsec: add pbkdf2_hmac_sha1() (from wpapsk factotum module)
cinap_lenrek [Wed, 19 Aug 2015 22:45:08 +0000 (00:45 +0200)]
libsec: add pbkdf2_hmac_sha1() (from wpapsk factotum module)

8 years agomerge
cinap_lenrek [Wed, 19 Aug 2015 19:07:40 +0000 (21:07 +0200)]
merge

8 years agolibauthsrv: generalize ticket service, not hardcoding ticket format and DES encryption
cinap_lenrek [Wed, 19 Aug 2015 19:06:17 +0000 (21:06 +0200)]
libauthsrv: generalize ticket service, not hardcoding ticket format and DES encryption

this is in preparation for replacing DES ticket encryption with
something better. but first need to make the code stop making
assumptions.

the wire encoding of the Ticket might be variable length
with TICKETLEN just giving an upper bound. the details will be
handled by libauthsrv _asgetticket() and _asgetresp() funciotns.

the Authenticator and Passwordreq structures are encrypted
with the random ticket key. The encryption schmeme will depend
on the Ticket format used, so we pass the Ticket* structure
instead of the DES key.

introduce Authkey structure that will hold all the required
cryptographic keys instead of passing DES key.

8 years ago/lib/1oct1993: use words correctly (thanks, spew)
stanley lieber [Tue, 18 Aug 2015 18:21:58 +0000 (14:21 -0400)]
/lib/1oct1993: use words correctly (thanks, spew)

8 years agoaux/statusbar: use title as rio window title (thanks qrstuv)
mischief [Tue, 18 Aug 2015 08:24:22 +0000 (01:24 -0700)]
aux/statusbar: use title as rio window title (thanks qrstuv)

8 years agolibsec: TLS1.2 server support, make cipher list with most prefered first
cinap_lenrek [Mon, 17 Aug 2015 20:27:56 +0000 (22:27 +0200)]
libsec: TLS1.2 server support, make cipher list with most prefered first

8 years agolibsec: TLS1.2 client support
cinap_lenrek [Mon, 17 Aug 2015 19:16:58 +0000 (21:16 +0200)]
libsec: TLS1.2 client support

8 years agobullshit: app, deep-learning, responsive.
cinap_lenrek [Mon, 17 Aug 2015 11:11:31 +0000 (13:11 +0200)]
bullshit: app, deep-learning, responsive.

8 years agocc: improve (non-) side effect detection (thanks charle)
cinap_lenrek [Mon, 17 Aug 2015 00:07:27 +0000 (02:07 +0200)]
cc: improve (non-) side effect detection (thanks charle)

8 years agogames/doom: fix array offsets for respawn angle (thanks qu7uux)
cinap_lenrek [Sun, 16 Aug 2015 20:12:11 +0000 (22:12 +0200)]
games/doom: fix array offsets for respawn angle (thanks qu7uux)

mthing->angle is a signed short, and if ANG45 * mthing->angle/45 < 0, the
result of the right shift is sign extended.
afaik, an being 16bit in the dos version of doom, you'd endup with a
negative array offset, which would just access values from adjacent arrays
(finetangent[] for finecosine[], and finecosine[] for finesine[]), and it
would result in a misplaced teleport fog in some circumstances (fog is not
in front of the player on respawn, hence "silent teleport"). so, this fix is
bug incompatible, but this only affects live multiplay.
to test:
% hget http://doomedsda.us/dm/ahfx7_2.zip | unzip -sv
extracting AHFX7_2.TXT
extracting AHFX7_2.LMP
% mv AHFX7_2.LMP ahfx7_2.lmp
% games/doom -playdemo ahfx7_2
[...]
doom 10553: suicide: sys: trap: fault read addr=0x400429e10 pc=0x205b45

8 years agogames/doom: fix gamma correction and key translation (thanks qu7uux)
cinap_lenrek [Sun, 16 Aug 2015 20:09:46 +0000 (22:09 +0200)]
games/doom: fix gamma correction and key translation (thanks qu7uux)

KEY_F11 and KEY_F12 are not KEY_F1+11 and KEY_F1+12 as it is assumed in
runetokey(), which prevents these keystrokes from being used. rather than
change runetokey(), it seems better to just change the key definitions in
doomdef.h (the new values don't correspond to any other keys anyway).

F11 is the gamma correction key. to make gamma correction actually work,
i_video.c:I_SetPalette must also take into account usegamma (this was just
never ported). cf i_video.c:UploadNewPalette in source code release.

F12 is the spycam key. the spycam switches the renderview to a different player
during a coop game, or when watching a multiplayer demo. this feature only
changes the renderview; sounds, palette effects, status bar, etc. are still
from the first player's perspective.

8 years agogames/doom: fix idclev cheat in doom2 and final doom (thanks qu7uux)
cinap_lenrek [Sun, 16 Aug 2015 20:08:11 +0000 (22:08 +0200)]
games/doom: fix idclev cheat in doom2 and final doom (thanks qu7uux)

a typo in st_stuff.c:ST_Responder prevents idclev (change level) cheat to work
in doom2 and final doom (gamemode == commercial): episode is set to 0, when
that's invalid, and ST_Responder just returns.
to test, while ingame type idclev, followed by:
. doom1: episode (1-3 or 1-4) then map number (1-9)
. doom2/final doom: map number (1-32)
incidentally, if the last digit typed is 1, the player's weapon will switch to
the fist, because of a different bug (basically kbdproc registering two events
when pressing a key, for 'c' and 'k' case).

8 years agogames/doom: fix unterminated comment causing sound bugs (from qu7uux)
cinap_lenrek [Sun, 16 Aug 2015 20:07:12 +0000 (22:07 +0200)]
games/doom: fix unterminated comment causing sound bugs (from qu7uux)

this bug was introduced in the plan9 port, and since i_sound.c compiles with
no warning, it was never noticed. in effect, the statement between the
unterminated comment and the next is ignored. channelids[] is used in addsfx()
to avoid re-adding certain sounds if they are already playing. one of those is
sfx_sawful, and because of this bug, it is added again each tic during which
the player fires the chainsaw, rather than reset every tic.
compare firing the chainsaw continuously with and without the patch (without
hitting an enemy).