summaryrefslogtreecommitdiffstats
path: root/sys/fs/pseudofs
Commit message (Collapse)AuthorAgeFilesLines
* s/pfs_badop/vop_eopnotsupp/des2002-05-031-17/+9
| | | | Submitted by: phk
* Convert the pseudofs framework to nmount (thus procfs and linprocfs).mux2002-05-022-8/+8
| | | | Reviewed by: des (some time ago), phk
* Remove stale XXX comment.jhb2002-04-141-1/+0
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-043-3/+4
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Part I: Update extended attribute API and ABI:rwatson2002-02-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | o Modify the system call syntax for extattr_{get,set}_{fd,file}() so as not to use the scatter gather API (which appeared not to be used by any consumers, and be less portable), rather, accepts 'data' and 'nbytes' in the style of other simple read/write interfaces. This changes the API and ABI. o Modify system call semantics so that extattr_get_{fd,file}() return a size_t. When performing a read, the number of bytes read will be returned, unless the data pointer is NULL, in which case the number of bytes of data are returned. This changes the API only. o Modify the VOP_GETEXTATTR() vnode operation to accept a *size_t argument so as to return the size, if desirable. If set to NULL, the size will not be returned. o Update various filesystems (pseodofs, ufs) to DTRT. These changes should make extended attributes more useful and more portable. More commits to rebuild the system call files, as well as update userland utilities to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Change EPERM to EOPNOTSUPP when failing pseudofs_setattr() arbitrarily.rwatson2002-02-041-4/+2
| | | | Quoth the alfred: The latter would be better.
* Return EPERM instead of 0 in the un-implemented pseudofs_setattr().rwatson2002-02-041-2/+1
| | | | Conceivably, it should even return EOPNOTSUPP.
* Staticise pfs_vncache, it's not used anywhere else.msmith2002-01-081-1/+1
| | | | Reviewed by: des
* Do not derefer null.tanimura2002-01-041-0/+4
| | | | Reviewed by: des
* Pseudofs was leaking VFS cache entries badly due to its cache and use ofdillon2001-12-192-4/+22
| | | | | | the wrong VOP descriptor. This misuse caused VFS-cached vnodes to be re-cached, resulting in the leak. This commit is an interim fix until DES has a chance to rework the code involved.
* Add VOP_GETEXTATTR(9) passthrough support to pseudofs.green2001-12-112-0/+55
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-8/+8
| | | | also don't use ANSI string concatenation.
* Fix an incorrect PFS_TRACE. Also, use __func__ instead of __FUNCTION__.des2001-12-091-3/+3
|
* Add support for a last-close handler.des2001-11-273-3/+38
| | | | | Revert the module version bumps; they're quite pointless as long as the only pseudofs consumer is linprocfs, which is in the tree.
* Reduce the number of #include dependencies by declaring some of the structsdes2001-11-034-6/+19
| | | | used in pseudofs.h as opaque structs.
* Add VOP_IOCTL support, and fix a bug that would cause a panic if a file ordes2001-10-262-4/+58
| | | | symlink lacked a filler function.
* Argh! I updated the version number in the MODULE_DEPEND() thingamagook butdes2001-10-191-1/+1
| | | | not in the actual MODULE_VERSION(). Pass me the pointy hat.
* Switch to dynamic rather than static initialization.des2001-10-193-62/+288
| | | | | This makes it possible (in theory) for nodes to be added and / or removed from pseudofs filesystems at runtime.
* Add missing includes of sys/lock.h.jhb2001-10-111-0/+1
|
* Add a PFS_DISABLED flag; pfs_visible() automatically returns 0 if it is setdes2001-10-023-10/+57
| | | | | on the node in question. Also add two API functions for setting and clearing this flag; setting it also reclaims all vnodes associated with the node.
* Only print "XXX (un)registered" message if bootverbose.des2001-10-021-2/+4
|
* [the previous commit to pseudofs_vncache.c got the wrong log message]des2001-10-011-0/+2
| | | | | | | | | | | | YA pseudofs megacommit, part 2: - Merge the pfs_vnode and pfs_vdata structures, and make the vnode cache a doubly-linked list. This eliminates the need to walk the list in pfs_vncache_free(). - Add an exit callout which revokes vnodes associated with the process that just exited. Since it needs to lock the cache when it does this, pfs_vncache_mutex needs MTX_RECURSE.
* YA pseudofs megacommit, part 1:des2001-10-013-79/+181
| | | | | | | | | | | | | | | | - Add a third callback to the pfs_node structure. This one simply returns non-zero if the specified requesting process is allowed to access the specified node for the specified target process. This is used in addition to the usual permission checks, e.g. when certain files don't make sense for certain (system) processes. - Make sure that pfs_lookup() and pfs_readdir() don't yap about files which aren't pfs_visible(). Also check pfs_visible() before performing reads and writes, to prevent the kind of races reported in SA-00:77 and SA-01:55 (fork a child, open /proc/child/ctl, have that child fork a setuid binary, and assume control of it). - Add some more trace points.
* pseudofs.h:des2001-09-302-37/+54
| | | | | | | | | | | | | | | | - Rearrange the flag constants a little to simplify specifying and testing for readability and writeability. pseudofs_vnops.c: - Track the aforementioned change. - Add checks to pfs_open() to prevent opening read-only files for writing or vice versa (pfs_{read,write} would block the actual reads and writes, but it's still a bug to allow the open() to succeed). Also, return EOPNOTSUPP if the caller attempts to lock the file. - Add more trace points.
* Pseudofs take 2:des2001-09-293-54/+170
| | | | | | | | | | | | | | | | | | | | | | | | | - Remove hardcoded uid, gid, mode from struct pfs_node; make pfs_getattr() smart enough to get it right most of the time, and allow for callbacks to handle the remaining cases. Rework the definition macros to match. - Add lots of (conditional) debugging output. - Fix a long-standing bug inherited from procfs: don't pretend to be a read-only file system. Instead, return EOPNOTSUPP for operations we truly can't support and allow others to fail silently. In particular, pfs_lookup() now treats CREATE as LOOKUP. This may need more work. - In pfs_lookup(), if the parent node is process-dependent, check that the process in question still exists. - Implement pfs_open() - its only current function is to check that the process opening the file can see the process it belongs to. - Finish adding support for writeable nodes. - Bump module version number. - Introduce lots of new bugs.
* The previous commit introduced some references to "curproc" which should havedes2001-09-281-2/+2
| | | | been references to "curthread". Correct this.
* Clean up my source tree to avoid getting hit too badly by the next KSE ordes2001-09-252-6/+67
| | | | | whatever mega-commit. This goes some way towards adding support for writeable files (needed by procfs).
* KSE Milestone 2julian2001-09-124-13/+13
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* #if 0 out pfs_null() to silence the warning about it not being referenced.des2001-06-151-0/+2
|
* For some reason, though the module builds just fine without <sys/lock.h>,des2001-06-113-0/+3
| | | | LINT fails to build without it.
* Bail out if the fill function failed.des2001-06-101-0/+10
|
* Whoops, some of my test code snuck in here.des2001-06-101-1/+1
|
* Argh. Fix braino in previous commit.des2001-06-101-1/+1
|
* Add a 'flags' argument to the PFS_PROCDIR macro.des2001-06-101-2/+2
|
* Add support for process-dependent directories. This means that save fordes2001-06-106-147/+195
| | | | the lack of a man page, pseudofs is mostly complete now.
* Blah, not my day. This file needs <sys/mutex.h> now.des2001-06-101-0/+1
|
* Remember to unlock the process pfind() returns.des2001-06-101-1/+5
|
* Add missing #include of <sys/mutex.h>.des2001-06-103-0/+3
|
* Catch up with the change in sbuf_new's prototype.des2001-06-101-8/+8
|
* Let pseudofs into the warmth of the FreeBSD CVS repo.des2001-04-076-0/+1289
It's not finished yet (I still have to find a way to implement process- dependent nodes without consuming too much memory, and the permission system needs tightening up), but it's becoming hard to work on without a repo (I've accidentally almost nuked it once already), and it works (except for the lack of process-dependent nodes, that is). I was supposed to commit this a week ago, but timed out waiting for jkh to reply to some questions I had. Pass him a spoonful of bad karma :)
OpenPOWER on IntegriCloud