Commit Graph

4656 Commits

Author SHA1 Message Date
Yaroslav Tykhiy
5f9af361f4 Don't be paranoid about hostname(1) and order the things logically.
Pointed out by:	ceri
2007-02-15 06:46:33 +00:00
Yaroslav Tykhiy
01b777f4cb Don't nag about unset $hostname if DHCP is in use.
Pointed out by:	ceri
2007-02-15 06:42:42 +00:00
Joerg Wunsch
0411582e87 Add some entries to log unknown devices, based on the bus they appear
on.

Some things appear to be completely missing though, like the USB vendor
and product strings.
2007-02-14 08:13:54 +00:00
Yaroslav Tykhiy
aad85353cc Handle the case when the admin forgot to set $hostname,
which can happen in new installations: advise to set the
variable and refer to rc.conf(5).
2007-02-10 13:13:32 +00:00
Florent Thoumie
2d69b43eb2 Add support for EtherChannel configuration to rc startup scripts.
Note: This also deprecates "NO" as a way to specify an empty list of
interfaces for gif_interfaces.

PR:		conf/104884
Submitted by:	nork
Harassed by:	brd
Discussed with:	brooks, dougb
2007-02-09 12:11:27 +00:00
John Polstra
bd4dbd7879 Use egrep instead of grep so that reporting of login failures (broken
by revision 1.6) works again.  This fix is already in RELENG_6, but was
never committed to HEAD.
2007-02-05 16:36:25 +00:00
Marcel Moolenaar
d62866b236 o Remove screen, created by the unnecessary ofw_console(4)
o  Remove ttyyX, created by the obsolete zs(4)
o  Replace ttydX by ttyuX, which is created by uart(4)
o  Enable ttyu0 as a console to better support the xserve.

MFC after: 1 week
2007-01-26 06:22:34 +00:00
Mike Pritchard
a0072eda86 Add the following knobs for quotas if they are enabled:
quotaon_flags - flags for the quotaon command
quotaoff_flags - flags for the quotaoff command
quotacheck_flags - flags for the quotacheck command
2007-01-20 04:24:20 +00:00
Simon L. B. Nielsen
26d67ea70f Fix jail rc.d script privilege escalation via symlink attack against
/var/log/console.log and mount points.

Security:	FreeBSD-SA-07:01.jail
2007-01-11 18:18:57 +00:00
Nate Lawson
907b6777c1 Re-work Cx handling to be per-cpu and asymmetrical, fixing support on
modern dual-core systems as well.

- Parse the _CST packages for each cpu and track all the states individually,
on a per-cpu basis.

- Revert to generic FADT/P_BLK based Cx control if the _CST package
is not present on all cpus. In that case, the new driver will
still support per-cpu Cx state handling. The driver will determine the
highest Cx level that can be supported by all the cpus and configure the
available Cx state based on that.

- Fixed the case where multiple cpus in the system share the same
registers for Cx state handling. To do that, added a new flag
parameter to the acpi_PkgGas and acpi_bus_alloc_gas functions that
enable the caller to add the RF_SHAREABLE flag.  This flag could also be
useful to other callers (acpi_throttle?) in the tree but this change is
not yet made.

- For Core Duo cpus, both cores seems to be taken out of C3 state when
any one of the cores need to transition out. This broke the short sleep
detection logic.  It is disabled now if there is more than one cpu in
the system for now as it fixed it in my case.  This quirk may need to
be re-enabled later differently.

- Added support to control cx_lowest on a per-cpu basis. There is still
a generic cx_lowest to enable changing cx_lowest for all cpus with a single
sysctl and for ease of use.  Sample output for the new sysctl:

dev.cpu.0.cx_supported: C1/1 C2/1 C3/57
dev.cpu.0.cx_lowest: C3
dev.cpu.0.cx_usage: 0.00% 43.16% 56.83%
dev.cpu.1.cx_supported: C1/1 C2/1 C3/57
dev.cpu.1.cx_lowest: C3
dev.cpu.1.cx_usage: 0.00% 45.65% 54.34%
hw.acpi.cpu.cx_lowest: C3

This work was done by Stephane E. Potvin with some simple reworking by
myself.  Thank you.

Submitted by:	Stephane E. Potvin <sepotvin / videotron.ca>
MFC after:	2 weeks
2007-01-07 21:53:42 +00:00
Florent Thoumie
eacc7cde7d Jail_ip and jail_interface local variables were renamed to _ip and _interface
in a previous commit to avoid namespace collisions, unfortunately I missed two
of them. This leads to the ip alias being incorrectly removed in some cases
when using the stop command.

Reported by:	Philipp Wuensche <cryx-freebsd@h3q.com>
2007-01-02 11:07:13 +00:00
Maxim Konovalov
65e1af96f6 o Fix a comment: refer to the write community name by the OID not by
the line number which is incorrect now and probably will shift in future.
2006-12-31 11:19:48 +00:00
Yaroslav Tykhiy
c7be7e20f6 Allow for /usr/bin/env when parsing the shebang line from an
interpreted $command.  Some "portable" sofware packages use such a
line to skip the task of figuring out the absolute pathname of the
interpreter at install time, e.g.:

	#!/usr/bin/env python

It is insecure, but a popular book on Python seems to have advised
it to a wide audience.  Hence a number of such scripts in the ports,
mostly written in Python.

PR:		bin/100287
MFC after:	1 week
2006-12-31 11:07:29 +00:00
Yaroslav Tykhiy
0c30639059 Use $required_modules wherever suitable. Use load_kld() in special
cases.  So we get rid of quite a few lines of duplicated code.
2006-12-31 10:37:18 +00:00
Yaroslav Tykhiy
619a36fa66 Fix a typo in a warning message. 2006-12-31 10:12:53 +00:00
Yaroslav Tykhiy
45da9952e5 Eliminate global symbols starting with an underscore from rc.d
scripts, except for mdconfig* and jail.  Such symbols are reserved
for the rc.subr internals.  Most scripts can be fixed by just
declaring _foo symbols as local: few scripts actually need them to
be global.

Discussed with:	dougb in freebsd-rc
2006-12-30 22:53:20 +00:00
Paolo Pisati
ff2f6fe80f Summer of Code 2005: improve libalias - part 2 of 2
With the second (and last) part of my previous Summer of Code work, we get:

-ipfw's in kernel nat

-redirect_* and LSNAT support

General information about nat syntax and some examples are available
in the ipfw (8) man page. The redirect and LSNAT syntax are identical
to natd, so please refer to natd (8) man page.

To enable in kernel nat in rc.conf, two options were added:

o firewall_nat_enable: equivalent to natd_enable

o firewall_nat_interface: equivalent to natd_interface

Remember to set net.inet.ip.fw.one_pass to 0, if you want the packet
to continue being checked by the firewall ruleset after being
(de)aliased.

NOTA BENE: due to some problems with libalias architecture, in kernel
nat won't work with TSO enabled nic, thus you have to disable TSO via
ifconfig (ifconfig foo0 -tso).

Approved by: glebius (mentor)
2006-12-29 21:59:17 +00:00
Hiroki Sato
fc61bfebd0 Add "nojail" keyword to prevent spurious error messages.
Spotted by:	Keve Nagy
PR:		conf/107083
2006-12-29 15:56:21 +00:00
Yaroslav Tykhiy
c89572720c MFp4:
Implement the checks for required_* objects as two functions, one
to be run before precmd and the other after it.  They get the current
rc command as an argument so they can choose what requirement tests
to perform.  As of now, only "start" needs such tests.

Implement a new requirement variable, required_modules.  It can
list kernel modules that need to be loaded after start_precmd
indicated success.  Each name in the list can be just "file", or
"file:module", or "file~regex".  This will allow us to remove a lot
of duplicated code from rc.d scripts.

Perform the checks not only for the default start method, but for
any method.  This allows for more flexibility and fixes a few rc.d
scripts (namely newsyslog, pf, sendmail) that rely on a required_*
variable while providing a non-default start method.

To be able to call the new check_required* functions naturally,
remove lots of crufty duplicated code pieces from run_rc_command
and replace each of them by a call to the helper function providing
a single corrected instance of the respective code snippet.  Now
run_rc_command isn't as scary as it used to be, and it even appears
to have quite a nice logic that was obscured by the old crufty code.

In the default handler for restart, run start from a subshell to
protect global varibles, e.g., _postcmd, from modification by the
start handler.  This enables using restart_postcmd. [x]

PR:		conf/98734 [x]
Submitted by:	Rick van der Zwet <rick@wzoeterwoude.net> [x]
Reviewed by:	freebsd-rc (silence for an older version)
MFC after:	1 month
2006-12-27 13:15:33 +00:00
Shteryana Shopova
fd0e516eda Add a (disabled) configuration line to enable snmp_bridge(3) module.
Approved by:	bz (mentor)
2006-12-20 22:10:34 +00:00
Yaroslav Tykhiy
a9e42d31b7 Syscons cannot be stopped, so provide a no-op stop method.
The default stop method from rc.subr isn't suited for this
case and produces a bogus warning: "syscons not running".

Suggested by:	matteo
2006-12-20 12:59:50 +00:00
Yaroslav Tykhiy
51f1dbba96 Improve rc.d conformance:
- don't play a needless trick with prestart, just use start method;
- provide no-op stop method so that we don't get bogus "abi not running" error.
2006-12-20 11:37:15 +00:00
Hiroki Sato
2c615e1a64 Disable IPv6 configuration for interfaces in pccard_ether_start().
After a change of devd.conf, devd(8) handles NIC attach/detach event
by using /etc/pccard_ether with the interface name as the argument.
This model does not work properly with IPv6 configuration because the
implementation of IPv6 stateless auto-configuration in the FreeBSD
rc.d scripts depends on whether there are any explicit configurations
for interfaces or not.  It works this way: if no manual configuration,
it will perform auto-configuration, but otherwise no
auto-configuration will be performed.  So, this behavior can only be
determined by all of the interfaces on a system, not a single one.
For this reason, the network6_interface_setup() function called from
the pccard_ether_start() does not work with a single interface name.
And what is worse, this combination of devd.conf and
pccard_ether_start() caused a bad side-effect that when
ipv6_enable=YES, all of interfaces marked as DOWN would be UP
unconditionally (and router solicitation was sent) just after devd(8)
was invoked.  This should be fixed in a more sophisticated way.
2006-12-08 15:48:42 +00:00
Hiroki Sato
6027060830 Add a link-local address to the lo0 even when ipv6_enable="NO".
A kernel with INET6 always has ::1 on lo0, so in the case of
ipv6_enable="NO" the lo0 can have ::1 with no link-local address.
This is a violation of the IPv6 specification.  As a workaround for
this situation, fe80::1 is added in rc.d/auto_linklocal when lo0 has
no link-local address.  This should not be harmful for IPv4-only users.
2006-12-08 06:34:06 +00:00
Ruslan Ermilov
6b45faf0a4 Move npe.4 to a machine specific manpage subdirectory. 2006-12-05 16:57:10 +00:00
Luigi Rizzo
9b96fa2da3 - put some common code in a function handle_remount();
- add better checks on non-existing directories to prevent error
  messages at run time;
- introduce a function log() to help debugging diskless booting
  when things don't work;
- modify the parsing of diskless_remount so you can add mount_nfs
  options after the pathname. You could use 'remount' to do something
  similar, but this way is more convenient because you don't have to
  hardwire the server name in the command.
- document the above.

I have been running the above in a diskless lab since february on RELENG_6.

MFC after: 1 week
2006-12-03 23:50:29 +00:00
Florent Thoumie
80301cdc8e Teach find_processes() to use ${name}_chroot.
Obtained from:	NetBSD
X-MFC after:	6.2-RELEASE
2006-11-26 22:02:09 +00:00
Florent Thoumie
e1ad9834a0 Remove leading dollar sign in rcvar command output.
There's no dollar use in variable assignment in sh.
Assuming this is can be expected behavior for some
people, this change won't be MFC'ed to RELENG_6.

Discussed with:	yar on -rc
2006-11-26 19:03:19 +00:00
Andrey A. Chernov
bcb0669391 Back out 1.120, it was premature. 2006-11-12 12:02:34 +00:00
Dag-Erling Smørgrav
bb43b6d5b6 Back out 1.122, it was poorly thought out. 2006-11-11 23:26:08 +00:00
Dag-Erling Smørgrav
d898531a74 Back out 1.121, it was premature. 2006-11-11 22:23:49 +00:00
Ceri Davies
8495277664 Ensure that the load of rules into the alternate ruleset worked before
loading them into the live one too.

PR:		conf/97311
Submitted by:	David Bushong
Reviewed by:	silence on rc@
Approved by:	ru (mentor)
MFC after:	10 days
2006-11-11 10:48:34 +00:00
Dag-Erling Smørgrav
330cdc3318 Add share/xsl.
MFC after:	1 week
2006-11-10 22:57:39 +00:00
Dag-Erling Smørgrav
a05bf06920 Add locales for nb_NO and nn_NO.
Reviewed by:	philip
2006-11-09 18:10:34 +00:00
Robert Watson
850cb5f8db Add auditd_program variable to defaults, in order to make it more clear
how to change the auditd instance.  When using a port/package-based
OpenBSM, changing the auditd pointer may be desirable.

Obtained from:	TrustedBSD Project
MFC after:	3 weeks
2006-11-06 15:11:24 +00:00
David E. O'Brien
821cd5328a Switch default proto to TCP. 2006-11-06 01:42:11 +00:00
Pawel Jakub Dawidek
f348204c94 Hook up gjournal bits to the build.
Sponsored by:	home.pl
2006-10-31 22:22:30 +00:00
Hartmut Brandt
57a8709500 Bind to INADDR_ANY in the default configuration. This makes bsnmpd(1)
automatically work on multi-homed hosts and without explicite specification
of the hostname in the config file.

Submitted by:	jmg
2006-10-31 10:23:28 +00:00
Max Laier
51769ee611 Do not try to rtsol on pflog or pfsync devices. 2006-10-29 13:29:49 +00:00
Poul-Henning Kamp
891cf3ad81 Give rc.firewall a polish and a new method.
Factor out the loopback setup

Use "me" instead of hardcoded $ip where possible.

Add "workstation" which protects just this machine with stateful
    firewalling.  Put the variables for this in rc.conf.

Submitted by:	Flemming Jacobsen <fj@batmule.dk>
Reviewed by:	cperciva
2006-10-28 20:08:12 +00:00
Tai-hwa Liang
7e75ef1374 Re-sync'ing pf rules in post command as we already did for ipfilter.
With this patch, pf rules with dynamically created devices such like tun0
works without further intervention.

Reviewed by:	mlaier
MFC after:	3 days
2006-10-26 00:29:43 +00:00
Xin LI
fc4958a7b2 Synchronize pf.os with OpenBSD.
Obtained from:	OpenBSD
MFC After:	3 days
Approved by:	mlaier (maintainer)
2006-10-23 05:09:44 +00:00
Hiroki Sato
e7bf82055f Suppress a spurious warning message when a kernel without INET6 is
used.

Spotted by:	ru
Reviewed by:	ume
MFC after:	3 days
2006-10-22 17:21:03 +00:00
Florent Thoumie
8dcd83aa8f Add 'reload' to the list of available commands for the amd rc.d script.
PR:		conf/104507
Submitted by:	Douglas K. Rand <rand@meridian-enviro.com>
MFC after:	3 days
2006-10-18 15:56:11 +00:00
Yaroslav Tykhiy
7d0ed28d3b Improve cleartmp in a number of aspects:
+ Use rc.subr(8) features properly.
+ Do the whole job of obliterating /tmp contents in find(1).
+ Leave lost+found and quota.{user,group} in /tmp only if root-owned.
+ Make the overall structure clearer by first removing the X dirs
  (perhaps along with the rest of /tmp) and then re-creating them.
+ Use "find -exec rm -rf {} +" for efficiency: each rm instance gets
  a chance to kill as much files in /tmp as ARG_MAX permits.

PR:		bin/104044
Submitted by:	Andrey Simonenko <see PR for email>
Hacked by:	yar
MFC after:	1 month
2006-10-16 13:01:45 +00:00
Ceri Davies
d7862beb32 Add idmapd_flags to defaults/rc.conf.
Document it and idmapd_enable.
2006-10-15 15:55:00 +00:00
Ceri Davies
715e675c5f RC script for idmapd(8), defaulting to off. 2006-10-15 14:19:06 +00:00
Ruslan Ermilov
c263eae028 Replace duplicate and not quite accurate capabilities
description with a reference to the disktab(5) manpage.

PR:		doc/48105
2006-10-14 16:39:03 +00:00
Hajimu UMEMOTO
f5c04409eb Revert the default value of net.inet6.ip6.auto_linklocal to 1.
If ipv6_enable is not set to "YES", net.inet6.ip6.auto_linklocal
is turned to 0 at boot.

Discussed with:	re@, gnn@
MFC after:	3 days
2006-10-13 12:41:36 +00:00
Paolo Pisati
bb894bc9e6 Fix a regression: let natd load libalias modules before /usr is mounted
renaming /lib/libalias_*.so.4 to /lib/libalias_*.so.

Approved by: glebius
Reviewed by: glebius, ru
2006-10-08 14:02:00 +00:00
Hajimu UMEMOTO
639b2c8e5a Restore the behavior that net.inet6.ip6.auto_linklocal=0 could
be coexist with ipv6_enable="YES".

MFC after:	3 days
2006-10-07 15:45:56 +00:00
Florent Thoumie
2440a169c5 Introduce mixer_enable (default: YES).
PR:		conf/101268
Submitted by:	Eugene Grosbein <eugen@grosbein.pp.ru>
Approved by:	cperciva (mentor)
X-MFC after:	6.2-RELEASE
Sponsored by:	FreeBSD Test-Bugathon
2006-10-06 23:22:13 +00:00
Ruslan Ermilov
04c7da702f A GEOM cache can speed up read performance by sending fixed size
read requests to its consumer.  It has been developed to address
the problem of a horrible read performance of a 64k blocksize FS
residing on a RAID3 array with 8 data components, where a single
disk component would only get 8k read requests, thus effectively
killing disk performance under high load.  Documentation will be
provided later.  I'd like to thank Vsevolod Lobko for his bright
ideas, and Pawel Jakub Dawidek for helping me fix the nasty bug.
2006-10-06 08:27:07 +00:00
Brooks Davis
12d828393a Pull in /etc/rc.conf.d/network so that ifconfig_<if> variables can be
set there.  This is required for consistency with /etc/rc.d/netif.

PR:		conf/103893
Submitted by:	Nick Hibma <nick at anywi.com>
MFC after:	3 days
2006-10-02 18:50:58 +00:00
George V. Neville-Neil
90ce6fa1c8 Turn off automatic link local address if ipv6_enable is not set to YES
in rc.conf

Reviewed by:    KAME core team, cperciva
MFC after:      3 days
2006-10-02 10:13:30 +00:00
Yaroslav Tykhiy
4af42c2cb1 debug() shouldn't misidentify itself to logger(1).
Noticed by:	David Thompson <dat1965 yahoo com>
2006-10-02 08:20:37 +00:00
Andrey A. Chernov
8a7dcaf4f9 Add mn_MN.UTF-8 2006-10-02 00:23:14 +00:00
Ruslan Ermilov
ebfbcb8bec Create section 8 man subdirectories for PowerPC. 2006-09-30 09:02:38 +00:00
Bruce M Simpson
2d20d32344 Push removal of mrouted down to the rest of the tree. 2006-09-29 15:45:11 +00:00
Paolo Pisati
be4f3cd0d9 Summer of Code 2005: improve libalias - part 1 of 2
With the first part of my previous Summer of Code work, we get:

-made libalias modular:

 -support for 'particular' protocols (like ftp/irc/etcetc) is no more
  hardcoded inside libalias, but it's available through external
  modules loadable at runtime

 -modules are available both in kernel (/boot/kernel/alias_*.ko) and
  user land (/lib/libalias_*)

 -protocols/applications modularized are: cuseeme, ftp, irc, nbt, pptp,
  skinny and smedia

-added logging support for kernel side

-cleanup

After a buildworld, do a 'mergemaster -i' to install the file libalias.conf
in /etc or manually copy it.

During startup (and after every HUP signal) user land applications running
the new libalias will try to read a file in /etc called libalias.conf:
that file contains the list of modules to load.

User land applications affected by this commit are ppp and natd:
if libalias.conf is present in /etc you won't notice any difference.

The only kernel land bit affected by this commit is ng_nat:
if you are using ng_nat, and it doesn't correctly handle
ftp/irc/etcetc sessions anymore, remember to kldload
the correspondent module (i.e. kldload alias_ftp).

General information and details about the inner working are available
in the libalias man page under the section 'MODULAR ARCHITECTURE
(AND ipfw(4) SUPPORT)'.

NOTA BENE: this commit affects _ONLY_ libalias, ipfw in-kernel nat
support will be part of the next libalias-related commit.

Approved by: glebius
Reviewed by: glebius, ru
2006-09-26 23:26:53 +00:00
Robert Watson
9b2b93002d Sleep for one second after calling audit -t to give the audit daemon a
chance to actually terminate the audit service and exit.  Otherwise, on
an rc.d/auditd restart, the new audit daemon instance may try to start
auditing while the previous session is still running.  Likewise, this
ensures a chance for auditd to terminate the audit trail at system
shutdown.

Perhaps more ideally, the script would wait synchronously for auditd to
exit rather than for an arbitrary but short period of time.

MFC after:	3 days
Obtained from:	TrustedBSD Project
2006-09-24 17:31:04 +00:00
Brooks Davis
cf81114dc4 network_ipv6 also does some interface configuration so require it to run
before starting devd so they don't trip over each other.

PR:		conf/103428
2006-09-21 14:29:32 +00:00
Brooks Davis
6da9aa1452 Introduce a new method ipv6if which attemptes to figure out if an
interface is an IPv6 interface.

Use this method to decide if we should attempt to configure an interface
with an IPv6 address in pccard_ether.  The mechanism pccard_ether uses
to do this is unsuited to the task because it assumes the list of
interfaces it is passed is the full list of IPv6 interfaces and makes
decissions based on that.  This is at least a step in the right
direction and is probably about as much as we can MFC safely.

PR:		conf/103428
MFC after:	3 days
2006-09-21 01:44:52 +00:00
Brooks Davis
cea6851cd0 Flushing all IPv4 routes when an interface is removed or unconfigured
makes no sense.  Remove the undocumented removable_route_flush feature
from pccard_ether.

X-MFC after:	never
2006-09-20 19:48:31 +00:00
Brooks Davis
0e409e4b42 Search the list of up interfaces provided by "ifconfig -ul" instead of
greping for UP in "ifconfig $ifn".  This eliminates a dependancy on
/usr.
2006-09-20 19:45:30 +00:00
Maksim Yevmenkin
e6c8f242ae Add bthidd(8) rc(8) script
MFC after:	1 month
2006-09-07 22:25:08 +00:00
Maksim Yevmenkin
1cda541cf5 Prepare for upcoming bthidd(8) update. Install vkbd(4) header into dev/vkbd.
MFC after:	1 month
2006-09-07 18:24:24 +00:00
Marcel Moolenaar
d3867f934d Unbreak PowerPC build after addition of powermac_nvram(4powerpc). 2006-09-02 20:58:37 +00:00
Brooks Davis
401bae3d6b - Document /conf/diskless_remount in the list of special files.
- Note that diskless_remount files may use ".." to support mounts above
  the root path.
- Copy dot files when populating directories from /conf. [1]

PR:		misc/102724 [1]
Submitted by:	Attila Nagy <bra at fsn.hu> [1]
2006-09-01 16:33:15 +00:00
Ruslan Ermilov
2752b41267 Kill the default phone numbers.
Obtained from:	OpenBSD
2006-08-31 21:13:12 +00:00
David E. O'Brien
aec047da48 Re-add lukemftpd. It has: PAM, MAC, per-class nologin files,
login.conf resource limits and features.
2006-08-31 17:15:10 +00:00
Colin Percival
48ffe56ac5 Add FreeBSD Update 2.0 client code. The build code is in the projects
repository.

Sponsored by:	FreeBSD security development fundraiser
2006-08-31 09:51:34 +00:00
Ruslan Ermilov
98374c9c79 Comment out lines that use example addresses and example.com names so
that local changes can be made more easily (without having to comment
these lines, and making the diff more readable).
2006-08-29 09:20:48 +00:00
Ruslan Ermilov
ca7f20f57f The kvm_mkdb(8) is long dead. 2006-08-29 08:49:58 +00:00
Colin Percival
1dcb6ad173 When stopping powerd, set the CPU frequency back to its maximum value
(i.e., what it was almost certainly at before powerd was started).

Submitted by:	R.B. Riddick
MFC after:	3 days
2006-08-27 11:04:39 +00:00
Doug Barton
40972c762e Use ports INDEX-7 instead of INDEX-6
Submitted by:	Niclas Zeising <lothrandil@n00b.apagnu.se>
2006-08-27 08:12:53 +00:00
Tom Rhodes
b5aea37f80 Add login.conf checking to periodic security scripts. If the login.conf file
is not UID/GID 0, limits will be ignored and a strange error sent to auth.log.

Head nod:	ru, rwatson
2006-08-25 07:34:36 +00:00
Tom Rhodes
c24e5339e5 Send more Alpha bits to the bin. 2006-08-25 00:36:59 +00:00
Ruslan Ermilov
fb7e6ed3e6 Fix example:
/conf/base/diskless_remount -> /conf/base/etc/diskless_remount

MFC after:	3 days
2006-08-22 16:21:16 +00:00
Florent Thoumie
1ff6181777 - Add ypserv to the REQUIRE list.
Reported by:	David Thompson <dat1965@yahoo.com>
Discussed on:	-rc (brooks)
Approved by:	cperciva (mentor, implicit)
MFC after:	3 days
2006-08-22 14:58:23 +00:00
Florent Thoumie
3081bf98bf Backout this commit since it breaks startup and some scripts in
certain conditions. I haven't been able to find a better solution yet:

    - Set a two read-only variables (${prefix} and ${etcdir}). This is
    especially useful when using /etc/rc.d scripts with third-party
    software installed from ports.
    - Fix rc.d/sshd to work with openssh from ports using ${etcdir}
    instead of hardcoded /etc.
    - Reflect prefix/etcdir changes in rc.subr.8.

        src/etc/rc.d/sshd: rev 1.9 -> 1.10
        src/etc/rc.subr: rev 1.51 -> 1.52
        src/share/man/man8/rc.subr.8: rev 1.11 -> 1.12

Approved by:	cperciva (mentor)
2006-08-22 11:17:29 +00:00
Florent Thoumie
94733fef16 - Remove ramdisk rc.d scripts since they've been replaced by mdconfig{,2}.
- Update ObsoleteFiles.inc.

Approved by:	cperciva (mentor)
2006-08-22 11:12:09 +00:00
Brooks Davis
fed4d6b394 Don't try to start interfaces that don't exist.
Reported by:    Dominique Goncalves <dominique.goncalves at gmail.com>
2006-08-18 13:19:45 +00:00
Yaroslav Tykhiy
7293852835 Eliminate header line(s) from ps(1) output instead of skipping over them. 2006-08-18 13:07:38 +00:00
Yaroslav Tykhiy
a9a6b38f96 The ps(1) command is unfriendly to scripts by default because
it limits the width of its output to the value of $COLUMNS, or
what TIOCGWINSZ reports, or 79 columns.  We should specify -ww
to ps(1) so that it removes the limit and prints lines in full.
Otherwise very long command pathnames could be mishandled, e.g.,
by _find_processes().

MFC after:	1 week
2006-08-18 12:10:18 +00:00
Brian Somers
02e079a2c3 Make it a little clearer that interface-specific flags aren't additional
to specified dhclient flags.

Mention background_dhclient_iface.

Suggested by: ru
2006-08-17 20:13:24 +00:00
Brian Somers
5f9d14bd5f Add a missing quote
Spotted by: ru
2006-08-17 19:57:10 +00:00
Brian Somers
9341e8dd88 Add a -p switch to dhclient. The switch tells dhclient to persist
despite the interface link status.

Add dhclient_flags_iface and background_dhclient_iface rc.conf options.
(where iface is a specific interface).  These can be used to give
interface specific flags to dhclient.

Reviewed by:	brooks@
2006-08-17 17:12:27 +00:00
Yaroslav Tykhiy
ae44d27bfd Allow for setting negative priority (niceness) when $foo_user is non-root.
The order in _doit must be "nice su", not "su nice", for that.
In addition, don't ignore the exit status from "cd $foo_chdir".

Reviewed by:	freebsd-rc (silence)
MFC after:	1 week
2006-08-17 08:04:20 +00:00
Brooks Davis
4e7ff69a4c Introduce a new function, ifexists and use it to avoid attempting to
touch interfaces that don't actually exist in the stop case.  In the
process move some IPv4 specific code from ifconfig_down to ipv4_down.

This should solve problems with ifconfig: error messages on boot when
interfaces are renamed.
2006-08-17 03:03:38 +00:00
Brooks Davis
0d1fe37a04 Set removable_route_flush to NO be default. It's clearly the wrong
thing to do in most (all?) cases and certainly should not be the default
now that we're running pccard_ether on all interface creates and
destroys.

MFC after:	3 days
2006-08-16 17:14:52 +00:00
Nate Lawson
d7df8235b0 Back out 1.272. The LAPIC timer conflicts with C2/3 on various systems,
and so users get hangs until interrupts are generated another way.  We'll
have to find a way to make the 2 work together before re-enabling this by
default.
2006-08-05 20:28:50 +00:00
Dag-Erling Smørgrav
7f113673df Forgot to add mountlate to the Makefile. 2006-08-04 18:37:03 +00:00
John Birrell
f955a17eed Not allowed to use tabs. The rule that proves the rule. Heh. 2006-08-03 05:44:51 +00:00
John Birrell
3e6a93dd95 Alphabetical order is probably better. 2006-08-03 03:30:53 +00:00
John Birrell
3a3c4c86a8 Add the library directory where DTrace library scripts live. 2006-08-03 03:28:03 +00:00
Marcel Moolenaar
2765132216 Remove remnants of Alpha. 2006-08-02 17:22:30 +00:00
Maxim Sobolev
e5d34218fb Add device to access and modify Open Firmware NVRAM settings in
PowerPC-based Apple's machines and small utility to do it from
userland modelled after the similar utility in Darwin/OSX.

Only tested on 1.25GHz G4 Mac Mini.

MFC after:	1 month
2006-08-01 22:19:01 +00:00
Stephen McKay
55fd436b5f This script should probably have an enabling variable since it can produce
surprising results.  For now, at least make it safe to boot the default
kernel when /boot/kernel is already a symlink.
2006-07-30 12:54:37 +00:00
Simon L. B. Nielsen
31c9ecbf46 Add /usr/lib/engines for OpenSSL engines. 2006-07-29 19:47:09 +00:00