summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devsrv.c
AgeCommit message (Collapse)Author
2022-12-25devsrv: Various fixes.cinap_lenrek
Make global variables static to avoid symbol clashes. Order Link fields more compactly for 64-bit archs. Add a common freelink() function for freeing Boards and Srvs. Chain all Boards in a circular doubly-linked list, so srvrename() can actually change the owners of *all* the boards instead of just the root. We cannot use recursion here as that could potentially blow the kernel stack. srvname() was also only processing the root. Instead, we add a srvname field to Chan and set it to the original path of the srv file that was used to post the channel. Call openmode() at the beginning of srvopen(). The reason is if omode has invalid bits it can error and leave stuff in a inconsistent state. Prevent srvwstat() to rename a file to "clone", it is reserved. Get rid of "lease expired" error message, just use Eshutdown.
2022-12-12devsrv: fix recusrion deadlock on removecinap_lenrek
Need to close the channel outside of srvlk, otherwise risk deadlock when recursing.
2022-12-03kernel: fix devsrv compilation on arm32Jacob Moody
2022-12-02kernel: private srv boardsJacob Moody
2022-06-29kernel: revert /srv/cloneJacob Moody
2022-06-22kernel: correct error handling in /srv/clone readJacob Moody
readstr can error, we need to catch the error and unlock.
2022-06-21kernel: add /srv/clone to get seperate /srv bulletin boards.Jacob Moody
2022-06-12devsrv: revert 'add /srv/clone'Ori Bernstein
this leaks /srvs, revert until we can fix it.
2022-06-12kernel: add /srv/cloneJacob Moody
/srv/clone allows a namespace to get their own private /srv session.
2020-12-13kernel: implement per file descriptor OCEXEC flag, reject ORCLOSE when ↵cinap_lenrek
opening /fd, /srv and /shr The OCEXEC flag used to be maintained per channel, making it shared between all the file desciptors. This has a unexpected side effects with regard to channel passing drivers such as devdup (/fd), devsrv (/srv) and devshr (/shr). For example, opening a /srv file with OCEXEC makes it impossible to be remounted by exportfs as it internally does a exec() to mount and re-export it. There is no way to reset the flag. This change makes the OCEXEC flag per file descriptor, so a open with the OCEXEC flag only affects the fd group of the calling process, and not the channel itself. On rfork(RFFDG), the per file descriptor flags get copied. On dup(), the per file descriptor flags are reset. The second modification is that /fd, /srv and /shr should reject the ORCLOSE flag, as the files that are returned have already been opend.
2013-06-18devsrv, devshr: wstat permissionscinap_lenrek
update permissions last in wstat so it will only get changed when there was no error.
2013-06-17devsrv: fix wstat(), srvname(), avoid smalloc() while holding srv qlock, stylecinap_lenrek
- wstat would half update the Srv data structure if name was too long - srvname() walked the linked srv list without holding srv qlock - dont access sp->chan while not holding srv qlock in srvopen() - dont modify sp->owner while not holding srv qlock in srvcreate() - avoid smalloc() allocations while holding srv qlock - style pikeshedding, sorry
2012-02-08add Etoolong error string, cleanup genbuf truncation fixcinap_lenrek
2012-02-08fix endless devwalk loops caused by genbuf truncationcinap_lenrek
2011-08-17change definition of Chan.create to return a chan like opencinap_lenrek
2011-08-14devshr/devsrvcinap_lenrek
2011-05-09kbdfscinap_lenrek
2011-04-30boot(8): fix boot restartingcinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen