Commit graph

4741 commits

Author SHA1 Message Date
cinap_lenrek
8d196aeec7 kernel: use Etoolong[] constant instead of string literal in validname0() 2015-08-06 10:01:45 +02:00
cinap_lenrek
9110ae6eae kernel: make shargs() function static in sysproc.c 2015-08-06 09:09:57 +02:00
cinap_lenrek
2acb02f29b kernel: reject empty argv (argv[0] == nil) in sysexec()
when executing a script, we did advance argp0 unconditionally
to replace argv[0] with the script name. this fails when
argv[] is empty, then we'd advance argp0 past the nil terminator.

the alternative would be to *not* advance if *argp0 == nil, but that
would require another validaddr() check for a case that is unlikely
to have been anticipated in most programs being invoked as
libc's ARGBEGIN macro assumes argv[0] being non-nil as it also
unconditionally advances the argv pointer.

to keep us sane, we now reject an empty argv[]. on entry, we
verify that argv[] is valid for at least two elements:
- the program name argv[0], has to be non-nil
- the first potential nil terminator in argv[1]

when argv[0] == nil, we throw Ebadarg "bad arg in system call"
2015-08-06 08:47:38 +02:00
cinap_lenrek
b89fcf2fe3 init: do not run $home/lib/profile when cd $home failed
avoiding follow up error messages, which is annoying and
quite common when running a terminal as "none" for testing.
2015-08-05 14:09:02 +02:00
cinap_lenrek
00eb2fa448 kfs: set permission of / to 0775 on ream
this allows members of the -1 group to create new directories in /
without having to fiddle with the fileserver console. this also
makes it consistent to hjfs and cwfs.
2015-08-05 13:13:40 +02:00
cinap_lenrek
ad91dc7ffb cwfs: set permission of / to 0775 on ream
this allows members of the -1 group to create new directories in /
without having to fiddle with the fileserver console. this also
makes it consistent to hjfs.
2015-08-05 13:06:11 +02:00
cinap_lenrek
7304deaec1 pc, pc64: remove unused psaux driver, cleanup devkbd
the psaux driver is not used in any kernel configuration and theres
no userspace mouse daemon. i8042auxcmds() is wrong as access
to the user buffer can fault and we are holding an ilocks.

little cleanups in devkbd.
2015-08-05 10:44:03 +02:00
cinap_lenrek
f7514acc95 devkbd: disable mosue/keyboard on shutdown, disable ps2 mouse on init, remove kbdenable()/kbdinit()
on vmware, loading a new kernel sometimes reboots when
wiggling the mouse. disabling keyboard and mouse on
shutdown fixes the issue.
make sure ps2 mouse is disabled on init, will get re-enabled
in i8042auxenable().
keyboard isnt special anymore, we can just use the devreset
entry point in the device to do the keyboard initialization,
so kbdinit()/kbdenable() are not needed anymore.
2015-08-05 09:22:07 +02:00
cinap_lenrek
145624eec2 kernel: remove unused qstate() function 2015-08-04 13:52:29 +02:00
cinap_lenrek
dcb5f4212b devkbd: poll pc keyboard before blocking on kbd.q
the keyboard stops sending interrupts when its fifo gets full,
which can happen on boot when keys get mashed while interrupts
are still disabled. to work arround this, call the keyboard
interrupt handler when kbd.q is starved before blocking.
2015-08-04 13:43:35 +02:00
cinap_lenrek
1f0057c5fd python: use altzone 2015-08-04 02:03:38 +02:00
cinap_lenrek
63759d2efb ape: implement altzone for tzset() 2015-08-04 02:01:41 +02:00
cinap_lenrek
333812ca38 ape: fix mktime() again 2015-08-04 02:00:37 +02:00
cinap_lenrek
402741bc01 resample: simplify getint() 2015-08-03 18:30:02 +02:00
cinap_lenrek
d457a43461 libc: make atoi() not parse c-style octal and hex numbers
interpreting octal breaks parsing of decimal numbers with
leading zeros. the manpage listed this in the BUGS section,
so we'r going to fix it as this just causes confusion as
most callers of atoi() do not expect it.
2015-08-03 18:10:53 +02:00
cinap_lenrek
2513946536 crop: use strtol() instead of atoi() 2015-08-03 17:29:30 +02:00
cinap_lenrek
953387d7ba bitsy: replace atoi() calls with strtol() when hex can be expcted 2015-08-03 17:08:33 +02:00
cinap_lenrek
2ef29e10f4 pc, pc64: replace atoi() calls with strtol() when hex can be expcte 2015-08-03 17:07:40 +02:00
cinap_lenrek
1b7e120c09 kernel: dont rely on atoi() parsing hex for netif/devbridge 2015-08-03 16:24:14 +02:00
cinap_lenrek
887ae1a17b webcookies: fix typo 2015-08-03 15:52:03 +02:00
cinap_lenrek
9cf59a2c63 9pcon: use strtol() to parse integers 2015-08-03 15:48:01 +02:00
cinap_lenrek
0915174850 libcontrol: use strtol() to parse integer arguments 2015-08-03 15:32:16 +02:00
cinap_lenrek
9289c4b796 libhttpd: use strtol to parse decimal character references in httpunesc() 2015-08-03 15:26:33 +02:00
cinap_lenrek
0d93e2fe70 snoopy: dont rely on atoi() being able to parse hex 2015-08-03 14:58:41 +02:00
cinap_lenrek
4b787e3205 bitsy/keyboard: do not rely on atoi() being able to parse hex 2015-08-03 14:52:07 +02:00
cinap_lenrek
d7f4ef7bbc libauthsrv: readnvram() use vlong for nvroff, parse $nvlen/$nvoff with strtol() instead of atoi() 2015-08-03 14:45:23 +02:00
cinap_lenrek
8aee1c5060 webcookies: use strtol() to parse HH:MM:SS
atoi() currently interprets leading zeros as octal (BUG!),
so use strtol with explicit base 10 avoiding the issue.
2015-08-03 14:28:16 +02:00
cinap_lenrek
fc77a2d3d3 aux/vga: dont rely on atoi() being able to parse hex 2015-08-03 14:24:29 +02:00
cinap_lenrek
d5d6724805 devenv: simplify envremove(), cleanup 2015-08-03 22:08:10 +02:00
cinap_lenrek
37e4ce0ea7 devenv: avoid indirection, keep Evalue's allocated in an array
avoid the indirection for envlookup() by allocating Evalue structs
together in an array. remove unused link field in Evalue.
2015-08-02 21:39:33 +02:00
cinap_lenrek
29a53a52fd 1c,2c,7c,kc,vc: honor suppress condition for outstring() in swt.c 2015-08-02 14:52:54 +02:00
cinap_lenrek
8234f9d906 ipv6on: fix search for ip attribute (thanks kenji arisawa) 2015-08-02 14:48:53 +02:00
cinap_lenrek
1f3c43c017 pc, pc64: set *bootscreen= when framebuffer changes
add bootscreenconf(VGAscr *) function, that is called whenever
the framebuffer configuration is changed by devvga. that way, we
can pass the current setting of the framebuffer to the new
kernel when using /dev/reboot.
2015-08-02 07:32:49 +02:00
cinap_lenrek
27445c5768 kernel: cleanup qlock.c to use nil instead of 0 for pointers 2015-08-02 05:36:35 +02:00
cinap_lenrek
dd96b1d965 mothra: show <source> tag within <video>/<audio> tags 2015-08-01 16:38:55 +02:00
cinap_lenrek
660f54b198 mothra: fix nil crash on missing name/src attributes for source/video/audio/embed/frame/iframe 2015-08-01 16:18:02 +02:00
cinap_lenrek
71c57070c6 mothra: enable compiler warnings and type checking, cleanup 2015-08-01 14:55:33 +02:00
cinap_lenrek
fe5ede9792 mothra: fix double button hit
dolink() was hitting the button a second time!
2015-08-01 13:53:16 +02:00
cinap_lenrek
b408b386e1 mothra: cleanup url handling 2015-08-01 13:06:24 +02:00
cinap_lenrek
d6fb42f496 mothra: fix selurl() 2015-08-01 12:51:52 +02:00
cinap_lenrek
0140f20af4 jpg/ico: fix mkfile 2015-08-01 11:56:01 +02:00
cinap_lenrek
815c2ba22b mothra: support for inline images and <image> tag 2015-08-01 11:20:28 +02:00
cinap_lenrek
f62a2efb7a webcookies: create lockfile with 0600 permission, always use create() with perm 0600 for rewriting jar 2015-08-01 03:18:44 +02:00
cinap_lenrek
f42a7ade70 bio(2): Bterm() closes filedescriptor for Bfdopen() allocated buffer 2015-08-01 03:16:35 +02:00
cinap_lenrek
69daa9fd96 jpg/ico: support for embedded png icons 2015-07-31 12:58:58 +02:00
cinap_lenrek
18169e03de webcookies: fix implicit path cookie handling
parsecookie() used to inplace modify the request path
for implicit path (to get the directory from path) and
also did it wrong. now have a static copy and do not
remove the last slash.
2015-07-31 01:10:53 +02:00
cinap_lenrek
9d59fb28cf aux/vga: sandybridge support for igfx (unfinished)
as usual, the dude with the hardware vanished so i cannot
develop this further. setting mode worked the last time
but only when using vesa before, so some bits are still
missing. commiting this as it is so i dont have to start
from scratch once we have hardware again.
2015-07-31 23:03:45 +02:00
cinap_lenrek
34e2e047cc iostats: add -C to usage 2015-07-31 22:51:52 +02:00
cinap_lenrek
ee86d3cb52 devmnt: fix mntcache()
make sure mntcache() wont cache data beyond what was read from
the block list.
2015-07-30 21:00:13 +02:00
cinap_lenrek
b86a12149a games/doom: fix config file never being loaded or saved (thanks qu7uux)
basedefault[], the default path to the config file, is never set and remains
blank, unless -config %s is used (cd d_main.c). when games/doom attempts to
open the file, it silently fails and no config file is ever read or written.
this patch sets basedefault to a file in whatever directory a valid wad is
found in I_IdentifyWAD().
2015-07-30 20:30:47 +02:00