summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devshr.c
AgeCommit message (Collapse)Author
2022-05-28kernel: add chdev command to devconsJacob Moody
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.
2020-03-08devshr: unmount service on #σc/share/mount removalcinap_lenrek
when the control mountpoint side gets removed, close mount channel immediately. this is usefull for implementing automatic cleanup with ORCLOSE create mode.
2015-08-09kernel: pgrpcpy(), simplify Mount structurecinap_lenrek
instead of ordering the source mount list, order the new destination list which has the advantage that we do not need to wlock the source namespace, so copying can be done in parallel and we do not need the copy forward pointer in the Mount structure. the Mhead back pointer in the Mount strcture was unused, removed.
2015-07-28kernel: export mntattach() from devmnt.c avoiding bogus struct passing and ↵cinap_lenrek
special case in namec() we already export mntauth() and mntversion(), so why not stop being sneaky and just export mntattach() so bindmount() and devshr can just call it directly with proper arguments being checked. we can also avoid handling #M attach specially in namec() by having the devmnt's attach function do error(Enoattach).
2013-08-27devshr, devaudio: openmode()/devopen() error handlingcinap_lenrek
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-18devshr: fix wstat, stylecinap_lenrek
- same problem with wstat, if we error then owner has been already updated... - avoid smalloc while holding qlock in wstat, do it before - pikeshedd style...
2012-09-06devshr: honor noattachcinap_lenrek
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-15devshr: security!cinap_lenrek
2011-08-14devshr/devsrvcinap_lenrek
2011-07-30devshr: changed #σc to contain directoriesaiju
nusb: detaching
2011-07-28devshr: rename hookaiju
2011-07-27devshr: fixed crashaiju
2011-07-25devshr: fixed memory leaks / race conditionaiju
2011-07-24devshr: added unmountingaiju
2011-07-24added devshraiju