Commit Graph

6671 Commits

Author SHA1 Message Date
phk
35c355e2f2 Remove the last traces of bogus MAKEDEV functionality. 2002-10-22 15:07:50 +00:00
rwatson
9337dcd3d7 Reflect MAC kernel/user API changes into the libc MAC implementation.
This removes a lot of complexity, since we basically just reserve
space on a retrieval of a label, and pass around strings.  Two new
elements: (1) consumers of the API must now declare what label
elements they are interested in retrieving, or (2) rely on the default
provided in a new configuration file, mac.conf.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-22 14:36:11 +00:00
phk
aa430888dc Live with it: I had hoped to find a neat way to deal with all the magic
numbers, but so far havn't come up with anything:  Add an #ifdef PC98.
2002-10-22 11:55:27 +00:00
phk
1bc5baf5c9 Avoid a lot of #ifdef PC98 code by giving a couple of the Chunk functions
an extra argument for all archs.
2002-10-22 10:51:58 +00:00
phk
43441f1d03 Swing the weed-whacker around libdisk:
Constify some things.
Staticize some things.
Remove some unused things.
Prototype some things.
Don't install a gazillion man-pages links.
Drop support for ON-TRACK disk-manager.
2002-10-22 09:13:02 +00:00
rwatson
f34f8701fa .Xr mac.3 and posix1e.3 to mac.9. Point at sys/mac.h in posix1e.3.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-22 01:52:53 +00:00
phk
57dd722cff Lobotomize MakeDev(), we don't need it with devfs. 2002-10-21 22:03:03 +00:00
phk
f6d2923501 Sigh, d_ntracks, not d_nheads. 2002-10-21 20:42:20 +00:00
phk
c166543507 fwheads and fwsectors got swapped underway.
Approved by:	sam
2002-10-21 19:44:07 +00:00
marcel
70995ddc59 Implement working on ELF corefiles. Use kvm_read() when reading
memory while mapping a virtual address to a physical address.
This allows us to work with virtual addresses for page tables,
provided it doesn't cause infinite recursion. Currently all
page tables are direct mapped.
2002-10-21 04:21:12 +00:00
rwatson
bc3681d122 Unhook the per-policy parsing/printing MAC modules in libc to prepare
to bring in the new MAC label management API.  With the new API
revision, we have only policy-agnostic code in libc and the base
kernel.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-21 03:54:24 +00:00
sam
26547b3a00 track gratuitous change to sys/i386/include/reg.h 2002-10-21 03:47:22 +00:00
obrien
ddccb9e2b3 Use a warns setting we can catch regressions with. 2002-10-20 23:50:28 +00:00
jmallett
c377d3e2b4 When dumping thread info, only include the filename and line if we actually
know what file! (Prevents use of NULL).

MFC after:	1 day
Reviewed by:	deischen
2002-10-20 22:49:06 +00:00
sam
8199d9ca41 Another baby step toward getting sysinstall working:
o fillin media s/h/c fields from new XML phk just added; need this because
  sysinstall uses them in the fdisk look-alike
o add new tags to xml parser
o cleanup parser a touch; remove unused tags and move tag parsing stuff to
  a table to simplify future additions
o redo callback to pass 64-bit values since mediasize overflows u_int32_t
o loosen parsing sanity checks a touch to deal with new xml we must handle
o move sector size probing to non-geom handling since we now get it from xml
o remove WHOLE_DISK_SLICE buggery now that we get mediasize from xml
2002-10-20 22:19:37 +00:00
tmm
2e1d70d9a2 Adapt to handle the new sparc64 core dump format correctly.
Reviewed by:	jake
2002-10-20 17:06:50 +00:00
tjr
8ed112060e When recycling a cached connection, increment the reference count so that
the heap block does not get freed and reused. This should fix the
pkg_add -r crashes that have been happening for months.
2002-10-20 10:36:27 +00:00
tjr
a80071534e Cross-reference fmtcheck(3). 2002-10-20 03:56:37 +00:00
peter
90a2f4ba9a Give in on the __sF stuff. I have a better fix in mind that is future
proof, but this should buy me some time for now.
2002-10-19 22:28:07 +00:00
sam
715f7b0ad3 o since you can't use DIOCGDINFO and DIOCGSLICEINFO on drive nodes with geom,
get the xml configuration for the devices and "parse" the information to
  get what's needed
o replace #ifdef DEBUG constructs with DPRINT/DPRINTX to make the code more
  readable

Note the xml "parser" is very very hackish and should be replaced with a
real one.  This one was done to be very small and special-purpose; don't
think about copying it elsewhere.

Approved by:	phk
2002-10-19 16:39:28 +00:00
tjr
6507d2b5f5 Indent code example with one tab, not two, for consistency with the rest. 2002-10-19 13:48:45 +00:00
tjr
058eca1b43 C89 does not specifiy strsep(), so our strsep() implementation cannot
conform to it.

Obtained from:	OpenBSD
2002-10-19 13:41:22 +00:00
tjr
a8ace8f312 The ftok() function has not been in libcompat for quite a while. 2002-10-19 13:33:12 +00:00
marcel
724ced313d Add the libz derived files, added in the previous commit, to
CLEANFILES. We were not cleaning up after ourselves.
2002-10-19 02:23:09 +00:00
markm
bf5cd60a89 Oops. Also provide a lint-compatible unused argument warning killer. 2002-10-18 16:24:20 +00:00
markm
e01300b36e ISOfy functions, sort headers and mark unused arguments. 2002-10-18 16:22:13 +00:00
markm
60f5ae88d2 Correct the headers needed to use dbopen(3) and friends. 2002-10-18 16:20:08 +00:00
rwatson
8601e0f680 Introduce 'exempt_if_empty' option to pam_wheel(8), which bypasses the
group membership requirement if the group has no explicit members listed
in /etc/group.  By default, this group is the wheel group; setting this
flag restores the default BSD behavior from 4.x.

Reviewed by:	markm
Requested by:	various
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-18 02:37:29 +00:00
sam
7fb694f053 not sure if this correct, but it compiles again 2002-10-18 00:26:34 +00:00
jmallett
2271050e4c FD locking is not enabled anymore, so the table which contains the owner
of a file descriptor has NULL entries, so don't dereference the table entries
to get the owners ever -- don't print the owners when processing a thread_dump
request as a result of SIGINFO.

Reviewed by:	deischen
2002-10-17 20:26:26 +00:00
sam
68349b6d1c o ioctl DIOCGDINFO error wasn't checked
o memory wasn't reclaimed in certain cases
o add more msgs under #ifdef DEBUG
o rewrite tangle of for loops for clarity

NB: Open_Disk should redo how it malloc's memory so the caller can free
    everything.  Documentation says the caller can free the disk list to
    reclaim everything but this leaks the indirect strings.  Fixing this
    is simple for the sysctl case but adds complexity to the fallback,
    non-sysctl, case.
2002-10-17 18:34:32 +00:00
sam
8680a53ace correct arg order to strlcpy/strlcat under #ifdef alpha 2002-10-17 18:23:21 +00:00
tjr
4e85c855b3 Fix off-by-one error when pushing back a multibyte sequence in
wide character class (%l[) and wide string (%ls) conversions.
2002-10-17 13:04:00 +00:00
tjr
fa470876dd Make part of the previous change clearer; check flags for SUPPRESS directly
instead of checking whether we're using a temporary buffer.
2002-10-17 12:06:29 +00:00
tjr
235c4480d3 The field width for single-byte string conversions (%c, %s, %[) is the
maximum number of bytes that may be stored in the array, not the maximum
number of wide characters to read. The wording of the standard unfortunately
does not make this clear.
2002-10-17 12:02:36 +00:00
alfred
5962200c28 de-__P() 2002-10-16 22:18:42 +00:00
robert
98e716a4fe - Remove the lsearch() and lfind() functions and their manpage from
the compatibility library libcompat.
 - Add new implementations of lsearch() and lfind() which conform to
   IEEE Std 1003.1-2001 to libc.  Add a new manual page for them and
   add them to the makefile.
 - Add function prototypes for lsearch() and lfind() to the search.h
   header.
2002-10-16 14:29:23 +00:00
tjr
0d7bae1697 Count field width correctly for suppressed multibyte fields (%*lc,
%*ls, %*l[).
2002-10-16 14:07:08 +00:00
robert
9bd570eece Remove unneeded $FreeBSD$ tags. 2002-10-16 14:05:29 +00:00
robert
ea03112dbf - Remove the old insque() and remque() functions and their manual
page from the compatibility library.
 - Add new implementations of insque() and remque() which conform to
   IEEE Std 1003.1-2001 to libc.  Add a new manual page for them and
   connect them to the build.
 - Add the prototypes of insque() and remque() to the search.h
   header.
2002-10-16 14:00:46 +00:00
tjr
3a88c84c05 Set the error bit on the stream if an encoding error occurs. Improve
handling of multibyte sequences representing null wide characters.
2002-10-16 12:09:43 +00:00
tjr
ccd9275d4e Avoid truncating invalid wide characters that are outside the range of
'unsigned char'; signal an error instead.
2002-10-16 11:37:38 +00:00
tjr
1d227bb4c8 Add a Bugs section and note that fmtcheck() is out of sync with printf();
it does not recognise any of the conversions or modifiers added in C99.
2002-10-16 04:03:02 +00:00
tjr
232c5478a8 Add support for the XSI %C and %S formats, which are the same as %lc
and %ls.
2002-10-16 03:55:53 +00:00
iedowse
ff07b93884 Use kqueue(2) instead of poll(2) to wait for replies and timeouts
in the UDP RPC client code. As a side-effect, this fixes some bugs
that might prevent the RPC call from ever timing out for example
if the server keeps responding with the wrong xid. This could
probably be simplified further by using the EVFILT_TIMER filter.
2002-10-15 22:28:59 +00:00
fjoe
065bd6f989 fix typo in comments (in preparation for MFC)
Approved by:	deischen
2002-10-15 16:40:57 +00:00
tjr
0c4686731a Add cross-references to the wide character counterparts of these functions. 2002-10-15 10:11:53 +00:00
sobomax
30e3020a42 Eliminate superfluous memory access in memcpy(3)/memmove(3).
Obtained from:	NetBSD
MFC after:	1 week
2002-10-15 09:50:07 +00:00
tjr
fbb20002c7 Remove stray comma at the end of the See Also list. 2002-10-15 09:49:54 +00:00
nyan
879ba46c82 Fix to check disk geometry.
Submitted by:	kawanobe@st.rim.or.jp (Kawanobe Koh)
2002-10-14 13:15:14 +00:00