Age | Commit message (Collapse) | Author |
|
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.
|
|
Need to close the channel outside of srvlk,
otherwise risk deadlock when recursing.
|
|
|
|
|
|
|
|
readstr can error, we need to catch the error and unlock.
|
|
|
|
this leaks /srvs, revert until we can fix it.
|
|
/srv/clone allows a namespace to get their
own private /srv session.
|
|
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.
|
|
update permissions last in wstat so it will only get changed when there was
no error.
|
|
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|