Commit Graph

73087 Commits

Author SHA1 Message Date
David E. O'Brien
6f98638581 Clean up the 1/2 a** committing from Thu, 3 May 2001 11:05:39 -0700 (PDT).
Since then we have living with a GPL'ed find(1) due to grabbing getdate.y
from src/contrib/cvs and its user of the GPL'ed xtime.h.  I don't even want
to think about how this could have affected people using our source base.

Would it have been too much trouble to do then what I did now?
Copied getdate.y (public domain) to usr.bin/find and change to use
standard system headers.  find(1) now compiles simply with out having
to go to extra effort to do so.

Pointed hat to:	phk
Build fixed on:	gcc 3.1 using platforms
2002-04-14 01:30:20 +00:00
David E. O'Brien
c3fa6e4e46 Do not use perl where sed is more than adequate. 2002-04-13 23:53:36 +00:00
Alan Cox
b7c8cbabf9 Add comment that sigreturn() is MPSAFE. 2002-04-13 23:37:10 +00:00
John Baldwin
9c1ab3e04a - Change killpg1()'s first argument to be a thread instead of a process so
we can use td_ucred.
- In killpg1(), the proc lock is sufficient to check if p_stat is SZOMB
  or not.  We don't need sched_lock.
- Close some races in psignal().  In psignal() there is a big switch
  statement based on p_stat.  All the different cases are assuming that
  the process (or thread) isn't going to change state out from under it.
  To ensure this is true, just lock sched_lock for the entire switch.  We
  practically held it the entire time already anyways.  This also
  simplifies the locking somewhat and actually results in fewer lock
  operations.
- Allow signotify() to be called with the sched_lock held since psignal()
  now does that.
- Use td_ucred in a couple of places.
2002-04-13 23:33:36 +00:00
Dag-Erling Smørgrav
839316e581 Remove bogus dependency on rlogin. 2002-04-13 23:31:27 +00:00
John Baldwin
bad56603ba - Change donice() to take a thread as the first argument instead of a
process so it can use td_ucred.
- Require the target process of donice() to be locked when donice() is
  called.
- Use td_ucred.
- Lock the target process of p_cansee() and while reading the credentials
  of a process.
- Change the logic of rtprio() slightly so it does it's copyin() if needed
  prior to locking the target process.
- rtprio() no longer needs Giant.  In theory with full KSE it would still
  need Giant to protect p_ucred of curproc for the p_canfoo() functions
  but p_canfoo() will be changing to using td_ucred of curthread before
  full KSE hits the tree.
2002-04-13 23:28:23 +00:00
John Baldwin
a92e7c792a - Change procfs_control()'s first argument to be a thread pointer instead
of a process pointer.
- Move the p_candebug() at the start of procfs_control() a bit to make
  locking feasible.  We still perform the access check before doing
  anything, we just now perform it after acquiring locks.
- Don't lock the sched_lock for TRACE_WAIT_P() and when checking to see if
  p_stat is SSTOP.  We lock the process while setting p_stat to SSTOP
  so locking the process is sufficient to do a read to see if p_stat is
  SSTOP or not.
2002-04-13 23:19:13 +00:00
John Baldwin
ce5aaf4554 Lock the target process for p_candebug(). 2002-04-13 23:15:28 +00:00
John Baldwin
ff7299d998 Lock the target process in procfs_doproc*regs() for p_candebug and while
reading/writing the registers.
2002-04-13 23:14:08 +00:00
John Baldwin
094a945562 Rework logic of syscalls that modify process credentials as described in
rev 1.152 of sys/kern/kern_prot.c.
2002-04-13 23:11:23 +00:00
John Baldwin
590ae816c2 - p_cansee() needs the target process locked.
- We need the proc lock held for more of procfs_doprocstatus().
2002-04-13 23:09:41 +00:00
John Baldwin
07f3485d5e - Change the algorithms of the syscalls to modify process credentials to
allocate a blank cred first, lock the process, perform checks on the
  old process credential, copy the old process credential into the new
  blank credential, modify the new credential, update the process
  credential pointer, unlock the process, and cleanup rather than trying
  to allocate a new credential after performing the checks on the old
  credential.
- Cleanup _setugid() a little bit.
- setlogin() doesn't need Giant thanks to pgrp/session locking and
  td_ucred.
2002-04-13 23:07:05 +00:00
John Baldwin
a7ff744350 - Change the first argument of ktrcanset(), ktrsetchildren(), and ktrops()
to a thread pointer so that ktrcanset() can use td_ucred.
- Add some proc locking to partially protect p_tracep and p_traceflag.
2002-04-13 22:54:18 +00:00
David E. O'Brien
0301e9c83b Turn on TGA support.
Submitted by:	Andrew M. Miklic <AndrwMklc@cs.com>
2002-04-13 22:34:16 +00:00
Dag-Erling Smørgrav
0b759b867a Install digittoint.3 (forgotten in rev 1.21)
PR:		docs/26451
Submitted by:	Adrian Filipi-Martin <adrian@ubergeeks.com>
2002-04-13 22:32:33 +00:00
David E. O'Brien
a68bbb481b Quiet GCC 3.1 warning. 2002-04-13 22:21:28 +00:00
David E. O'Brien
8321eb62f6 libstand needs _setjmp/_longjmp for FICL.
Submitted by:	jake
2002-04-13 22:09:53 +00:00
David E. O'Brien
88727b7db9 Style nit and modernize SCM ID. 2002-04-13 21:54:09 +00:00
Poul-Henning Kamp
ff7ed9f76b If the receiver runs out of space for an received frame in the internal
FIFO or the in-RAM descriptors it will switch to RX_IDLE from where it
is not restarted.

We used to deal with RX_IDLE by doing a total reinit but this lost
our link and caused a potential 30sec autonegotiation against
switches.  This was changed to a less heavyhanded approach, but this
failed to restart the receiver it it were in the RX_IDLE state.

This change adds the RX_IDLE and the RX_FIFO_OFLOW conditions as
triggers for interrupts and receive side processing, and restarts
the receiver when it is RX_IDLE.

Remove the #ifdef notyet'ed nge_rxeoc() function.

Sponsored by:	Cybercity Internet, Denmark.
MFC after:	7 days
2002-04-13 21:33:33 +00:00
David Malone
3cd2a58926 Warns cleanups:
1) Add missing initialisers.
2) Avoid shadowing rcswhich.
3) Use intmax_t and %j for printing rather than quad_t and %q.
4) Don't modify a variable twice between sequence points.
2002-04-13 21:28:17 +00:00
David Malone
72c7c2e625 Remove previously unneeded and now incorrect cast of user_from_uid()
to a char *.
Fix up vendor ID.
2002-04-13 21:09:55 +00:00
David Malone
13685eeec2 Fix up vendor IDs.
Put a sequence point between writing to a variable and using it.
2002-04-13 20:59:48 +00:00
Thomas Moestl
8db523989f Use pmap_extract() instead of pmap_kextract() to retrieve the physical
address associated with a user virtual address in
pipe_build_write_buffer().

Reviewed by:	alc
2002-04-13 20:09:06 +00:00
David E. O'Brien
ade4ded301 Revision 1.17 seems to break a subsequent buildworld (i.e. with the new
make installed) in gnu/usr.bin/groff/src/preproc/eqn (which, being a
build tool itself, is built with the original make during buildworld).

The problem seems to be that in str_concat(), the string is not
terminated when the length of the second string is 0.
This apparently can happen during null suffix rule processing.

Submitted by:	tmm
2002-04-13 19:36:47 +00:00
Alan Cox
80eef17ba9 o Remove vm_map_growstack() and useracc() from sendsig(). Copyout() and
suword() will automatically grow the stack if needed.
 o Add a comment that osigreturn() and sigreturn() are MPSAFE.
2002-04-13 19:17:49 +00:00
David Malone
8da9a6b0c5 Add some constness to make this WARNS clean again. 2002-04-13 18:38:16 +00:00
Boris Popov
6e8681aa50 Check write permissions before creating anything.
PR:		kern/27883
MFC after:	1 week
2002-04-13 15:33:26 +00:00
Murray Stokely
bb2d14481b Add support for an additional field to the packages/INDEX file. If
present, this field specifies the media volume that the disc is
contained on.  If the volume of a given packages is different than the
current volume of mediaDevice, then the user is prompted --

  "This is disc #%d.  Package %s is on disc #%d\n"
  "Would you like to switch discs now?\n"

If the user selects yes, then DEVICE_SHUTDOWN is called and the user
is then prompted --

  "Please remove disc #%d from you drive, and add disc #%d"

This works well for a carefully crafted INDEX file, but more work
needs to be done to sort dependencies on a given package based on the
volume that they reside on, to minimize the amount of disc flipping
required of the user.

This commit is a no-op for normal INDEX files and FreeBSD CDs.  These
additional features are only used if the INDEX and cdrom.inf file have
multi-volume support.
2002-04-13 13:00:42 +00:00
Murray Stokely
76ce87ffba Read the CD_VOLUME property from the cdrom.inf file and use it to
initialize the volume ID for the media device in use.
2002-04-13 12:44:18 +00:00
Murray Stokely
dd5650233b Add the concept of a volume to the device and package structures. If
these values are different for a given package, then we must prompt
the user to insert another disc before the package can be installed.
2002-04-13 12:43:07 +00:00
Hellmuth Michaelis
7b59113e2f update german national holidays file for 2002, 2003 and 2004 2002-04-13 12:23:38 +00:00
David E. O'Brien
79f407f91e Fix a minor lint warning. 2002-04-13 12:20:51 +00:00
David E. O'Brien
664a5a88d4 Prefer BSDmakefile over makefile and Makefile.
Submitted by:	jmallett
Obtained from:	OpenBSD
2002-04-13 12:18:00 +00:00
David E. O'Brien
9b24805230 Fix copyrights, and undo SCS ID damage. 2002-04-13 10:57:56 +00:00
Jeroen Ruigrok van der Werven
e2cf520799 Fix a missed conversion of lld to llu for the uint64_t ks_calls and cast
to unsigned long long.

Don't be too overzealous with the printing of ks_calls in the total
statistics, cut back from 20 to 13 positions to print (which should last
a couple of years easily (20 digits is enough for 3168 years of calls at a
measly billion (10^9) calls per second.)).

Submitted by:	bde
2002-04-13 10:32:36 +00:00
David E. O'Brien
4d1f4209a6 Update SCM ID method. 2002-04-13 10:17:18 +00:00
Jeroen Ruigrok van der Werven
bcbf4411d6 Use the correct macros for F_SETFD/F_GETFD instead of magic numbers.
Reflect that fact in the manual page.

PR:		12723
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
Approved by:	bde
MFC after:	2 weeks
2002-04-13 10:16:53 +00:00
David E. O'Brien
302d0b1426 Make str_concat handle NULL arguments properly (a-la how ODE-2.3.6 make does).
Submitted by:	jmallett
Inspired by:	CMU BUILDTOOLS4 coredumping, ODE-2.3.6 make(1)
2002-04-13 10:13:39 +00:00
David E. O'Brien
a59e308cd7 De'register. 2002-04-13 10:05:30 +00:00
David E. O'Brien
46f905209d Constify str_concat()
Submitted by:	jmallett
2002-04-13 09:49:33 +00:00
David E. O'Brien
da363cd56a Check to make sure fdopen() succeeds in make(1).
Submitted by:	jmallett
Inspired by:	NetBSD
2002-04-13 09:10:07 +00:00
Dima Dorfman
146b8183bc ${BDECFLAGS} gets added to CFLAGS, not CXFLAGS.
PR:		37032
Submitted by:	Joshua Goodall <joshua@roughtrade.net>
2002-04-13 09:07:22 +00:00
Marcel Moolenaar
5da217f64c High-level changes (user visible):
o  Implement -c (clear) to clear previously kept headers (note that
   dumps not cleared will remain until -c is used),
o  Implement -f (force) to allow re-saving a previously saved dump,
o  Implement -k (keep) and make clearing the dump header the default,
o  Implement -v (verbose) and make most output conditional upon it,
o  Emit minimal output for the non-verbose case with the assumption
   that savecore is run mostly from within /etc/rc,
o  Update usage message to reflect what is and what's not,
o  mark -d as obsolete.

Low-level changes:
o  Rename devname to device, for devname mirrors a global declaration
   and GCC 3.x warns about it,
o  Open the dump device R/W for clear and !keep to work,
o  Reorder the locals of DoFile according to style(9),
o  Remove newlines from strings passed to warn* and err*,
o  Use stat(2) to check if a dump has been saved before,
o  Truncate existing core and info files to support force,
o  First check for the magic and the version before we complain about
   parity errors. This prevents emitting parity error messages when
   there's no dump,
o  Keep track of the number of headers found and the number of headers
   saved to support the minimal output,
o  Close files we opened in DoFile. Not critical, but cleaner.
2002-04-13 08:20:15 +00:00
Dag-Erling Smørgrav
761139b173 Add libypclnt to the includes target. 2002-04-13 07:24:14 +00:00
Dag-Erling Smørgrav
533e4c33b3 Add libypclnt. 2002-04-13 07:23:25 +00:00
Dag-Erling Smørgrav
774cd88f19 Add support for FreeBSD-specific "master" update.
Sponsored by:	DARPA, NAI Labs
2002-04-13 06:57:14 +00:00
Dag-Erling Smørgrav
23d232d73b Header file for libypclnt.
Sponsored by:	DARPA, NAI Labs
2002-04-13 06:20:31 +00:00
Dag-Erling Smørgrav
c0f2281edd NIS client toolbox. This centralizes code which is duplicated all over
our tree.

Sponsored by:	DARPA, NAI Labs.
2002-04-13 06:20:02 +00:00
Dag-Erling Smørgrav
2f6ee8eb7e Change || into && (braino in previous commit). Also append \n to the
error message.
2002-04-13 06:14:30 +00:00
Warner Losh
8961964d97 Fix an edge case wrt membase, but more changes needed 2002-04-13 05:52:35 +00:00