sommerfeld
197579af47
Change variable used for directory offset from "int" to "off_t".
...
Overkill, but avoids a host of truncation problems.
1999-08-25 14:42:35 +00:00
sommerfeld
2e649e46d3
Fix PR8270:
...
Problem turned out to be due to improper handling of reads beyond EOF:
they should just return without error with the uio unchanged, and the
caller will recognize this as a zero-byte return (EOF).
The previous fix to protect directory reads against bogus uio_offset
values returned EINVAL, which broke mount -o union, which only
union'ed in the lower directory if the upper directory cleanly
returned EOF.
While we're here, protect kernfs as well.
1999-08-24 23:29:08 +00:00
christos
582a6def8b
protect against large uio_offset
1999-08-14 02:20:19 +00:00
wrstuden
3bf14d81e9
Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
...
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().
Reviewed by: thorpej
Tested by: wrstuden
1999-08-03 20:19:16 +00:00
thorpej
fc04cf9982
Add calls to lock the proclist as appropriate.
1999-07-25 18:33:47 +00:00
thorpej
f9b0db3013
Fix a paste-o in procfs_lookup() introduced with the vnode locking changes.
...
Fixes PR #7961 , Mario Kemper <magick@bundy.lip.owl.de>.
1999-07-14 23:52:22 +00:00
wrstuden
9fc36d6807
Bump osrelease to 1.4E. Add layerfs files, remove null_subr.c.
...
Update coda to new struct lock in struct vnode.
make fdescfs, kernfs, portalfs, and procfs actually lock their vnodes.
It's not that hard.
Make unionfs set v_vnlock = NULL so any overlayed fs will call its
VOP_LOCK.
1999-07-08 01:26:21 +00:00
christos
8aa2fc5ab8
PR/7143: Jaromir Docelek: Add procfs/cmdline from Linux emulation
1999-03-12 18:45:40 +00:00
msaitoh
ea669760d6
Add /proc/#/map. From FreeBSD.
1999-01-25 02:20:08 +00:00
thorpej
970e60efb8
- Use proclists[], rather than checking allproc and zombproc explicitly.
...
- Add some comments about locking.
1998-09-08 23:50:13 +00:00
kleink
5350df2953
Per POSIX, fail with EINVAL if advisory locking is attempted on a file type
...
that doesn't support it, rather than using a homegrown EBADF or EOPNOTSUPP.
1998-08-13 10:06:31 +00:00
matthias
574106c52b
create miscfs/genfs/genfs_vnops.c:genfs_enoioctl and make all the other
...
filesystems use it instead of a private version.
1998-08-10 08:11:10 +00:00
perry
4522c799a1
bzero->memset, bcopy->memcpy, bcmp->memcmp
1998-08-09 20:51:08 +00:00
kleink
12a866151b
Recognize _PC_SYNC_IO.
1998-08-03 14:19:57 +00:00
fvdl
811dba68c1
procfs_readdir: in case of error, check if cookies actually have
...
been allocated before freeing them. From Wolfgang Solfrank.
1998-04-21 16:36:37 +00:00
fvdl
e5bc90f40c
Merge with Lite2 + local changes
1998-03-01 02:20:01 +00:00
fvdl
ce56587f15
Bump last argument to VOP_READDIR to off_t (from u_long).
1997-10-10 02:01:05 +00:00
thorpej
a79a3ca472
Fix a reversed argument which caused procfs_checkioperm() to always return
...
"OK". Add a few comments to avoid further confusion.
1997-08-27 08:52:51 +00:00
thorpej
f9777e4a1c
Fix the procfs hole described on current-users, similar to a fix for
...
FreeBSD by Sean Eric Fagan, but a bit different. This makes the checks
in the same places as sef's FreeBSD patch, but does not hardcode the
"kmem" group into the kernel, and also does a check identical to the
(3) and (4) checks in the NetBSD ptrace(2):
(1) it's not owned by you, or is set-id on exec (unless
you're root), or
(2) it's init, which controls the security level of the
entire system, and the system was not compiled with
permanently insecure mode turned on.
1997-08-12 22:47:18 +00:00
mycroft
e3f99a9397
Pass the vnode type to vaccess(), and use it when checking VEXEC. Make sure
...
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.
1997-05-08 16:19:43 +00:00
mycroft
4d213ec5e7
Need stat.h.
1997-05-05 07:34:09 +00:00
mycroft
1e3c14a909
Eliminate bogus uses of V{READ,WRITE,EXEC}. Use S_I[RWX]{USR,GRP,OTH} where
...
appropriate.
1997-05-05 07:13:57 +00:00
mycroft
8a33a13c65
Minor code cleanup.
1997-04-28 03:49:57 +00:00
cgd
a67c0b16b8
define path name string variables that we should not (and, thankfully, do
...
not) modify as 'const char *' rather 'char *'.
1996-10-25 21:57:58 +00:00
christos
92a808f167
backout previous kprintf changes
1996-10-13 02:21:25 +00:00
christos
60d201973e
printf -> kprintf, sprintf -> ksprintf
1996-10-10 22:46:11 +00:00
mycroft
2bc736661a
Implement poll(2).
1996-09-07 12:40:22 +00:00
mycroft
c52352c819
Add a set of generic file system operations that most file systems use.
...
Also, fix some time stamp bogosities.
1996-09-01 23:47:48 +00:00
christos
da749d6e09
Fix printf format follies.
1996-03-16 23:52:42 +00:00
mycroft
183aec8fa8
GC *_nullop(). Minor nits.
1996-02-13 13:12:48 +00:00
christos
19dc07be15
close PR/2063: procfs_rw prototyped twice with different prototypes
1996-02-12 15:01:41 +00:00
christos
631ccba638
miscfs prototype changes
1996-02-09 22:39:56 +00:00
mycroft
53fccab940
Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
...
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
cleanup.
* Require the file system to decide whether or not linking and unlinking of
directories is allowed, and disable it for all current file systems.
1996-02-09 14:45:36 +00:00
mycroft
d60bb4a465
Use the index number as the cookie, rather than multiplying by UIO_MX.
1995-10-09 14:03:32 +00:00
mycroft
bcaf2bca34
Add support for cookies, mostly from Greg Hudson.
1995-10-09 11:18:51 +00:00
cgd
13f5026553
fix timeval vs. timespec warnings
1995-04-15 01:56:43 +00:00
mycroft
597bdad3df
Return EROFS rather than ENOENT in many cases. Also some cosmetic cleanup.
1995-02-03 16:18:46 +00:00
mycroft
609063ce2b
Format police.
1994-12-27 19:05:12 +00:00
ws
2f0fb8ee09
Implement and use a common access checking routine
1994-12-24 16:44:12 +00:00
mycroft
7276c4ed44
Remove a_fp.
1994-12-14 18:45:21 +00:00
christos
a1dbf4aaa5
fixed struct comment
1994-11-14 06:08:21 +00:00
cgd
6ac2bbfc35
be more careful with types, also pull in headers where necessary.
1994-10-30 21:43:03 +00:00
cgd
6b86130410
update for new syscall args description mechanism
1994-10-20 04:22:35 +00:00
mycroft
2f710a54ee
Convert process, file, and namei lists and hash tables to use queue.h.
1994-08-30 03:04:28 +00:00
cgd
cf92afd66e
New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
1994-06-29 06:29:24 +00:00
mycroft
18157b489f
Remove an unneeded test.
1994-06-16 06:01:19 +00:00
mycroft
117527f322
Minor update from JSP after merging my changes.
1994-06-15 22:54:38 +00:00
mycroft
cde1d47595
Update to 4.4-Lite fs code, with local changes.
1994-06-08 11:33:09 +00:00
cgd
a0a7429482
lots of changes: prototype migration, move lots of variables, definitions,
...
and structure elements around. kill some unnecessary type and macro
definitions. standardize clock handling. More changes than you'd want.
1994-05-05 05:35:42 +00:00
cgd
914b690745
forgot these...
1994-04-15 20:49:27 +00:00