Ruslan Ermilov [Fri, 15 Jan 2010 13:48:29 +0000 (13:48 +0000)]
Cherry-pick some vendor changes to mdoc and man macro packages.
(They were all made before Groff switched from GPLv2 to GPLv3,
though the mdoc macro packages is not affected by the switch.)
: 2007-11-10 Michail Vidiassov <master@iaas.msu.ru>
:
: * tmac/doc-syms (doc-str-St--susv3): New string.
: * tmac/groff_mdoc.man: Document it.
:
: 2008-09-06 Werner LEMBERG <wl@gnu.org>
:
: * tmac/doc-common (Dd, Os, Dt): Reset `doc-command-name' to make
: `.Nm' work properly if next manual page is printed.
:
: 2008-10-04 Werner LEMBERG <wl@gnu.org>
:
: * tmac/doc-common (doc-operating-system-*): Update releases.
:
: * tmac/groff_mdoc.man: Document it.
:
: 2008-10-13 Werner LEMBERG <wl@gnu.org>
:
: * tmac/groff_mdoc.man: Update documentation on BSD-like OS string
: versions.
:
: 2008-10-16 Werner LEMBERG <wl@gnu.org>
:
: * tmac/doc-common (doc-operating-system-*), tmac/groff_mdoc.man: Add
: NetBSD 4.0.1.
:
: 2008-11-05 Werner LEMBERG <wl@gnu.org>
:
: * tmac/doc-common (Dt): Start a new page if necessary and set up
: headers.
:
: 2008-12-24 Michail Vidiassov <master@iaas.msu.ru>
:
: * tmac/doc-common: Add entries for Mac OS X and FreeBSD.
:
: 2009-01-02 Werner LEMBERG <wl@gnu.org>
:
: * tmac/groff_mdoc.man: Update OS version string listing.
:
: 2009-01-03 Werner LEMBERG <wl@gnu.org>
:
: * tmac/an-old.tmac, tmac/doc.tmac: For -Tutf8, map \-, -, ', and `
: conservatively to ASCII for the sake of easy cut and paste.
Brooks Davis [Fri, 15 Jan 2010 07:18:46 +0000 (07:18 +0000)]
Only allocate the space we need before calling kern_getgroups instead
of allocating what ever the user asks for up to "ngroups_max + 1". On
systems with large values of kern.ngroups this will be more efficient.
The now redundant check that the array is large enough in
kern_getgroups() is deliberate to allow this change to be merged to
stable/8 without breaking potential third party consumers of the API.
Brooks Davis [Fri, 15 Jan 2010 07:05:00 +0000 (07:05 +0000)]
Since all other comparisons involving ngroups_max use
"ngroups_max + 1", use ">= ngroups_max+1" instead of the equivalent
"> ngroups_max" to reduce confusion.
Jilles Tjoelker [Thu, 14 Jan 2010 23:27:23 +0000 (23:27 +0000)]
In 'make delete-old', use 'exec' to redirect an fd persistently.
That is, write 'exec 3<&0' instead of '3<&0'. Due to an sh(1) bug fixed in
r199953, the latter also persisted, provided that fd 3 was not open before.
With newer sh or fd 3 open, it would not delete orphaned catpages.
Ed Schouten [Thu, 14 Jan 2010 20:58:45 +0000 (20:58 +0000)]
Add wtmpcvt(1).
This utility allows users to convert their wtmp databases to the new
format. It makes no sense for users to keep their wtmp log files if they
are unable to view them.
It basically copies ut_line into ut_id as well. This makes it possible
for last(1) and ac(8) to match login records with their corresponding
logout record.
Pyun YongHyeon [Thu, 14 Jan 2010 19:14:24 +0000 (19:14 +0000)]
Add check for fiber mode for BCM5714 PHY. This PHY supports both
copper and fiber interfaces over GMII so an explicit check is
necessary to know whether it was configured for fiber interface.
This change make BCM5715S work.
Pyun YongHyeon [Thu, 14 Jan 2010 19:08:43 +0000 (19:08 +0000)]
For controllers that has dual mode PHY(copper or fiber) interfaces
over GMII, make sure to enable GMII. With this change brgphy(4) is
used to handle the dual mode PHY. Since we still don't have a sane
way to pass PHY specific information to mii(4) layer special
handling is needed in brgphy(4) to determine which mode of PHY was
configured in parent interface.
This change make BCM5715S work.
Tested by: olli
Obtained from: OpenBSD
MFC after: 1 week
John Baldwin [Thu, 14 Jan 2010 14:43:16 +0000 (14:43 +0000)]
- Note that if_xname, if_dname, and if_dunit are usually initialized via
if_initname().
- Document if_drv_flags and replace references to IFF_(RUNNING|OACTIVE)
with references to IFF_DRV_(RUNNING|OACTIVE).
- Complete truncated sentence in the description of if_transmit by copying
from the description in if_qflush.
- Add missing line breaks for translators.
John Baldwin [Thu, 14 Jan 2010 14:36:39 +0000 (14:36 +0000)]
- Update required headers for namei() to add <sys/fcntl.h> and remove
<sys/proc.h>.
- Add RETURN VALUES and ERROR sections for namei()'s error return values.
- Add a missing link to NDHASGIANT.9.
PR: docs/142815, docs/142816
Submitted by: Lachlan Kang (1, 2)
MFC after: 3 days
Ulf Lilleengen [Thu, 14 Jan 2010 14:30:54 +0000 (14:30 +0000)]
Bring in the ext2fs work done by Aditya Sarawgi during and after Google Summer
of Code 2009:
- BSDL block and inode allocation policies for ext2fs. This involves the use
FFS1 style block and inode allocation for ext2fs. Preallocation was removed
since it was GPL'd.
- Make ext2fs MPSAFE by introducing locks to per-mount datastructures.
- Fixes for kern/122047 PR.
- Various small bugfixes.
- Move out of gnu/ directory.
Sponsored by: Google Inc.
Submitted by: Aditya Sarawgi <sarawgi.aditya AT SPAMFREE gmail DOT com>
Edwin Groothuis [Thu, 14 Jan 2010 10:56:54 +0000 (10:56 +0000)]
Make whois capable of searching for IPv6 addresses just like it can
do for IPv4 addresses without having to explicetly specify that the
ARIN server should be used to get the initial information
Ed Schouten [Thu, 14 Jan 2010 10:00:01 +0000 (10:00 +0000)]
Revert the change to Symbol.map, made in r202274.
Even though we use __sym_compat(), we should list the symbol in
Symbol.map.
ttyslot() is now listed as follows, which seems to do the right thing:
| Symbol table '.dynsym' contains 2755 entries:
| Num: Value Size Type Bind Vis Ndx Name
| 613: 00000000000477b0 121 FUNC GLOBAL DEFAULT 10 ttyslot@FBSD_1.0
Peter Pentchev [Thu, 14 Jan 2010 09:38:23 +0000 (09:38 +0000)]
Document that the IEEE80211_DEBUG kernel option is needed for
using the wlan(4) debugging controls with wording slightly
different from that in the PR.
Ed Schouten [Thu, 14 Jan 2010 05:37:43 +0000 (05:37 +0000)]
Add two changes that should have gone into commit r202274.
Phase out ttyslot(3).
The ttyslot() function was originally part for SUSv1, marked LEGACY in
SUSv2 and removed later on. This function only makes sense when using
utmp(5), because it was used to determine the offset of the record for
the controlling TTY. It makes little sense to keep it here, because the
new utmpx file format doesn't index based on TTY slots.
Ed Schouten [Thu, 14 Jan 2010 05:35:32 +0000 (05:35 +0000)]
Phase out ttyslot(3).
The ttyslot() function was originally part for SUSv1, marked LEGACY in
SUSv2 and removed later on. This function only makes sense when using
utmp(5), because it was used to determine the offset of the record for
the controlling TTY. It makes little sense to keep it here, because the
new utmpx file format doesn't index based on TTY slots.
Marcel Moolenaar [Thu, 14 Jan 2010 02:48:39 +0000 (02:48 +0000)]
Add ioctl requests to /dev/io on ia64 for reading and writing
EFI variables. The primary reason for this is that it allows
sysinstall(8) to add a boot menu item for the newly installed
FreeBSD image.
Marcel Moolenaar [Thu, 14 Jan 2010 02:14:21 +0000 (02:14 +0000)]
Add wrappers for the RT Variable Services. While here, translate the
EFI status into a standard errno value and change efi_set_time() to
return a standard error.
Ed Schouten [Wed, 13 Jan 2010 18:59:51 +0000 (18:59 +0000)]
Remove login(3), logout(3) and logwtmp(3) from libutil.
These functions only apply to utmp(5). They cannot be kept intact when
moving towards utmpx. The login(3) function would break, because its
argument is an utmp structure. The logout(3) and logwtmp(3) functions
cannot be used, since they provide a functionality which partially
overlaps.
Increment SHLIB_MAJOR to 9 to indicate the removal.
Ed Schouten [Wed, 13 Jan 2010 18:53:06 +0000 (18:53 +0000)]
Remove utmpx stub from libulog.
I'm not increasing the shlib major version for this, because not a
single application outside the base system should have used these
functions in such a short timespan.
Rewrite ulog_login(3) and ulog_logout(3) to build on top of the utmpx
implementation in libc.
Ed Schouten [Wed, 13 Jan 2010 18:43:32 +0000 (18:43 +0000)]
Make OpenSSH work with utmpx.
- Partially revert r184122 (sshd.c). Our ut_host is now big enough to
fit proper hostnames.
- Change config.h to match reality.
- defines.h requires UTMPX_FILE to be set by <utmpx.h> before it allows
the utmpx code to work. This makes no sense to me. I've already
mentioned this upstream.
- Add our own platform-specific handling of lastlog. The version I will
send to the OpenSSH folks will use proper autoconf generated
definitions instead of `#if 1'.
Ed Schouten [Wed, 13 Jan 2010 18:37:42 +0000 (18:37 +0000)]
Let telnetd build without utmp and logwtmp(3).
Just like rlogind, there is no need to change the ownership of the
terminal during shutdown anymore. Also don't call logwtmp, because the
login(1)/PAM is responsible for doing this. Also use SHUT_RDWR instead
of 2.
Ed Schouten [Wed, 13 Jan 2010 18:28:41 +0000 (18:28 +0000)]
Port ftpd to utmpx.
Unfortunately I have to partially wreck its functionality, though. ftpd
used to keep a file descriptor to the wtmp, which allowed it to work
from within a chroot. The current utmpx implementation doesn't offer a
way to do this. Maybe we can address this in the future, if it turns out
to be a real issue.
Ed Schouten [Wed, 13 Jan 2010 18:25:43 +0000 (18:25 +0000)]
Port comsat to utmpx.
It seems comsat stats the utmpx database each 15 seconds to see whether
it has been changed. I am changing this behaviour to look at the utmpx
database upon processing. I don't want to allow direct interference with
the database files. I also wonder whether this optimization has any
measurable performance benefit nowadays.
Ed Schouten [Wed, 13 Jan 2010 18:24:04 +0000 (18:24 +0000)]
Remove `dead code' from rlogind.
- It shouldn't call logwtmp(). Applications like login(1) already make
sure both login and logout entries are written to the storage.
- There's no need to restore permissions on the pseudo-terminal, since
it should be garbage collected by the kernel.
Ed Schouten [Wed, 13 Jan 2010 18:17:12 +0000 (18:17 +0000)]
Port lastlogin(8) to utmpx.
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.
Ed Schouten [Wed, 13 Jan 2010 18:14:59 +0000 (18:14 +0000)]
Port ac(8) to utmpx.
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.
Ed Schouten [Wed, 13 Jan 2010 18:09:21 +0000 (18:09 +0000)]
Port w(1) to utmpx.
Let it print "-" when the TTY string is empty. In this case, it must
also make sure it doesn't match processes who also have no controlling
TTY. Otherwise it will print random kernel processes when trying to pick
the best matching process.
Eventually it should look at the value of ut_pid as well.
Ed Schouten [Wed, 13 Jan 2010 18:08:00 +0000 (18:08 +0000)]
Allow getent(1) to display utmpx entries as well.
Because getutxent also matches the typical get*ent format of library
routines, I thought it would be a good idea to teach it how to read
utmpx databases. getent(1) just gives a raw dump, which is very useful
when debugging problems related to parsing/logging.
Ed Schouten [Wed, 13 Jan 2010 18:06:31 +0000 (18:06 +0000)]
Port last(1) to use utmpx.
Basically there are three major things I changed about last(1):
- It should use ut_type instead of determining by hand what type of
record was given.
- It should now keep track of ut_id's instead of TTYs. This means the
ttylist has been renamed to the idlist, storing all the ut_id's it has
processed until the next reboot.
- I've removed the signal handler. Because our wtmp is rotated so often,
it makes little sense. Even on a simple piece of hardware it should be
capable of grinding through megabytes of logs in a second.
Ed Schouten [Wed, 13 Jan 2010 17:58:49 +0000 (17:58 +0000)]
Migrate init(8) towards utmpx.
According to a comment, we cannot safely remove utmpx entries here
anymore. This is because the libc routines may block on file locking. In
an ideal world login(1) should just remove the entries, which is why I'm
disabling this code for now. If it turns out we get lots of stale
entries here, we should figure out a way to deal with that.
Ed Schouten [Wed, 13 Jan 2010 17:54:32 +0000 (17:54 +0000)]
Port ppp(8) to utmpx.
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.
Ed Schouten [Wed, 13 Jan 2010 17:50:58 +0000 (17:50 +0000)]
Migrate finger(1) towards utmpx.
It was already ported to use libulog, which makes it simpler now. Be
sure to catch the error returned by setutxdb(). Otherwise it may perform
a lookup on the utx.active database.
Ed Schouten [Wed, 13 Jan 2010 17:49:35 +0000 (17:49 +0000)]
Let csh(1) use utmpx instead of utmp.
csh allows you to monitor the utmp(x) file to monitor certain user
logins. Unfortunately it needs to directly stat() this file. I don't
want to break this module , but eventually it shouldn't do that. The
idea of the getutxent(3) API is to hide file access.
Ed Schouten [Wed, 13 Jan 2010 17:29:55 +0000 (17:29 +0000)]
Implement <utmpx.h>.
The utmpx interface is the standardized interface of the user accounting
database. The standard only defines a subset of the functions that were
present in System V-like systems.
I'd like to highlight some of the traits my implementation has:
- The standard allows the on-disk format to be different than the
in-memory representation (struct utmpx). Most operating systems don't
do this, but we do. This allows us to keep our ABI more stable, while
giving us the opportunity to modify the on-disk format. It also allows
us to use a common file format across different architectures (i.e.
byte ordering).
- Our implementation of pututxline() also updates wtmp and lastlog (now
called utx.log and utx.lastlogin). This means the databases are more
likely to be in sync.
- Care must be taken that our implementation discard any fields that are
not applicable. For example, our DEAD_PROCESS records do not hold a
TTY name. Just a time stamp, a record identifier and a process
identifier. It also guarantees that strings (ut_host, ut_line and
ut_user) are null terminated. ut_id is obviously not null terminated,
because it's not a string.
- The API and its behaviour should be conformant to POSIX, but there may
be things that slightly deviate from the standard. This implementation
uses separate file descriptors when writing to the log files. It also
doesn't use getutxid() to search for a field to overwrite. It uses an
allocation strategy similar to getutxid(), but prevents DEAD_PROCESS
records from accumulating.
Make sure libulog doesn't overwrite the manpages shipped with our C
library. Also keep the symbol list in Symbol.map sorted.
I'll bump __FreeBSD_version later this evening. I first want to convert
everything to <utmpx.h> and get rid of <utmp.h>.
David Xu [Wed, 13 Jan 2010 08:53:23 +0000 (08:53 +0000)]
Return SEM_FAILED instead of NULL, though there are same, but the
SEM_FAILED is more suitable name.
In function, sem_close(), always set errno on error.
Andrew Thompson [Wed, 13 Jan 2010 03:16:31 +0000 (03:16 +0000)]
Add a driver by Fredrik Lindberg for Option HSDPA USB devices. These differ
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>
Warner Losh [Tue, 12 Jan 2010 21:17:36 +0000 (21:17 +0000)]
Place proper svn:keywords tag on all these files. They were created
somehow without them on projects/mips, and that mistake was propigated
over to head.
Alexander Motin [Tue, 12 Jan 2010 19:41:07 +0000 (19:41 +0000)]
Make default recording source choosing more intelligent.
Change default recording level from 0 to 75.
It should increase chances for things to work just out of the box.
Alexander Motin [Tue, 12 Jan 2010 16:40:13 +0000 (16:40 +0000)]
Align buffer size to LCM of 128bytes, required by hardware, and alignment of
current format. This fixes problems with non-power-of-2 number of channels.
Enable 5.1 formats support, as they are working fine now.
Alexander Motin [Tue, 12 Jan 2010 11:11:25 +0000 (11:11 +0000)]
Make OSS_GETVERSION ioctl really work. It has 'M' group, not 'P',
as different nearby ones, and was grabbed by MIXER_xxx() handler.
While there, replace '(cmd & MIXER_xxx(0)) == MIXER_xxx(0)' expressions
with more correct '(cmd & ~0xff) == MIXER_READ(0)'. Use of bit operations
to compare numeric fields doesn't looks sane.
Brooks Davis [Tue, 12 Jan 2010 07:49:34 +0000 (07:49 +0000)]
Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic
kern.ngroups+1. kern.ngroups can range from NGROUPS_MAX=1023 to
INT_MAX-1. Given that the Windows group limit is 1024, this range
should be sufficient for most applications.
Alexander Motin [Mon, 11 Jan 2010 22:57:52 +0000 (22:57 +0000)]
Add multichannel (4.0 and 7.1) playback support. 5.1 mode support blocked
now due to unidentified synchonization problem. For 7.1 soundcards 5.1
support handled correctly via software upmix done by sound(4).
Stereo stream is no more duplicated to all ports. If you loose sound, check
you are using right connectors. Front speakers connector is usually green,
center/LFE - orange, rear - black, side - gray.
Bjoern A. Zeeb [Mon, 11 Jan 2010 22:34:25 +0000 (22:34 +0000)]
Change DDB show prison:
- name some columns more closely to the user space variables,
as we do for host.* or allow.* (in the listing) already.
- print pr_childmax (children.max).
- prefix hex values with 0x.