Commit graph

14 commits

Author SHA1 Message Date
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
427e925eea cwfs: add optional uid argument to allow command, unify permission override code
the allow command now takes an optional uid argument for the user
to be granted temporary god status on the fileserver for maintenance.

this was kenji okomotos idea, so thanks :)

remove wstatallow and writeallow flags. instead, we have global:

int allowed;

that contains the uid of the currently allowed user id or -1
if permission checking is globally disabled for the fileserver.
when zero, normal permission checking takes place.

added int isallowed(File*) function that returns non-zero when the
context is the console, or the allowed user. this is also used internally
by iaccess(), so all the extra code of in the callers of iaccess()
is gone now.

dont conflate allowed user with noauth flag and auto-allow on ream.
the installer already knows about noauth and allow flags so theres no
problem with bootstraping.
2014-08-11 22:36:59 +02:00
cinap_lenrek
760063ab57 cwfs: fix 32bit multiplication overflows for allocation sizes (thanks kenji okomoto) 2014-08-09 17:37:02 +02:00
cinap_lenrek
4c639475ce cwfs: fix 1GB memsize limitation
the malloc pool allocator is limited in its allocation
size. as almost all data structures in cwfs are never
freed, use brk() in ialloc() instead of mallocalign().
this means memory returned by ialloc() cannot be freed!

to make sure we do not call free by accident, remove
the #define malloc(n) ialloc(n, 0) macro and use ialloc()
directly as in the original code to show the intend
of permanent allocations.
2014-05-03 00:51:45 +02:00
cinap_lenrek
3663ffeefa cwfs: use atomic compare and swap to avoid semacquire() syscalls in new queue implementation 2013-08-07 01:32:11 +02:00
cinap_lenrek
e3d9591283 cwfs: faster queue implementation using semacquire() 2013-08-04 06:47:56 +02:00
cinap_lenrek
8e11ff283f cwfs: make /srv/cwfs.cmd redable to receive command output
before, cwfs would print everything to /dev/cons. this change
will redirect the output of commands to the /srv/cwfs.cmd pipe
so one can use:

con -C /srv/cwfs.cmd

and not have the fish for the output in /dev/kmesg.

use standard error (/dev/cons) for unsolicited messages as
there is not always a reader on the command file.
2012-07-13 15:09:39 +02:00
cinap_lenrek
53f5bdfd06 cwfs: set whochan for who command, cleanup 2012-07-12 21:00:12 +02:00
cinap_lenrek
dab4f2afc7 cwfs: simplify checkname, allow space character 2011-12-12 12:16:35 +01:00
cinap_lenrek
42f37419b6 cwfs: fix use after free bug (ai->cuid), remove waitedfor abort() 2011-09-07 02:46:38 +02:00
cinap_lenrek
d1a1034cbe cwfs: reduce verbosity, added -d options if you want it anyway 2011-04-28 19:40:57 +00:00
cinap_lenrek
67e93d6a0a updating cwfs and moving installer in /rc/bin 2011-04-12 15:53:55 +00:00
Taru Karttunen
a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen
e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00