Commit Graph

129 Commits

Author SHA1 Message Date
lukem dadffc77c0 Fix sign-compare issues. 2009-04-12 06:36:12 +00:00
christos 90baf4f26f only print warnings if vflg. 2009-02-26 17:30:51 +00:00
wiz 0ca945fa16 Sockets: Do not mention printing flags, because they are not printed.
From Stephan A. Rickauer via jmc@openbsd.

Bump date.
2009-01-04 17:19:39 +00:00
christos 4fe86cf5b0 64 bit dev_t 2008-12-29 00:59:08 +00:00
gmcgarry 0e0358051d Cast f_type to signed integer before comparison with negative values. 2008-09-09 00:56:23 +00:00
pooka f00b7c9b12 Solve the fstat-wants-to-look-at-kernel-data-structures in a nicer
way: don't export the fs internals to innocent userspace programs
which just want to mount the file system.
2008-07-29 09:10:09 +00:00
pooka f99d5e92e0 include correct header 2008-07-28 18:05:09 +00:00
christos 8dd0b4459d handle more types. 2008-07-23 11:59:43 +00:00
lukem 93505eb7ec Add back rev 1.83. (hi christos!) 2008-07-23 00:57:53 +00:00
christos 380fafb740 a better attempt on printing dtype_misc 2008-07-22 22:58:04 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos eaa1a34779 handle NULL better. 2008-04-04 21:15:30 +00:00
christos 03829a56bb elementary handling for different types of DTYPE_FOO.
XXX: DTYPE_CRYPTO is unused.
XXX: should we change fd_clone() to pass a DTYPE_FOO?
2008-04-04 21:14:08 +00:00
christos 6238528d0f catch up with struct filedesc changes. 2008-04-04 18:27:00 +00:00
he 7fa93d44f6 Please repeat after me: I shall not define _KERNEL before including
<sys/types.h> in user-land programs.  Doing so causes build problems
for lots of our ports due to differences in how <sys/bswap.h> ends up
defining the swap functions/macros.
2008-03-23 23:01:21 +00:00
ad 5456139476 Catch up with recent file descriptor changes. 2008-03-22 02:39:06 +00:00
ad 703069c0e9 specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to reference a single device.

- Don't play dangerous tricks with block vnodes to ensure that only one
  vnode can describe a block device. Instead, prohibit concurrent opens of
  block devices. As a bonus remove the unreliable code that prevents
  multiple file system mounts on the same device. It's no longer needed.

- Track opens by vnode and by device. Issue cdev_close() when the last open
  goes away, instead of abusing vnode::v_usecount to tell if the device is
  open.
2008-01-24 17:32:52 +00:00
perry 8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
dyoung ca1b22492a Bug fix: filed.fd_ofiles is always a pointer to the open files
table, so always read the table from kernel virtual memory at that
address.  Do not ever try to read the table from filed0.fd_dfiles,
because it just isn't necessary, and sometimes we read a stale
table from there.
2007-09-09 01:26:55 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
hubertf 53f3b1d56f Xref sockstat(1) 2006-07-29 14:46:13 +00:00
yamt b1af57a6ba remove __POOL_EXPOSE. 2006-05-27 09:14:03 +00:00
yamt 2416177358 tweak for user.h cleanup.
while i'm here, remove unnecessary #include.
2006-05-11 11:56:38 +00:00
mrg 9ce2c843f8 maxfiles -> fstat_maxfiles. (this _KERNEL definition code needs to not
clash with kernel headers....)
2006-05-11 01:21:23 +00:00
jmmv 772e1db686 Adapt to some name changes in the tmpfs_node structure (to fix the build
under vax with gcc 2.95).  Provided by he@.
2006-02-16 14:58:35 +00:00
christos 62bee0ffa5 PR/32788: KAMADA Ken'ichi: add support for tmpfs 2006-02-10 16:01:45 +00:00
christos 553881914b WARNS=3, knf, ansi prototypes 2005-07-17 07:36:26 +00:00
lukem 7157011597 Only compile in IPv6 support if ${USE_INET6} != "no"
MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
2005-01-10 02:58:58 +00:00
atatat 63fae01c7d Slurp in the struct mount at vp->v_mount and the struct specinfo at
vp->v_specinfo to get the proper st_dev and st_rdev numbers.  We're
already picking over the kernel, so let's do it right.  That means
also asserting the file type for the /dev/pts directory (S_IFDIR) and
nodes therein (S_IFCHR).

Remove getptsmajor(), since we no longer need it.  Besides, it was
being used wrongly.
2004-12-14 03:10:23 +00:00
atatat a92869d7ef Cast fst.fileid to unsigned long and print it as such. Inode numbers
are never negative.
2004-12-14 03:09:24 +00:00
christos 09c258b188 Add ptyfs. 2004-12-12 22:41:03 +00:00
itojun b95181fc9b NI_WITHSCOPEID was not picked up by IETF standardization process. 2004-11-16 05:59:32 +00:00
dsl e833833eb1 Add (unsigned char) cast to ctype functions 2004-10-30 17:29:47 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
aymeric 5f3a5a8279 fix the way the ext2fs-specific size and mode variables are fetched:
they are indirectly gotten from kernel memory and as such should be read
with KVM_READ.
This fixes fstat core dumps when some process holds a reference in a Linux
ext2fs filesystem.
Thanks to Aleksy Schubert (alx.at.mimuw.dot.edu.dot.pl) for debugging this
with me.
2004-04-02 14:22:05 +00:00
fvdl 49ec36daa1 Don't compare integers and NULL. 2003-10-21 02:16:59 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
itojun 3c95d355e5 use bounded string op 2003-07-15 05:56:55 +00:00
fvdl 42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
christos 0fcef5865c undo mallocvar.h changes! 2003-02-02 02:35:58 +00:00
tron 3f39a3d045 Include "sys/mallocvar.h" with "_KERNEL" defined in time to avoid
build failure because MALLOC_DECLARE() is not defined.
2003-02-01 18:31:09 +00:00
martin 8010344d66 Make it compile again on LP64 archs.
XXX - we *realy* need some format string macros for size_t/off_t!
2003-01-20 06:20:37 +00:00
dsl 7e2ddd8ef0 Use kvm_getprocs2 so independant of kernel version
(change aggreed by christos)
2003-01-19 18:14:06 +00:00
enami 988be8626f - file ... instead of filename ...
- "An asterisk (``*'')" instead of "A (``*'')" to be more consistient with
  rest of this manpage.
- Fix typo; ``w'' instead of ``''.
- There is no section named Sockets.  There is only SOCKETS.
2002-11-07 13:52:04 +00:00
yamt ebc708387a add VT_LFS case. 2002-10-26 06:03:50 +00:00
jdolecek 879d35cda1 merge rev. 1.50.2.1 (made by lukem):
rudimentary support for for displaying DTYPE_KQUEUE fds
2002-10-23 22:37:11 +00:00
grant be8ae688ae New sentence, new line. 2002-09-30 11:08:56 +00:00
simonb ba31699a83 Add an extra column for inode numbers, and pull back the mode field to
just 5 columns if in "numeric" mode.  Other fields should dynamically
resize, but not today...
2002-02-12 03:28:20 +00:00
ross 2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00