summaryrefslogtreecommitdiff
path: root/sys/src/cmd/exportfs
AgeCommit message (Collapse)Author
2016-07-24make error handling in 9p service loops consistentcinap_lenrek
when we get eof, stop the loop immidiately and do not rely on the read to eventually return an error. when convM2S() fails to decode the message, error out and stop the loop. there is no point in continuing.
2016-05-16exportfs: disallow ORCLOSE in readonly mode (charles forsyth)cinap_lenrek
2016-02-21exportfs: fix endless loop for eof/error on second read in localread9pmsg()cinap_lenrek
the ini buffer was not reset when we got eof in the message body read causing a endless loop. instead of defining our own read9pmsg() function, just handle the first read specially when we consumed the first 4 bytes for the "impo" protocol escape check.
2016-02-14exportfs: retry execing ourselfs as "/bin/exportfs" (argv0 might be relative ↵cinap_lenrek
path)
2016-02-14exportfs: properly reply to chdir() error when we speak 9pcinap_lenrek
when we got a bad root tree, we should speak the right language and return a Rerror response instead of crapping ascii into the 9p conversation.
2015-12-16import/expoerfs: dont assert() fault when ai->secret is > 8 bytes, just use ↵cinap_lenrek
the first 8 bytes
2014-08-14import: make aan (-p flag) work in ``backwards mode'' (-B)cinap_lenrek
in backwards mode, the roles of the aan filters need to be reversed. add "-n address" option to import to override the announce address for the aan server part (default tcp!*!0).
2014-08-02exportfs: simplify freefile() codecinap_lenrek
remove impossible checks, rewrite as while loop.
2014-08-02exportfs: remove getsbuf() nil check, can't happencinap_lenrek
2014-08-02exportfs: cleanupcinap_lenrek
2014-08-01exportfs: use argv0 instead of hardcoding "/bin/exportfs" in openmount(), ↵cinap_lenrek
dont use 0 for nil
2014-03-11exportfs: avoid closing netfd in filter()cinap_lenrek
netfd is initially zero (stdin), when filter() closes fd0, fd0 is free to be reused. this causes problems with openmount() that assumes sfd being >2. instead, we dup the our pipe end over netfd, and close the pipe.
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-08exportfs: start filter in separate rendezvous groupcinap_lenrek
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-06-16make filesystem handling of read9pmsg() consistentcinap_lenrek
2013-02-10exportfs: applying exportfs-chdir patch (from sources)cinap_lenrek
Fix the behavior of exportfs -r. Check the return of chdir(srv) to prevent exporting accidentally the current working directory when the directory specified with option -r doesn't exist. Also fix at the same time the missing trailing \n in error messages printed just before exits().
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-06-25exportfs/import: cleanupcinap_lenrek
2012-06-25exportfs: fix bugs, error consistency, cleanupcinap_lenrek
2012-02-07bring manpage and debug code of exportfs -P closer to realitycinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen