summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cwfs/9p2.c
AgeCommit message (Collapse)Author
2022-12-18cwfs: remove noauth and nonone commans from fileserver consolecinap_lenrek
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.
2022-06-07cwfs: fix iounit negotiationOri Bernstein
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.
2020-07-12cwfs: update mtime and qid.vers for directory on renamecinap_lenrek
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.
2019-06-20cwfs: fix root access time qid path comparsioncinap_lenrek
2019-06-19cwfs: properly handle 64 bit qid pathcinap_lenrek
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.
2017-04-29cwfs: allow "none" user to rename filescinap_lenrek
2017-03-06cwfs: handle DMTMP flag in createcinap_lenrek
2015-10-09cwfs: fix wstat() failing to mark block dirty when noatime is setcinap_lenrek
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
2015-09-26cwfs: various cleanupscinap_lenrek
- consistently refer to Dentry.name length with NAMELEN - make sure whoname is null terminated - remove useless nil check for whoname
2015-09-26cwfs: don't use sprint() to fill directory namecinap_lenrek
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.
2015-08-21cwfs: remove 9p1 supportcinap_lenrek
2014-08-11cwfs: add optional uid argument to allow command, unify permission override codecinap_lenrek
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.
2013-01-309p message size too smallcinap_lenrek
various fileservers do not check if the message size is too small (they subtract IOHDRSZ later from it to calculate iounit) which can overflow.
2012-12-07cwfs: allow previously authorized channels to attach as nonecinap_lenrek
we allow allow previously authorized channels to attach as none even if anonymous logins are disabled with nonone.
2012-12-07cwfs: make none attach workcinap_lenrek
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.
2012-08-01cwfs: fix read offset integer overflowcinap_lenrek
2012-07-13cwfs: make /srv/cwfs.cmd redable to receive command outputcinap_lenrek
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-05-21cwfs: fix disappearing /tmp +t bugcinap_lenrek
2011-12-12cwfs: simplify checkname, allow space charactercinap_lenrek
2011-05-12cwfs: +tcinap_lenrek
2011-05-01cwfs: cleanupcinap_lenrek
2011-05-01cwfs: fix network listener, relay auth errors. boot(8): split bootargs only ↵cinap_lenrek
on first ! char, prepare /net so cwfs can announce 9fs
2011-04-17cwfs: make noauth a storable config option so one can boot without factotum ↵cinap_lenrek
and nvram
2011-04-17cwfs: code cleanupcinap_lenrek
2011-04-17cwfs: remove p9sk1 code, use factotumcinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen