how `crc' is actually defined.
Data type corrections:
- Define variables which contain file byte offset values as type
off_t as required by the `crc' function.
- Change the type of a variable carrying a CRC checksum from `u_long'
to `uint32_t'.
- Parse the length of a file with sscanf as `intmax_t'
(as there is no conversion specifier for `off_t').
Style(9):
- Put an empty line between #include directives for system and user
header files.
and due to buffering they would sometimes come out after the actual
error message when mkheaders() failed due to an unknown device, so you'd
get an error messages followed by 20 or 30 lines of harmless warnings.
There are lots of other warning messages in config(8) that are printed
on stdout, but these were the most egregious (at least with LINT).
a filename pattern, and also wrt filenames given on the command line.
Now if a file is listed as a specific entry, it will not *also* be
processed by an entry specifying a pattern. And filename-patterns
will now only match existing files (ignoring directories, etc).
MFC after: 3 weeks
will contain the pid for a process group. This means the file must
contain a negative value (as would be needed in the 'kill' commmand).
I still need to write man-page update before MFC-ing.
This started by rewriting the get_pid() routine. Later I looked at
what OpenBSD has, and included a few ideas from their send_signal()
routine. So, parts of this change are from OpenBSD, even though
OpenBSD does not actually have a 'U' flag.
PR: bin/28435
Reviewed by: no objections on freebsd-arch
MFC after: 3 weeks
warning message if -s is specified and it rotates a file that expects
to be compressed. This warning message is not printed if -R is also
specified, because we assume a -sR request is coming from the process
which would have been signaled, and that it has already released the
logfile.
Indirectly noticed by: sheldonh
ifconfig equivalents. This is the first step in removing them from
the system. Users of wicontrol to configure the wireless card are
strongly encouraged to change their scripts, as sometime in the future
all configuration of the cards that isn't in ifconfig will be removed
with extreme prejustice.
and config-file entries which specify a filename-pattern (glob). It is
still not perfectly-right, but at least it isn't completely-wrong.
Reviewed by: no objections on freebsd-arch
MFC after: 3 weeks
MFC addendum: (or after the code-freeze of 4.x is lifted)
should rotate all files given on the command, even if they don't seem to
need to be rotated. This would be used by some other command that decides
the given log file(s) should be rotated, but wants the "how" of that rotation
to be determined by entries to newsyslog. Wes expects to change syslogd to
take advantage of this. Man page will be updated after we're sure this is
all working the way we want it to.
Reviewed by: no objections on freebsd-arch
MFC after: 3 weeks
MFC addendum: (or after the code-freeze of 4.x is lifted)
not send a signal to any processes. Also add a config-file flag of 'N' or
'n', which indicates that the given logfile has no process which needs a
signal when it is rotated. Both of these are based on changes NetBSD
has made, although the implementation is somewhat different.
PR: bin/36553 (2nd half)
Reviewed by: no objections on freebsd-arch
Obtained from: NetBSD (in spirit, at least)
MFC after: 3 weeks
read from CD from 2k to 16k, because in the modern world of meta-packages
(Gnome et al) the length of this list could easily owerflow limit causing
strange things to happen, ranging from installation failure due to list
truncation to complete stack trashing (there is very vague bounds checking).
For example, x11/gnome2-fifth-toe runtime dependencies list is 2,418 bytes
long.
Due to obvious reasons, this is an immediate MFC candidate.
Sponsored by: Porta Software Ltd
MFC after: 1 day
Fixed memory leak in the "nodevice" option implementation.
Use these instead of sed(1) in MD NOTES.
Use a single makefile (sys/conf/makeLINT.mk) to generate
LINT for all architectures. (Previous versions missed
the LINT dependency on Makefile, and i386 version also
missed the dependency on ${NOTES}.)
Fixed bugs in the previous NOTES conversion using the
"nodevice" token and sed(1):
- i386 LINT lost "device pst".
- pc98 LINT lost SC_*, MAXCONS and KBD_DISABLE_KEYMAP_LOAD
options, and got needless DPT_* options.
- Added nooptions PPC_DEBUG, PPC_PROBE_CHIPSET, KBD_INSTALL_CDEV
to sparc64 LINT so that it has a chance to config(8).
This basically returns us to where we were before.
structure from a file instead of a PC-CARD itself before parsing and
dumping it. (E.g. useful when you get a CIS file from a manufacturer
which fixes they broken card's CIS, and add it to the pccard quirks.)
post-deinstall script, the variable intended to hold the name of that
script would be used uninitialized. In some cases, fexists() would
succeed, causing pkg_delete to try to chmod +x it, then execute it,
resulting in bizarre error messages such as:
.//: Permission denied
This bug would normally only occur when multiple packages were
specified on the command line; otherwise post_script would be located
in a previously unused part of the stack, and implicitly (but quite
accidentally) initialized to all-zeros.
MFC after: 3 days
given for -a did not exist, then newsyslog would always try to create
it, even if -n was specified.
2) When -a processing *does* create the directory, have it check the result
from mkdir(), and immediately error-out if that failed.
PR: bin/46974
MFC after: 3 weeks
specified at runtime, but that filename is not listed in the newsyslog.conf
file. This default-action can be changed by having a line in newsyslog.conf
with the filename of "<default>". Before this change, the program would
quietly ignore the given file. An update to the man page will be written
after I finish some other updates to newsyslog.c.
Reviewed by: no objections from freebsd-arch
MFC after: 3 weeks
into a child process. Rather than closing the discriptors manually,
mark all discriptors as close-on-exec.
PR: 47694
Submitted by: Max Okumoto <okumoto@ucsd.edu>
Obtained from: NetBSD
MFC after: 2 weeks
we don't leak memory. Only one of these two cases (reconfig) actually
causes a leak because the other is usually followed by an exec.
PR: 46845
Reviewed by: David Wang <dsw@juniper.net>
MFC after: 2 weeks
Some DVcam(ex. Panasonic NV-DS1 DV camcorder) doesn't seems to set
this bit even if it's for PAL. Fix the DSF bit for such cases so that
we can send back the stream to the DVcam without problem.
Problem Reported by: Richard Tobin <richard@cogsci.ed.ac.uk>
- Make the number of bulkxfer packets(NPACKET_T) and the number of packets
write at once(TNBUF) to be different values.
I observe some block noise for large TNBUF.
- Show the detection of NTSC or PAL.
- Pad with 0xff rather than 0x00 for broken frames.
- Bzero hdr[0].
- Remove unused code.
assignment even if it is not quoted (as advertised by the man page).
This fixes a regression wrt RELENG_4 introduced in rev. 1.11.
Problem noted and patch tested by: CHOI Junho <cjh@kr.FreeBSD.org>
Reviewed by: roberto
If we already have a lease and restart sysinstall (or something with
the net configuration goes wrong), we would have to reboot just
because there is a dhclient hanging around.
Reviewed by: murray (re)
MFC after: 5 days
All characters will be accepted, and pw(8) can sort out which ones it
will allow and which ones it won't.
Approved by: markm (mentor)
Prodded by: Philippe Bourcier <philippe@cyberabuse.org>
If any of the given groups do not exist complain and let the user try again.
This saves the user from discovering at the end of the process that they've
forgotten to add a group or they've typoed.
Thanks to cmc/dougb for pointing out how bad my sh fu actually is.
Original code by: me
Scary sh rewrite by: dougb
Reviewed by: dougb
* Give back one line of ws when showing a diff.
This was requested by several.
* Un-quote DIFF_FLAG, and add DIFF_OPTIONS. This will allow the user to
do more creative things in a mergemaster rc file. Un-quoting is necessary
in order to handle things like CVS Id tags that look like shell variables.
* Simplify terminal width determination.
Suggestions related to ignoring the CVS Id's were taken from several, with
dillon and gad providing particularly helpful feedback.
always compatible with the i386 version.
This fixes one of the problems I had cross-releasing i386 on
Alpha: the produced "-f aout" binaries are now identical.
. Print the column headers centered (except for the left-aligned
TYPE header) using a different header for architectures where
sizeof(uintptr_t) is not four.
. Consistently do not print a '0x' prefix for hexadecimal values.
. Separate columns by a single space character.
. Pad the columns presenting an address or offset enough to hold
their respective largest value.
. Do not restrict the output to unknown file types, inodes and
sockets; allow displaying of pipes, fifos, kqueues and crypto file
descriptors too.
- Shorten an overly long line by removing a cast of printf's return
value to void.
PR: alpha/45240
Tested on: i386, sparc64, alpha
Back out the removal of custom version of endian.h system header.
On recent systems, it just falls back to <sys/endian.h>. But on
older systems like 5.0-DP1 or 4-STABLE, this private version may
be necessary, as crunchide(1) is a cross-tool for "make release".
Spotted by: kris, markm
or group name (mainly for the benefit of samba). This pretty much rewrites
he pw_checkname() routine, but should work exactly the same except for the
above change, and that error messages are somewhat more informative.
PR: 28733 46890
Inspired by: example patch written by Terry Lambert
Reviewed by: no objections on freebsd-arch and freebsd-current
MFC plans: no plans, but will do if people want it in stable.
physical memory. The default is still 2x physical memory. The nominal
calculation is used to back-off swap auto-allocation ('A'uto command)
when the disk is not large enough to accomodate all filesystem auto-defaults.
This gives other partitions (like /usr) more priority over swap on smaller
disks.
This should help solve reported auto-sizing failures on machines with small
hard drives and huge amounts of memory. For example, a machine with 2G of
disk and 4G of memory will fail to auto-size without this fix.
MFC after: 3 days
/var/log/adduser, disabled if empty or adduserlog="no")
- do not ask for password in configure mode
- print $passwdtype instead of password in configure mode
- add DATECMD, GREPCMD (not overridable but with full path)
- Move APRATE switch() code to function for clarity.
- Conditionally call wi_printaplist() alone if more than one 'L'
is preset.
- Add the 'Q' flag to suppress printing of extraneous information
in wi_printaplist().
- Re-order second getopt() in main().
Reviewed by: imp
on variables read out of raw kld files. Unlike other platforms the value
will be in an Elf_Rela, not in the data section of the elf file.
Submitted by: Hartmut Brandt <brandt@fokus.gmd.de>
PR: 46730
Tested on: alpha (obrien), i386, sparc64
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
rather than specifically setting the process priority and resource class;
otherwise, we improperly set other aspects of the login class. We have
a bit more to do here, but the proper fix will probably involve breaking
out MAC labels from the login class at some point, as well as further
clarifying the logic here.
Pointed out by: kuriyama, max
load drivers from the driver floppy if the "driver_floppy" variable is set
in the kernel environment and call this function after probing devices but
before displaying the main menu.
X-MFC after: as soon as I finish committing to current
Approved by: re@ (blanket)
pointer types, and remove a huge number of casts from code using it.
Change struct xfile xf_data to xun_data (ABI is still compatible).
If we need to add a #define for f_data and xf_data we can, but I don't
think it will be necessary. There are no operational changes in this
commit.
with a class, rather than all aspects of the class when switching
classes for an inetd service. Because we hard-code /daemon in the
current inetd implementation, using SETALL has unfortunate side-effects
involving the MAC code, and potentially other credential related
settings in the future. This change maintains the DoS-resistent
aspects of the class behavior, which is all that is promised in the
inetd man page.
A larger set of diffs providing more pluggability and configurability
was deferred for this more simple approach in the short term.
Reviewed by: ache
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
work. The interface was gleaned from the Linux driver. Currently only
one RX & one TX buffer are used. Firmware support is not tested so for the
MPI-350 so it is disabled. Signal cache and monitor mode are not supported
yet. Signal cache is not supported since in encapsulation mode ethernet
frames are returned by the chip. LAN monitor mode support will be added
shortly. Thanks to Warner for the MPI-350 card he sent me.
Add support for RSSI map from PR kern/32880 which was incomplete. Enhanced
with the ability to select the cache mode of raw, dbm or per-cent.
Clean up Signal/Noise/Quality structures and units with help from
Marco Molteni.
Change flash to use a malloc'ed buffer when needed.
PR: kern/32880
Submitted by: Douglas S. J. De Couto decouto@pdos.lcs.mit.edu,
Marco Molteni
MFC: 3 weeks
i386, remove the seatbelt preventing users from setting the UFS2 flag
on the root file system on i386. This seatbelt did not exist on
other platforms.
MFC candidate.
argument, leading whitespace and empty lines be ignored, and
the `#' character marks the rest of the line as a comment.
PR: bin/45958
MFC after: 3 days
RSDP. Scan the first 1MB on i386 if the sysctl fails,
o Extend struct ACPIrsdp with the ACPI 2.0 fields which involves
changing a prior reserved field into the ACPI revision,
o Only calculate the RSDP checksum on the first 20 bytes to remain
compatible with ACPI 1.0 tables; we don't check the extended
checksum covering the whole table,
o Use the length field in the RSDP to map the RSDP into the address
space so that we don't have to know about future extensions here.
from "unix" back to "local". Add some compat stuff so both
ways work for some time.
Reviewed by: phk
Approved by: imp (UPDATING)
Requested by: iedowse, lukem@netbsd.org
`J' flag means that newsyslog should wait for previously started compression
jobs to complete before starting a new one for this entry. When it is used
along with the `G' flag, in the case when several logfiles match the pattern
and should be compressed, the newsyslog will compress logs one by one,
ensuring that only one compression job is running at a time.
This prevents newsyslog(8) from overloading system by starting several
compression jobs on big files simultaneously.
Sponsored by: Porta Software Ltd
MFC after: 2 weeks
a nonexistant target, in addition to the FTS_SL previously, so e.g.
setfmac -h sebsd/system_u:object_r:malloc_conf_t /etc/malloc.conf
succeeds.
Approved by: re
type of new slices and to change the type of existing slices. This also
has the advantage of moving a few #ifdef PC98's up to where the macros
are defined instead of in the middle of the code.
- Change the behavior of the 'T' option in the slice editor so that the
default value in the dialog box is the current type of the existing
slice rather than defaulting to changing the slice to a FreeBSD slice as
this is more intuitive.
Approved by: re
editor, in order to support specifying UFS2 as a newfs option.
(1) Support three different newfs types: NEWFS_UFS, NEWFS_MSDOS, and
NEWFS_CUSTOM. Don't mix up the arguments to them: you can't use
soft updates on an msdos file system.
(2) Distinguish adding new arguments to the newfs command line from
replacing it. Permit the addition of new arguments by the user for
NEWFS_UFS. If we entirely replace the command line provided by
sysinstall, call it NEWFS_CUSTOM. 'N' will now add additional
arguments; 'Z' will opt to replace the newfs command line entirely,
but will prompt the user with their current command line as a
starting point.
(3) Construct the newfs command line dynamically based on the options
provided by the user at label-time. Right now, this means selecting
UFS1 vs. UFS2, and the soft updates flag. Drop in some variables
to support ACLs and MAC Multilabel in the future also, but don't
expose them now.
This provides sysinstall with the ability to do more "in band" editing
of the newfs command line, so we can provide more support for the user,
but doesn't sacrifice the ability to entirely specify the newfs command
line of the user is willing to give up on the cushiness factor. It
also makes it easier for us to specify defaults in the future, and
define conditional behavior based on user configuration selections.
For now, we default to UFS1, and permit UFS2 to be used as the root
only on non-i386 systems.
While I was there, I dropped the default fragment and block sizes,
since newfs has much more sensible defaults now.
Reviewed by: jhb, marcel
Approved by: re
ia64 bits from: marcel
rather than installX11package().
- Add a perl psuedo-dist that installs the perl package. The perl
distribution is selected by default when a User distribution set is
selected. It is not selected when a Minimal distribution set is
selected. The perl distribution may be toggled manually in the
custom menu just as other distributions.
Approved by: re
bug fixed yesterday. New slices created in the fdisk editor and slices
whose sub-type is changed are of type 'mbr' if their sub-type is not a
magic type, not type 'unknown'.
Approved by: re
when parsing a malformed command-line parameter.
Rearrange a risky usage of sprintf() in a loop.
Reported by: phrail@division7.us via the vuln-dev mailing list
Approved by: re (rwatson)
o Mount the EFI file system as msdosfs and not ufs as it's a FAT
file system. Introduce Mount_msdos() for this to go side-by-side
with Mount().
o Also, since mounting is performed as a command (which means it's
queued, sorted, lost, found and executed), we cannot create a
directory on the file system by calling mkdir. We must make sure
the mkdir happens after the mount. Introduce Mkdir_command() to
allow mkdir operations to be queued, sorted, lost, found and
executed as well.
Approved by: re (jhb, rwatson)
Add 'setfsmac' link, which permits labels to be provided in a label
specification file, making it easier to provide initial file system
labeling specifications. This is used by the new mac_lomac to
provide initial system labeling and policy, and by sebsd, the port
of SELinux FLASK/TE to FreeBSD.
Approved by: re (jhb)
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
- Only declare mouse menus if WITH_MICE.
- Only declare syscons menus if WITH_SYSCONS.
- Only declare fdisk editor functions if WITH_SLICES.
Approved by: re
WITH_SYSCONS is defined.
- Only define mouse menus and mouse menu items if WITH_MICE is defined.
- Use WITH_SLICES instead of explicit lists of architectures to control
the layout of menus dependent on if slices are used on this arch or not.
- Only include the linux startup option if WITH_LINUX is defined.
- Only include the SVR4 startup option on i386. It doesn't work on sparc64,
and it is debatable that it even works on i386.
- Change the OSF1 startup option to execute configOSF1() instead of just
setting the variable so that /compat/osf1 gets created.
Tested on: i386, alpha, sparc64
Approved by: re
fdisk editor if WITH_SLICES. Before this on arch's that didn't support
slices such as alpha and sparc64 you would drop into the fdisk editor after
doing an Undo in the label editor.
Approved by: re
of an explicit list of architecture defines.
- Tweak the message prior to the label editor in the !WITH_SLICES case to
make it slightly less awkward since this is the first dialog we see after
starting an install.
- Only offer to customize syscons settings if WITH_SYSCONS.
- Offer to enable Linux compat if WITH_LINUX. Before we only did this for
i386.
- On the alpha, offer to enable OSF/1 compat after asking about Linux
compat.
- Only offer to configure moused(8) if WITH_MICE is defined.
Tested on: i386, alpha, sparc64
Approved by: re
and more maintainable.
- WITH_SYSCONS: defined on all arch's that support syscons (currently i386,
alpha, and ia64)
- WITH_MICE: defined on all arch's that support moused(8) (currently i386,
alpha, and ia64)
- WITH_SLICES: defined on all arch's that use disk slices (currently i386
and ia64)
- WITH_LINUX: defined on all arch's that support Linux binary compat
(currently i386 and alpha)
Approved by: re