Age | Commit message (Collapse) | Author |
|
The noauth and nonone commands are only valid in config mode.
The problem is that some people assumed that issuing the
noauth command in the runtime fileserver console would be
persistent across reboots, which is not the case.
To avoid this confusion, we remove these commands from the
fileserver console.
To still give a way to disable authentication at runtime,
define a authdisabled flag that can be toggled at runtime.
|
|
cwfs had an issue with iounit negotiation as a result
of the conversion to 9p2000 -- with the move to variable
size messages, the fixed message overhead decreased, but
the advertised message size was still adding the old
fixed overhead.
This meant that if the kernel negotiated the maximum io
size, cwfs would negotiate something larger than it
supported, and would hang up when an io of that size
was made.
In addition, the size of messages was stored in a short,
which means that negotiating an iounit larger than 16384
bytes would overflow the message count, and cause things
to fall over.
Finally, whle we're here, we clean up some duplicated
and unused constants.
|
|
when wstating a file, its directory should be updated to
reflect this change.
here is what the manpage states:
> The mtime field reflects the time of the last change of content
> (except when later changed by wstat). For a directory it is the
> time of the most recent remove, create, or wstat of a file in the
> directory.
|
|
|
|
for historical reasons, kenfs stores directory entries in pre 9p2000
format with directories having the QPDIR bit 31 set in the qid path.
however, the 64 bit fileserver allows 64 bit qid paths.
given that we do not support pre 9p2000 clients and do not rely on
the QPDIR, but want to keep the block check tags consistent, we will
*INVERT* the QPDIR bit in directory entry qid paths for directories.
this preserves the on-disk semantics (for < 31 bit qmax) but does
not complicate qid generation and recovery. also makes it easy to
convert between directory entry qid and 9p format.
|
|
|
|
|
|
code assumed the accessdir() call would always mark the block dirty, but
this is not the case when noatime flag is enabled. this was reported by
michael in bug:
"open/with_noatime_option_cwfs_doesnt_preserve_changes_in_file_permissionowner"
--
cinap
|
|
- consistently refer to Dentry.name length with NAMELEN
- make sure whoname is null terminated
- remove useless nil check for whoname
|
|
sprint() will replace invalid utf8 sequences with U+FFFD
which caused directory reads and stats to return the wrong
filename. just strcpy the name bytes.
|
|
|
|
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.
|
|
various fileservers do not check if the message size is too small
(they subtract IOHDRSZ later from it to calculate iounit) which
can overflow.
|
|
we allow allow previously authorized channels to attach as none
even if anonymous logins are disabled with nonone.
|
|
allow attach as none. (this was supposed to work but it
doesnt for 9p2000 because we have to check for
afid being NOFID instead of checking the uname string).
and add "nonone" flag to disable this.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
on first ! char, prepare /net so cwfs can announce 9fs
|
|
and nvram
|
|
|
|
|
|
|
|
|