summaryrefslogtreecommitdiff
path: root/sys/src/cmd/exportfs/exportsrv.c
AgeCommit message (Collapse)Author
2021-08-18exportfs, oexportfs, iostats: make -d log to stderramavect
exportfs -d logs 9p traffic to /tmp/exportdb. -f allows writing to a different file. exportfs silently continues if it doesn't have permissions to create or write to /tmp/exportdb. These are poor behaviors. A better default is to write to stderr, since it is 9P debug info that is better immediately printed, and not user info that is better handled by syslog(). As a result, -f is obsolete and thus removed. Redirect responsibility is now on rc. As a side effect, rc will fail if it doesn't have permissions to write. exportfs(4) is updated to reflect all changes and with a better Synopsis. oexportfs is changed to match exportfs. oexportfs(4) is updated to reflect all changes. The Synopsis is not changed due to the number of flags. Removed -f from iostats. iostats(4) is updated to reflect all changes. ---
2021-08-18exportfs: revert e524e8d65a7573c46d7beb49e77bfc2d55a5563dOri Bernstein
It turns out that the '-f' flag was being used, and removing it broke things.
2021-08-14exportfs: make -d log to stderramavect
exportfs -d logs 9p traffic to /tmp/exportdb. -f allows writing to a different file. exportfs silently continues if it doesn't have permissions to create or write to /tmp/exportdb. These are poor behaviors. A better default is to write to stderr, since it is 9P debug info that is better immediately printed, and not user info that is better handled by syslog(). As a result, -f is obsolete and thus removed. Redirect responsibility is now on rc. As a side effect, rc will fail if it doesn't have permissions to write. exportfs(4) is updated to reflect all changes and with a better Synopsis.
2020-12-13oexportfs: move legacy code for cpu and import to separate programcinap_lenrek
The initial protocol handling in exportfs for cpu and import services is a huge mess. Saparate the code out into its own program with its own oexportfs(4) manpage.
2020-08-01pre-lib9p servers: fix incorrect Tversion handlingkvik
version(5) says: If the server does not understand the client's version string, it should respond with an Rversion message (not Rerror) with the version string the 7 characters ``unknown''. Pre-lib9p file servers -- all except cwfs(4) -- do return Rerror. lib9p(2) follows the above spec, although ignoring the next part concerning comparison after period-stripping. It assumes an Fcall.version starting with "9P" is correctly formed and returns the only supported version of the protocol, which seems alright. This patch brings pre-lib9p servers in accordance with the spec.
2020-05-02make bind(2) error handling consistentcinap_lenrek
The mount() and bind() syscalls return -1 on error, and the mountid sequence number on success. The manpage states that the mountid sequence number is a positive integer, but the kernels implementation currently uses a unsigned 32-bit integer and does not guarantee that the mountid will not become negative. Most code just cares about the error, so test for the -1 error value only.
2018-09-26libc: add procsetname()cinap_lenrek
2016-05-16exportfs: disallow ORCLOSE in readonly mode (charles forsyth)cinap_lenrek
2016-02-14exportfs: retry execing ourselfs as "/bin/exportfs" (argv0 might be relative ↵cinap_lenrek
path)
2014-08-01exportfs: use argv0 instead of hardcoding "/bin/exportfs" in openmount(), ↵cinap_lenrek
dont use 0 for nil
2014-02-21exportfs: bring back the changes, bug was due to rendezvous group being ↵cinap_lenrek
shared by listen exportfs used pid of slave proc as rendezvous tag. when we changed it to use Proc* memory address, there where tag collisions because listen didnt fork the rendezvous group (bug!). for now, just do rfork(RFREND) in main just in case. will fix aux/listen in a follow up changeset. -- cinap
2014-02-21exportfs: reverting previous changescinap_lenrek
getting strange tag mismatches on some machines. needs to be debugged. until then, reverting the change.
2014-02-18exportfs: fix flush races, proc sweepingcinap_lenrek
2013-12-15exportfs: get rid of limits, cleanupcinap_lenrek
get rid of the service buffer limit. keep service buffers on a global freelist protected by lock. dont fatal when we hit the process limit. instead, just abort the rpc with an error. handle rendezvous() interrupts.
2013-10-07exportfs: fix more filedescriptor leakscinap_lenrek
just closing the pipe isnt enough, we have to close all remaining file descriptors except sfd before executing sub exportfs.
2013-10-06exportfs: fix openmount() rfork flags and filedescriptor leak, silence of on ↵cinap_lenrek
initstr error fork child exportfs with new rendezvous group. fix missing close of pipe filedescriptors on error. fix missing close of other end of pipe in child. dont bark when we get eof on the first init string read. this condition can happen when unmount opens and immidiately closes a exported srv file.
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.
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen