summaryrefslogtreecommitdiff
path: root/sys/src/cmd/exportfs/exportfs.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.
2019-09-21cmd/ip/*: chown the network connection after authenticationcinap_lenrek
for servers that handle incoming network connections and authentication, change the owner of the network connection file to the authenticated user after successfull authentication. note that we set the permissions as well to 0660 because old devip used to unconditionally set the bits.
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-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: 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-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-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().
2012-06-25exportfs/import: cleanupcinap_lenrek
2012-06-25exportfs: fix bugs, error consistency, cleanupcinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen