Commit Graph

125 Commits

Author SHA1 Message Date
tls 6321478a33 At securelevel >=2, don't allow new mounts, only allow change from rw to ro. 1998-11-14 06:38:54 +00:00
thorpej 2f3f9379cf Add a couple more file systems to mountcompatnames[] (even though they
didn't exist in 4.3BSD or NetBSD 0.9) and always put the table into
the kernel.  It's going to be needed for VFS sysctls.
1998-11-13 04:12:35 +00:00
perry 275d1554aa Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)
1998-08-04 04:03:10 +00:00
perry 730baa7431 fix sizeofs so they comply with the KNF style guide. yes, it is pedantic. 1998-07-31 22:50:48 +00:00
jonathan d275e56dee * defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 08:49:30 +00:00
thorpej bc799897fc Implement pread(2), pwrite(2), preadv(2), and pwritev(2). 1998-06-30 19:36:24 +00:00
sommerfe 7ba7fbbb23 Always include fifos; "not an option any more". 1998-06-24 20:58:44 +00:00
sommerfe becaafeea0 defopt for options FIFO 1998-06-22 22:00:59 +00:00
kleink e9d6f5e996 Per IEEE Std 1003.1b-1993, implement the fdatasync() system call which is
identical to fsync() with the expecption of not being required to synchronize
file status information.
1998-06-05 20:31:36 +00:00
kleink 382743ada3 Convert fsync vnode operator implementations and usage from the old `waitfor'
argument and MNT_WAIT/MNT_NOWAIT to `flags' and FSYNC_WAIT.
1998-06-05 19:53:00 +00:00
kleink 3a1500efe9 Per X/Open CAE Spec Issue 5 Version 2, change the buffer size argument of
readlink() from type `int' to type `size_t'.  This isn't an ABI change, since
the calling convention of our only LP64 platform (the Alpha) already promotes
this argument to a `long'.

This may not be the final action on this matter; readlink() still returns
an `int', which may change in a future revision of the standard.
1998-03-27 13:02:20 +00:00
kleink 071ab13ebb Move the permission check in change_owner() back to ufs_vnops::ufs_chown()
again - the facility required in this context would be a filesystem-specific
super-user determination, which is not available yet.  Also, add some
clarification to a comment.
1998-03-10 11:49:33 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
kleink 3ef309317a * Factor out some permission-checking code from ufs_setattr() into
change_owner().
* Change the semantics of chown(), fchown() and lchown(): when requesting a
  change of the owner of a file, clear the set-user-id bit; analogous behaviour
  for group changes.
* Since the above is a violation of the semantics specified by POSIX and
  X/Open, add corresponding compatibility syscalls: __posix_chown(),
  __posix_fchown(), __posix_lchown().  (Neither fchown() nor lchown() is
  specified by POSIX; the prefix is intended to reflect the semantics.)
* Rename posix_rename() to __posix_rename() to follow the above convention.
1998-02-14 19:49:43 +00:00
mrg d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00
mrg 1a8c7604f4 initial import of the new virtual memory system, UVM, into -current.
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)
1998-02-05 07:59:28 +00:00
thorpej ec98cfce8a sys_mount(): Use vfs_getopsbyname() rather than groveling the vfssw[]
manualls.
1998-02-03 09:11:55 +00:00
kleink 087ac96d12 Update to last commit: do not pass the accounting flag to suser(), since the call does not actually *use* super-user privileges. Pointed out by Charles. 1997-12-21 18:50:57 +00:00
kleink aa4d1febf1 Due to the feedback received, change chown(), fchown() and lchown() not to
clear the setgid and setuid bits if called by the superuser.  Addresses
PR kern/4662.
1997-12-21 17:49:18 +00:00
enami 4589c896eb Conditionalize the recognition of symbolic link permission by
per fs mount option `symperm'.
1997-10-30 22:47:06 +00:00
thorpej 14cd99880c Fix the shared library versioning snafu caused by the recent changes
to the stat(2) family and msync(2).  This uses a primitive function
versioning scheme.

This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.

From Frank van der Linden <fvdl@NetBSD.ORG>.
1997-10-20 22:05:06 +00:00
mycroft 9341cad610 After conversion of the file flags, if neither FREAD nor FWRITE is set,
return EINVAL.
1997-10-19 17:18:10 +00:00
mycroft 11c9f28f0e Update comment. 1997-10-19 03:29:20 +00:00
enami db7f1ad2ad Check read permission of symbolic link in vfs layer, when doing readlink(2).
Suggested by der Mouse.  Ok'ed by Jason R. Thorpe.
1997-10-11 00:05:15 +00:00
fvdl 541b204984 Add vn_readdir function for use in both the old getdirentries and
the new getdents(). Add getdents().
1997-10-10 02:09:30 +00:00
thorpej b4b543bc6f In sys_mount(), use vfs_getopsbyname() rather than using an explicit
reference to vfssw[].
1997-10-09 00:39:19 +00:00
thorpej c08ce9b419 If COMPAT_09 or COMPAT_43 are defined, include a table of "mount compatnames",
which maps the old file system index numbers to the new (well, since after
NetBSD 0.9) string-based method of finding a file system ops vector.  Use
this table rather than assuming the ordering of the vfssw[] array when
emulating the old mount system call.
1997-10-06 09:19:11 +00:00
enami 83d3cd0ec7 New function sys_lchmod(), sys_lchown() and sys_lutimes() to manipulate
symbolic links.
1997-10-03 14:44:26 +00:00
enami ea531316f0 - New function change_mode() to set mode given a vnode.
- New function change_utimes() to set access and modification times
  given a vnode.
- In the function sys_chmod() and sys_fchmod(), call change_mode().
- In the function sys_utimes() and sys_futimes(), call
  change_utimes().
1997-10-03 14:14:36 +00:00
enami a117f2d89b Reorder some piece of code;
In the function sys_utimes, do NDINIT() and namei() first.
In the function sys_futimes, do getvnode() first.
1997-10-03 13:46:02 +00:00
enami dec1d15959 In the function sys_chmod and sys_utimes, use VOP_UNLOCK(vp) and vrele(vp)
instead of vput(vp).
1997-10-03 13:37:33 +00:00
enami ba054536f8 Fold lone line to fit column < 80. 1997-10-03 13:32:06 +00:00
enami 9f882ea0ee Cosmetic change;
(error = ...) -> (error = ...) != 0, like other place.
1997-10-03 13:29:20 +00:00
kleink 66105c37fc Lseek(2) usage cleanup: the use of L_SET/L_INCR/L_XTND is deprecated,
use SEEK_SET/SEEK_CUR/SEEK_END instead.
1997-08-25 19:31:43 +00:00
fvdl b5e26aee04 Invalidate publicly exported FS info when unmounting it locally. 1997-06-24 23:44:57 +00:00
kleink d3aadd8976 Add posix_rename() syscall. 1997-05-18 19:56:48 +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 837a72363d VEXEC -> VLOOKUP, as appropriate. 1997-05-08 10:57:17 +00:00
mycroft d7f33c5e60 va_mode contains stat bits. Use S_IS[UG]ID rather than VS[UG]ID. 1997-05-08 10:19:10 +00:00
kleink 29c5707479 * Make chown()/fchown() use a piece of common code to set ownership.
* Setting the ownership of a file now implies clearing its set-{group,user}-id
  bits.
1997-04-30 19:29:43 +00:00
kleink e490ffb5cc Addendum to last commit: "simplify" usage of a vnode pointer. 1997-04-11 22:08:28 +00:00
kleink 589549e022 Use VOP_SEEK() in lseek(2). 1997-04-11 22:03:58 +00:00
kleink 116d655640 Back out POSIX.1 conformance change to lseek(2); this will be attended to
in a different way.
1997-04-09 23:26:06 +00:00
kleink 9300dedf8e Back out last change to rename(2) until a sane solution for the coexistence
of both BSD and POSIX semantics is available.
1997-04-07 00:04:16 +00:00
kleink 9d8538dd8b Changed lseek(2): return EINVAL upon attempt to seek to negative offset. 1997-04-04 13:57:06 +00:00
kleink 50ccaeca39 Converted rename(2) to proper POSIX.1 behavior: if "from" and "to"
are links to the same file, do nothing. This also eliminates the
previous (and incorrect) check, which was far more complicated.
1997-04-04 13:32:48 +00:00
fvdl 9599f78147 Add missing part of MNT_NOATIME commit: add it to the flags that can
be set by the mount system call.
1997-03-13 20:20:39 +00:00
fvdl 0538233e2c Implement changes to make fix for NQNFS and MFS unmounting (race conditions)
work. Not quite as good as with the Lite2 merges, but it'll do until then.

* dounmount() expects to be called with the mountpoint marked busy
* all callers of dounmount() thus make the call themselves
* if a filesystem was being unmounted, and we're woken up in vfs_busy(),
  don't reference the mountpoint struct pointer, as it has very probably
  been freed.
1997-02-22 03:22:32 +00:00
mikel b0e7d3c13b sync filesystems in reverse order. suggested originally by Jim Rees
<rees@citi.umich.edu>, with some updating by Greg Hudson <ghudson@mit.edu>.
1997-02-20 04:52:44 +00:00
tls 4b1213d27c sync needs to clean VM objects backed by vnode pagers 1997-02-13 02:54:06 +00:00