summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Create a bidirectional mapping of the DOS 'read only' attributebp2006-11-053-2/+20
| | | | | | | | to the 'w' flag. PR: kern/77958 Submitted by: ghozzy gmail com MFC after: 1 month
* Make KSE a kernel option, turned on by default in all GENERICjb2006-10-261-0/+10
| | | | | | | kernel configs except sun4v (which doesn't process signals properly with KSE). Reviewed by: davidxu@
* Ditch crummy fattime <--> timespec conversion functionsphk2006-10-241-149/+8
|
* Drop crummy fattime to timespec conversion routines.phk2006-10-241-163/+12
| | | | Leave a XXX here for anybody able to test.
* Replace slightly crummy fattime<->timespec conversion functions.phk2006-10-245-180/+16
|
* Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.hrwatson2006-10-222-2/+4
| | | | | | | | | | | | | begun with a repo-copy of mac.h to mac_framework.h. sys/mac.h now contains the userspace and user<->kernel API and definitions, with all in-kernel interfaces moved to mac_framework.h, which is now included across most of the kernel instead. This change is the first step in a larger cleanup and sweep of MAC Framework interfaces in the kernel, and will not be MFC'd. Obtained from: TrustedBSD Project Sponsored by: SPARTA
* Fake the link count until we have no choice but to load data from thetrhodes2006-10-211-1/+1
| | | | | | | MFT. PR: 86965 Submitted by: Lowell Gilbert <lgfbsd@be-well.ilk.org>
* Update the access and modification times for dev while still holdingkib2006-10-201-2/+2
| | | | | | | thread reference on it. Reviewed by: tegge Approved by: pjd (mentor)
* Fix the race between devfs_fp_check and devfs_reclaim. Derefence thekib2006-10-201-5/+9
| | | | | | | | vnode' v_rdev and increment the dev threadcount , as well as clear it (in devfs_reclaim) under the dev_lock(). Reviewed by: tegge Approved by: pjd (mentor)
* Properly lock the vnode around vgone() calls.kib2006-10-184-25/+113
| | | | | | | | | | | Unlock the vnode in devfs_close() while calling into the driver d_close() routine. devfs_revoke() changes by: ups Reviewed and bugfixes by: tegge Tested by: mbr, Peter Holm Approved by: pjd (mentor) MFC after: 1 week
* Use utc_offset() where applicable, and hide the internals of itphk2006-10-022-10/+6
| | | | as static variables.
* First part of a little cleanup in the calendar/timezone/RTC handling.phk2006-10-022-1/+2
| | | | | | Move relevant variables to <sys/clock.h> and fix #includes as necessary. Use libkern's much more time- & spamce-efficient BCD routines.
* Fix our ioctl(2) implementation when the argument is "int". Newru2006-09-271-4/+27
| | | | | | | | | | | | | ioctls passing integer arguments should use the _IOWINT() macro. This fixes a lot of ioctl's not working on sparc64, most notable being keyboard/syscons ioctls. Full ABI compatibility is provided, with the bonus of fixing the handling of old ioctls on sparc64. Reviewed by: bde (with contributions) Tested by: emax, marius MFC after: 1 week
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.tegge2006-09-2612-3/+50
| | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
* Fix the bug in rev. 1.134. In devfs_allocv_drop_refs(), when not_found == 2kib2006-09-191-1/+1
| | | | | | | | | and drop_dm_lock is true, no unlocking shall be attempted. The lock is already dropped and memory is freed. Found with: Coverity Prevent(tm) CID: 1536 Approved by: pjd (mentor)
* Resolve the devfs deadlock caused by LOR between devfs_mount->dm_lock andkib2006-09-184-16/+113
| | | | | | | | | | | | | | | vnode lock in devfs_allocv. Do this by temporary dropping dm_lock around vnode locking. For safe operation, add hold counters for both devfs_mount and devfs_dirent, and DE_DOOMED flag for devfs_dirent. The facilities allow to continue after dropping of the dm_lock, by making sure that referenced memory does not disappear. Reviewed by: tegge Tested by: kris Approved by: kan (mentor) PR: kern/102335
* Put the osta.c license on osta.h. The license is the same.imp2006-09-121-0/+15
| | | | Approved by: scottl@
* while (0); -> while (0) in multi-line macrosimp2006-08-171-1/+1
|
* Introduce a field to struct vm_page for storing flags that arealc2006-08-092-2/+2
| | | | | | | | | | | | | | | | synchronized by the lock on the object containing the page. Transition PG_WANTED and PG_SWAPINPROG to use the new field, eliminating the need for holding the page queues lock when setting or clearing these flags. Rename PG_WANTED and PG_SWAPINPROG to VPO_WANTED and VPO_SWAPINPROG, respectively. Eliminate the assertion that the page queues lock is held in vm_page_io_finish(). Eliminate the acquisition and release of the page queues lock around calls to vm_page_io_finish() in kern_sendfile() and vfs_unbusy_pages().
* Commit the results of the typo hunt by Darren Pilgrim.yar2006-08-041-1/+1
| | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week
* When the volume is being downgraded from a read-write mode, markdelphij2006-08-031-0/+4
| | | | | | | | it as clean. PR: kern/85366 Submitted by: Dan Lukes <dan at obluda dot cz> MFC After: 2 weeks
* In udf_find_partmaps(), when we find a type 1 partition map, we have toyar2006-07-252-10/+13
| | | | | | | skip the actual type 1 length (6 bytes). With this change, it is now possible to correctly spot the VAT partition map in certain discs. Submitted by: Pedro Martelletto <pedro@ambientworks.net>
* Update comment.jhb2006-07-181-1/+1
|
* Lock the smb share before doing a 'put' on it in smbfs_unmount().jhb2006-07-171-0/+3
| | | | Tested by: "Jiawei Ye" <leafy7382 at gmail>
* Remove the NDEVFSINO and NDEVFSOVERFLOW options which no longer exists inphk2006-07-174-18/+0
| | | | | | DEVFS. Remove the opt_devfs.h file now that it is empty.
* Add vnode interlocking to devfs.ups2006-07-121-16/+33
| | | | | | | This prevents race conditions that can cause pagefaults or devfs to use arbitrary vnodes. MFC after: 1 week
* Add a kern_close() so that the ABIs can close a file descriptor w/o havingjhb2006-07-081-4/+2
| | | | to populate a close_args struct and change some of the places that do.
* Remove unneeded mac.h include.rwatson2006-07-061-1/+0
| | | | MFC after: 3 days
* Remove now unneeded opt_mac.h and mac.h includes.rwatson2006-07-061-2/+0
| | | | MFC after: 3 days
* Use #include "", not #include <> for opt_foo.h.rwatson2006-07-061-2/+2
| | | | MFC after: 3 days
* Correctly calculate a buffer length. It was off by one so a read() returnednetchild2006-06-271-1/+1
| | | | | | | | | | | | | one byte less than needed. This is a RELENG_x_y candidate, since it fixes a problem with Oracle 10. Noticed by: Dmitry Ganenko <dima@apk-inform.com> Testcase by: Dmitry Ganenko <dima@apk-inform.com> Reviewed by: des Submitted by: rdivacky Sponsored by: Google SoC 2006 MFC after: 1 week
* Fix a memory leak and a nested 'for' loop in the spare table handling.scottl2006-06-261-4/+6
| | | | Submitted by: Pedro Martelletto
* Upon further review, DES prefers this change over that in revision 1.13ghelmer2006-06-051-6/+4
| | | | | | | to resolve the directory access problem for processes with P_SUGID flag set. Suggested by: des
* mount_msdosfs.c:rodrigc2006-06-011-1/+1
| | | | | | | | | | | | | | - remove call to getmntopts(), and just pass -o options to nmount(). This removes some confusion as to what options msdosfs can parse, by pushing the responsibility of option parsing to the VFS and FS specific code in the kernel. msdosfs_vfsops.c: - add "force" and "sync" to msdosfs_opts. They used to be specified in mount_msdosfs.c, so move them here. It's not clear whethere these options should be placed into global_opts in vfs_mount.c or not. Motivated by: marcus
* Enable inadvertantly disabled "securenet" access controls in ypserv. [1]cperciva2006-05-311-1/+8
| | | | | | | | Correct a bug in the handling of backslash characters in smbfs which can allow an attacker to escape from a chroot(2). [2] Security: FreeBSD-SA-06:15.ypserv [1] Security: FreeBSD-SA-06:16.smbfs [2]
* Remove incorrect null_checkexp() routine. Thisrodrigc2006-05-281-14/+0
| | | | | | | | | | | will allow the NFS server to call vfs_stdcheckexp() on the exported nullfs filesystem, not the underlying filesystem being nullfs mounted. If the lower filesystem was not NFS exported, then the NFS exported null filesystem would not work. Pointed out by: scottl PR: kern/87906 MFC after: 1 week
* Modify MNT_UPDATE behavior for nullfs so that it does notrodrigc2006-05-281-2/+7
| | | | | | | | return EOPNOTSUPP if an "export" parameter was passed in. This should allow nullfs mounts to be NFS exported. PR: kern/87906 MFC after: 1 week
* Remove calls to vfs_export() for exporting a filesystem for NFS mountingrodrigc2006-05-261-8/+1
| | | | | from individual filesystems. Call it instead in vfs_mount.c, after we call VFS_MOUNT() for a specific filesystem.
* Remove calls to vfs_export() for exporting a filesystem for NFS mountingrodrigc2006-05-263-33/+15
| | | | | from individual filesystems. Call it instead in vfs_mount.c, after we call VFS_MOUNT() for a specific filesystem.
* Call vm_object_page_clean() with the object lock held.ups2006-05-252-2/+8
| | | | | | Submitted by: kensmith@ Reviewed by: mohans@ MFC after: 6 days
* Do not set B_NOCACHE on buffers when releasing them in flushbuflist().ups2006-05-252-0/+8
| | | | | | | | | | | | | | | If B_NOCACHE is set the pages of vm backed buffers will be invalidated. However clean buffers can be backed by dirty VM pages so invalidating them can lead to data loss. Add support for flush dirty page in the data invalidation function of some network file systems. This fixes data losses during vnode recycling (and other code paths using invalbuf(*,V_SAVE,*,*)) for data written using an mmaped file. Collaborative effort by: jhb@,mohans@,peter@,ps@,ups@ Reviewed by: tegge@ MFC after: 7 days
* Revision 1.4 set access for all sensitive files in /proc/<PID> to mode 0ghelmer2006-05-241-3/+6
| | | | | | | | | | if a process's uid or gid has changed, but the /proc/<PID> directory itself was also set to mode 0. Assuming this doesn't open any security holes, open access to the /proc/<PID> directory for users other than root to read or search the directory. Reviewed by: des (back in February) MFC after: 3 weeks
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-162-2/+0
| | | | unnecessary.
* Restore the ability to mount procfs and fdescfs filesystems via thekbyanc2006-05-153-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | mount(2) system call: * Add cmount hook to fdescfs and pseudofs (and, by extension, procfs and linprocfs). This (mostly) restores the ability to mount these filesystems using the old mount(2) system call (see below for the rest of the fix). * Remove not-NULL check for the data argument from the mount(2) entry point. Per the mount(2) man page, it is up to the individual filesystem being mounted to verify data. Or, in the case of procfs, etc. the filesystem is free to ignore the data parameter if it does not use it. Enforcing data to be not-NULL in the mount(2) system call entry point prevented passing NULL to filesystems which ignored the data pointer value. Apparently, passing NULL was common practice in such cases, as even our own mount_std(8) used to do it in the pre-nmount(2) world. All userland programs in the tree were converted to nmount(2) long ago, but I've found at least one external program which broke due to this (presumably unintentional) mount(2) API change. One could argue that external programs should also be converted to nmount(2), but then there isn't much point in keeping the mount(2) interface for backward compatibility if it isn't backward compatible.
* Remove unused prototypes.pjd2006-04-121-2/+0
|
* - Add a bogus vhold/vdrop around vgone() in devfs_revoke. Without thisjeff2006-03-311-0/+3
| | | | | the vnode is never recycled. It is bogus because the reference really should be associated with the devfs dirent.
* Call vn_start_write() before locking vnode.tegge2006-03-191-2/+2
|
* Add a_fdidx to comment prototype for fifo_open().rwatson2006-03-151-0/+1
| | | | | MFC after: 3 days Submitted by: Kostik Belousov <kostikbel at gmail dot com>
* If fifo_open() is called with a negative file descriptor, return EINVALrwatson2006-03-141-0/+2
| | | | | | | | | | | rather than panicking later. This can occur if the kernel calls vn_open() on a fifo, as there will be no associated file descriptor, and therefore the file descriptor operations cannot be modified to point to the fifo operation set. MFC after: 3 days Reported by: Martin <nakal at nurfuerspam dot de> PR: 94278
* When encountering a ISO_SUSP_CFLAG_ROOT element in Rock Ridgejoerg2006-03-131-3/+1
| | | | | | | | | | | | | | | | processing, this actually means there's a double slash recorded in the symbolic link's path name. We used to start over from / then, which caused link targets like ../../bsdi.1.0/include//pathnames.h to be interpreted as /pathnahes.h. This is both contradictionary to our conventional slash interpretation, as well as potentially dangerous. The right thing to do is (obviously) to just ignore that element. bde once pointed out that mistake when he noticed it on the 4.4BSD-Lite2 CD-ROM, and asked me for help. Reviewed by: bde (about half a year ago) MFC after: 3 days
OpenPOWER on IntegriCloud