standard ports, but it can't *receive* them (port 514 is
hardcoded). This commit adds that missing feature.
(NB: I actually needed this feature for a server farm where
multiple jails run with shared IP addresses, and every jail
should have its own syslogd process.)
As a side effect, syslogd now compiles with WARNS=6.
Approved by: des (mentor)
MFC after: 3 weeks
use a different interface type (IFT_L2VLAN vs IFT_ETHER). Treat IFT_L2VLAN
interfaces like IFT_ETHER interfaces when handling link layer addresses.
Reviewed by: syrinx (bsnmpd)
MFC after: 1 week
This will allow top monitoring using socket/ssh tunnelling
of system without local symbols.
client:
pmcstat -R <ip>:<port> -T -r <symbolspath>
monitored device:
pmcstat -Sinstructions -O <ip>:<port>
- Move the file read in the event loop
- Initialize and clean log in all cases
- Preserve global stats value during top refresh
- Fix the rtld/line resolver that ignore '-r' prefix
- Support socket for '-R' (server mode)
- Display the statistics when exiting top mode
a bug caused by r209235 where entering a number of blocks after
previously entering a size in MB/GB would result in the size of the
previous partition being used.
PR: bin/148266
Submitted by: jpaetzel
Approved by: rrs (mentor)
instead of the traditional simple counter.
Using the time-stamp based file-names, once a log file is archived, it
will not change name until it is deleted. This means that many backup
systems will only perform one backup of the archived log file, instead
for performing a new backup of the logfile upon each logfile rotation.
This implementation is separate from the patches in the mentioned PR,
as I wasn't aware of the existence of the PR until after I had
implemented the same functionality as the patches in the PR provide.
Unlike the PR, this new code does honor the 'log count' in
newsyslog.conf so old logfiles are deleted. This new code does not
currently support never deleting the archived logfiles.
PR: bin/29363
MFC after: 3 weeks
- Fixed segmentation fault when an invalid network interface was given.
- More helpful message in case of wrong PIN number.
Submitted by: Fredrik Lindberg
find them [1]
- While here, also add a missing Spanish entry
PR: bin/67365 [1]
Submitted by: Pedro F. Giffuni <giffunip@asme.org> [1]
Approved by: delphij (mentor)
from the PR, but the version numbers reflect the newer ones from
http://security.freebsd.org/#sup
PR: docs/145227
Submitted by: Glen Barber (glen dot j dot barber at gmail dot com)
Reviewed by: cperciva
Mentored by: jkois
MFC after: 1 week
- Passing -m to config will now print the MACHINE and MACHINE_ARCH
given in the passed kernel configuration file and then exit.
- If an option is defined in options.MACHINE with the same name as the
architecture of the kernel being configured, that option will be
considered set. This allows conditional compilation based on CPU
architecture.
Config version is now 600010.
Reviewed by: imp
and broken for a number of years. freebsd-update now provides a reasonable
way to handle upgrades, so keeping this functionality in sysinstall only
serves to mislead users.
Approved by: cperciva (mentor)
Bump / to 1GB, /var to 4GB and /tmp to 1GB.
A 512MB root partition is now too small to hold two kernels, so to
prevent installkernel failing 1GB is a better default. Likewise,
applications are storing more data in /var so 4GB is more reasonable
on a modern machine.
The previous minimum partition sizes were too small to hold a minimal
installation, and have been adjusted accordingly.
Discussed with: rwatson, simon
Approved by: rrs (mentor)
MFC after: 1 week
shell script is the back end logic necessary for an installer. It
contains both query routines to allow a front-end installer to present
reasonable choices to the user and also action routines which allow
the front end installer to put a FreeBSD distribution onto a disk. It
supports installing onto the usual suspects, as well as advanced
features like Mirroring, ZFS, Encryprion and GPT labels.
While this is only the back-end of the installer, it can do unattended
scripted installations. In PC-BSD's world view, all installations are
scripted and all the front-end does is write the script. As such, it
is useful in its own right.
This has been extensively tested over the past several releases of
PC-BSD. However, differences between that environment and FreeBSD
suggest there will be a period of shake-out while those differences
are discovered and corrected.
A text-based front-end is in the works. For the GUI-based front-end,
you can use the PC-BSD distribution.
Kris' BSDcan paper on pc-sysinstall is linked off his talk on the
BSDcan site:
http://www.bsdcan.org/2010/schedule/events/173.en.html
The man page is written by Josh Paetzel, and I wrote the Makefiles for
the FreeBSD integration. Kris wrote the rest.
This represents version r7010 in the PC-BSD repo.
http://svn.pcbsd.org/pcbsd/current/pc-sysinstall
Submitted by: kris@
Sponsored by: iX Systems
extract distributions once. If a distribution fails to fetch/extract
and the user doesn't want to retry, abort the installation.
Reviewed by: randi
Approved by: rrs (mentor)
MFC after: 1 month
a getty on the serial port so that it's possible to login when the system is
rebooted.
PR: bin/23098
Submitted by: Doug Ambrisko <ambrisko at whistle.com>
Reviewed by: randi
Approved by: rrs (mentor)
MFC after: 1 month
Modified submitter's original patch to reference why this is broken and what to do to work around the issue.
Submitted by: hubert@tournier.org
PR: bin/147572
Reviewed by: jhb
MFC after: 2 weeks
* Don't strdup the name when calling deviceRegister because the string is
copied within new_device.
* Use a subtype of 165, not 3, when creating a slice in noninteractive
mode.
PR: bin/135333
PR: bin/66350
Approved by: rrs (mentor)
MFC after: 1 month
reading current frequency on every period. Instead do it only after
changing and periodically from time to time if somebody else change it.
Also dynamically decrease sampling frequency up to 4 times on inactivity,
o make cmd scoped to the whole do_rules function, since it really is
scoped to the whole fucnion. Making it static was the wrong way to
fix referencing it outside of the block in which it was declared
(and conforms to the style of the rest of the file).
o remove a couple of meaningless blank lines
o properly wrap one line.
"arp -an" when using a lot of aliases (on a single interface).
A better fix would include a better interface for if_indextoname than
getting the whole address list from the kernel just to find the one
index->name mapping.
Reported & analyzed by: Nick Rogers
MFC after: 3 days
- .Nd in section NAME is not optional
- .Ed was missing
- "indent" is not a flag, but a literal argument for -offset
- stop switching font sizes for acronyms
- use .Brq instead of rolling our own
Format for the include line in /etc/newsyslog.conf is:
<include> /etc/defaults/newsyslog.conf
Other notes of interest:
Globbing is supported in <include> statements.
Properly detect circular include loop dependencies.
Reviewed by: gad@
Approved by: wes@ (mentor)
MFC after: 2 months
the jail(8) command. [10:04]
Fix a one-NUL-byte buffer overflow in libopie. [10:05]
Correctly sanity-check a buffer length in nfs mount. [10:06]
Approved by: so (cperciva)
Approved by: re (kensmith)
Security: FreeBSD-SA-10:04.jail
Security: FreeBSD-SA-10:05.opie
Security: FreeBSD-SA-10:06.nfsclient
utilities and related support files for manual pages, which were previously
controlled by MAN. For POLA, the default depends on MAN, i.e., WITHOUT_MAN
implies WITHOUT_MAN_UTILS and WITH_MAN implies WITH_MAN_UTILS. This patch
is slightly improved by me from:
PR: misc/145212
can only be used when ntpd is compiled with DEBUG support.
PR: docs/138206
Submitted by: Oliver Pinter (oliver dot pntr at gmail dot com)
MFC after: 5 days
Approved by: roberto
bottom of the manpages and order them consistently.
GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.
Found by: mdocml lint run
Reviewed by: ru
hid_get_data() now expects that the hid data passed in always contains
the report ID byte. Thus we should not skip the the report ID byte in
hid_interrupt(). Also, if HUP_KEYBOARD usage is an array, do not try
to modify the 'data' pointer, instead, increase the hid_item_t field
'pos' by 'report_size' before calling hid_get_data() during each
iteration.
PR: usb/146367
Reported and tested by: Alex Deiter
Pointy hat to: kaiw
Reviewed by: emax
This joint work of Dag-Erling Smørgrav and myself updates the
FFS quota system to support both traditional 32-bit and new 64-bit
quotas (for those of you who want to put 2+Tb quotas on your users).
By default quotas are not compiled into the kernel. To include them
in your kernel configuration you need to specify:
options QUOTA # Enable FFS quotas
If you are already running with the current 32-bit quotas, they
should continue to work just as they have in the past. If you
wish to convert to using 64-bit quotas, use `quotacheck -c 64';
if you wish to revert from 64-bit quotas back to 32-bit quotas,
use `quotacheck -c 32'.
There is a new library of functions to simplify the use of the
quota system, do `man quotafile' for details. If your application
is currently using the quotactl(2), it is highly recommended that
you convert your application to use the quotafile interface.
Note that existing binaries will continue to work.
Special thanks to John Kozubik of rsync.net for getting me
interested in pursuing 64-bit quota support and for funding
part of my development time on this project.
would crash in check_options() since dp == NULL for the V4: line.
This patch moves the check for options allowed on the V4: line to
ahead of where dp is used to avoid this crash.
Reported by: mamalos AT eng.auth.gr
MFC after: 1 week
L2/3/4 headers and can drop or steer packets as instructed. Filtering
based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac
addr is possible. Add support in cxgbtool to program these filters.
Some simple examples:
Drop all tcp/80 traffic coming from the subnet specified.
# cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action drop
Steer all incoming UDP traffic to qset 0.
# cxgbtool cxgb2 filter 1 type udp queue 0 action pass
Steer all tcp traffic from 192.168.1.1 to qset 1.
# cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action pass
Drop fragments.
# cxgbtool cxgb2 filter 3 type frag action drop
List all filters.
# cxgbtool cxgb2 filter list
index SIP DIP sport dport VLAN PRI P/MAC type Q
0 192.168.1.0/24 0.0.0.0 * 80 0 0/1 */* tcp -
1 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* udp 0
2 192.168.1.1/32 0.0.0.0 * * 0 0/1 */* tcp 1
3 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* frag -
16367 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* * *
MFC after: 2 weeks
section holding the config file to sh_addralign bytes using NULs.
This bogusly triggers an assert. Break out of the loop when we hit an
NUL within that many bytes of the end.
MFC after: 3 days
will allow people with old config options to either have it just work
(if config is new enough), or get a version error (if their config is
about 7.0 or newer) rather than getting a cryptic error about
duplicated options in the options file, or getting an error about an
unknown option, at which point they'd update their config file only to
learn they need a new config, only to learn they didn't really need to
update their config file... All this because our version checking was
in the wrong place for the past decade...
# hopefully this is the last change, and we'll be able to config with an
# 8.0 GENERIC file on stable/8 after I merge this change and add the
# compat options.
MFC after: 3 days
versions of config. Remove support for the syntax OLD = NEW form the
options file, and instead have a new file $S/conf/options-compat.
This file will be parsed as OLD NEW on each line. Bump version of
config. Since nothing in -current ever used this, there's no hazards
for current users, so I'm not bumping the version in the
Makefiles.$MACHINE. No need, really, for this version bump in
-current, but this was introduced into -stable before I realized the
version check was ineffective there, so the verison bump doesn't hurt
here and keeps the two branches in sync, versionwise, after the MFC.
MFC after: 3 days
we've parsed the config file. Makefile generation is too late if
we've introduce changes to the syntax of the metafiles to warn about
version skew, since we have to try to parse them and we get an parse
error that's rather baffling to the user rather than a 'your config is
too old, upgrade' which we should get.
We have to defer doing it until after we've read the user's config
file because we define machinename there. The version required to
compile the kernel is encoded in Makefile.machinename. There's no
real reason for this to be the case, but changing it now would
introduce some logistical issues that I'd rather avoid for the moment.
I intend to revisit this if we're still using config in FreeBSD 10.
This also means that we cannot introduce any config metafile changes
that result in a syntax error or other error for the user until 9.0 is
released. Otherwise, we break the upgrade path, or at least reduce
the usefulness of the error messages we generate.
# This implies that the config file option mapping will need to be redone.
MFC after: 3 days
brings in support for an optional intent log which eliminates the need
for background fsck on unclean shutdown.
Sponsored by: iXsystems, Yahoo!, and Juniper.
With help from: McKusick and Peter Holm
- Rework the wrapper support to check libpkg version as well as pkg_install
version.
- Add libfetch to _prebuild_libs.
- There are no new features introduced.
Notes: the API is not stable, so basically, do not use libpkg in your
projects for now. Also there's no manpage for libpkg yet, because the API
will change drastically. I repeat, do not use libpkg for now.
with all other corresponding CTF places by changing the corresponding
code which is generated by config(8). Or in short, move the '@' from
the variable definition to the use of the variable. [1]
While I'm here break up a long line. [2]
Discussed with: imp [1,2], bde [2]
sure the "Q = Finish" text is visible.
Reword the boot manager screen to try and avoid confusion, and make the
order of the menu items match that in sysinstall.
PR: bin/142916
Submitted by: Jeremy Chadwick <freebsd at jdc.parodius.com>
Reviewed by: randi
Approved by: rrs (mentor)
MFC after: 1 week
feature. The kernel makefiles have specifically not been bumped
because nothing uses this new feature and doing so forces everybody to
recompile for no good reason. This chnage will be MFC'd where the
kernel version numbers for amd64 and ia64 will be bumped, since those
are the only two that have use the option remapping feature. Once
merged, this will give a better error message to folks that are using
buildkernel without buildworld or kernel-toolchain to update their
kernels.
MFC after: 3 days
OLD_OPT = NEW_OPT
in options* files will now map OLD_OPT to NEW_OPT with a friendly
message. This is indented for situations where we need to preserve an
interface in the config file in an upwards compatible fashion on a
stable branch.
Reviewed by: nwhitehorn@
MFC after: 3 days
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.
Reviewed by: ru
Approved by: philip, ed (mentors)
According to the manpage, the entries have to be sorted by uid. This is
no longer possible, since our utmpx implementation is completely unaware
of user IDs. You can safely add entries for multiple users sharing the
same uid.
Make the output less random by sorting everything by name.
* WPA-None requires ap_scan=2:
The major difference between ap_scan=1 (default) and 2 is, that no
IEEE80211_IOC_SCAN* ioctls/functions are called, though, there is a
dependency on those. For example the call to wpa_driver_bsd_scan()
sets the interface UP, this never happens, therefore the interface
must be marked up in wpa_driver_bsd_associate(). IEEE80211_IOC_SSID
also is not called, which means that the SSID has not been set prior
to the IEEE80211_MLME_ASSOC call.
* WPA-None has no support for sequence number updates, it doesn't make
sense to check for replay violations..
* I had some crashes right after the switch to RUN state, issue is
that sc->sc_lastrs was not yet defined.
Approved by: rpaulo (mentor)
MFC after: 3 weeks
symlink before complaining that it doesn't exist. Typical case
would be a leftover library symlink that's left over after the
actual library has been removed.
Reported by: tabthorpe
don't try to find a hidden meaning in the strange order. The list used
to be sorted in rev. 1.1 from 4.4BSD but the order was broken as soon as
in rev. 1.2 by a single-character fix.
MFC after: 3 days
When using ac -w, we must use the last timestamp to terminate the log
file. I accidentally removed this when I ported the code to use utmpx.
Reported by: avg
- avoid coredump when there's only one token on a line;
- Use calloc();
- Remove a line inherited from example mdoc.
Obtained from: OpenBSD
MFC after: 1 month
and modify the BEGEMOT-PF-MIB to add support for IPV6 address' statistics in the PF
tables via pfTablesAddrNetType and pfTablesAddrNet. While here, upgrade the
pf_tree.def file to the new format that includes enumerated values. Also make sure
to return SNMP_ERR_NOSUCHNAME for ALTQ objects, if ALTQ is disabled, so that the agent
will know to skip the pfAltq subtree when servicing GETNEXT requests from SNMP clients
(otherwise snmpwalk on begemotPf would stop at the pfAltq subtree with bsnmpd returning
SNMP_ERR_GENERR).
then find a specific entry, and get the requested value. So far, it found
the specific entry, refreshed the entry list if necessary, and got the
requested value from the found entry. The problem is that refreshing nukes
all old entries and replaces them with new ones and the obtained entry
pointer was no longer valid after the refresh.
Reviewed by: bz, philip
MFC after: 1 week
Right now if a jail has multiple IPv6 addresses, it will print them
shifting only 4 bytes at a time. Example:
2001:4dd0:ff41::b23f:a9
2001:4dd0:ff41::b23f:aa
Becomes:
2001:4dd0:ff41::b23f:a9
ff41::b23f:a9:2001:4dd0
By casting to in6_addr, it uses the correct offsets.
MFC after: 1 week
and enforce this in the code. Apparently a lot of users mistakenly
combine -a with these flags and are then mystified that no changes
were made.
While I'm here, fix a trailing space in mergemaster.8
pmc_flush_logfile is now non-blocking and just ask the kernel
to shutdown the file. From that point, no more data is
accepted by the log thread and when the last buffer is flushed
the file is closed.
This will remove a deadlock between pmcstat asking for
flush while it cannot flush the pipe itself.
MFC after: 3 days
- no display on serial terminal in top mode.
- display alignment for continuation string.
- correct invalid value used for display limit.
MFC after: 3 days
uid_t and gid_t are unsigned. While initializing them to -1 and later
checking against -1 to see if they are still at their default usually
works, introduce two new flags and stop the inband signalling.
Approved by: ed (co-mentor)
The Makefiles are leftovers from the copies and should live in usr.sbin/zic/*
From usr.sbin/zic:
The sources are from a vendor contributed source, therefore should
live in contrib/tzcode/zic.
du(1), cp(1) etc, to prevent the crossing of mountpoints whilst using the
commands recursively.
PR: bin/130855
Submitted by: keramida
MFC after: 1 month
mpt(4) controller. Previously, the code assumed that multiple match
patterns provided to an XPT_DEV_MATCH request were ANDed together.
Instead, they are ORed. Instead, to match peripherals for a specific bus,
one query needs to be performed to lookup the path ID of the bus. A second
query can then be performed matching peripherals attached to that path.
This approach also makes the code a bit cleaner as the returned match
results do not mix bus and perphierals.
Reported by: several folks
MFC after: 1 week
present. mpt(4) controllers that do not support RAID do not have an IOC6
page, for example.
- Correct a check for a missing page error in a debug function.
MFC after: 1 week
- Kcachegrind (calltree) support with assembly/source
code mapping and call count estimator (-F).
- Top mode for calltree and callgraph plugin (-T).
MFC after: 1 month
interfaces (such as when you are part of a carp pool), and you run
rpcbind -h to restrict which interfaces have rpc services, rpcbind can
none-the-less return addresses that aren't in the -h list. This patch
enforces the rule that when you specify -h on the command line, then
services returned from rpcbind must be to one of the addresses listed
in -h, or be a loopback address (since localhost is implicit when
running -h).
The root cause of this is the assumption in addrmerge that there can
be only one interface that matches a given network IP address. This
turns out not to be the case. To retain historical behavior, I didn't
try to fix the routine to prefer the address that the request came
into, since I didn't know the side effects that might cause in the
normal case. My quick analysis suggests that it wouldn't be a
problem, but since this code is tricky I opted for the more
conservative patch of only restricting the reply when -h is in effect.
Hence, this change will have no effect when you are running rpcbind
without -h.
Reviewed by: alfred@
Sponsored by: iX Systems
MFC after: 2 weeks
due to careful design. We've not yet figured out how to properly
annotate the sockaddr structs to communicate this to the compiler and
there's a number of constructs in the tree that make this annotation
challenging.
As such, reduce warns to 3 here because this code really isn't warns 6
safe, even if it kinda sorta appears to be on intel (which has no such
alignment restrictions). Warns 4 adds the -Wcast-align warning.
# fixes the mips tinderbox build
interface specifier on the command line can be ommited.
Besides of this, the bpf is being reused for each machine
that has to be woken up.
Submitted by: Marc Balmer <marc@msys.ch>
Some Exchange systems wrap lines over 75 characters long while converting
messages to quoted-printable, preventing ctm_rmail from reassembling
emailed deltas. For a negligible loss of encoding efficiency, this change
allows ctm deltas to once more pass through Exchange undamaged.
longer than the length of the current attribute if the buffer were reused
and previously longer, so bits of the previous, longer attribute would be
written. Fix this by using the actual attribute length.
which stops to proceed further, as it is possible that processes which
fails to create PID file get screwed by rotation.
Requested by: stas
MFC after: 2 weeks
X-MFC with: r200806
whether to use source address selection (default) or the primary
jail address for unbound outgoing connections.
This is intended to be used by people upgrading from single-IP
jails to multi-IP jails but not having to change firewall rules,
application ACLs, ... but to force their connections (unless
otherwise changed) to the primry jail IP they had been used for
years, as well as for people prefering to implement similar policies.
Note that for IPv6, if configured incorrectly, this might lead to
scope violations, which single-IPv6 jails could as well, as by the
design of jails. [1]
Reviewed by: jamie, hrs (ipv6 part)
Pointed out by: hrs [1]
MFC After: 2 weeks
Asked for by: Jase Thew (bazerka beardz.net)
While there, fix a bug I introduced previously. We must reopen the
database for each username passed on the command line. We must rewind
the database and search from the beginning.
Similar to last(1), it must compare ut_id's instead of TTYs to determine
whether a session has been terminated. It must also use ut_type to
determine the type of the login record instead figuring it out by
itself.
A nice thing about utmpx is that it makes it very easy to log sessions
that don't use TTYs. This is because the file is not indexed by TTY
slots anymore.
Silence from: brian
from standard 3G wireless units by supplying a raw IP/IPv6 endpoint rather than
using PPP over serial. uhsoctl(1) is used to initiate and close the WAN
connection.
Obtained from: Fredrik Lindberg <fli@shapeshifter.se>
Update delete_temproot() to include the error message if it fails,
and clean up the places where it's called.
If there are no files left in temproot when the comparison is done
delete it without prompting. This should make "automated" runs of
mergemaster without -a a little easier.
Document the new behavior in the man page.