Commit Graph

9185 Commits

Author SHA1 Message Date
Brooks Davis
5255c009dd Restore the check against running as root that I accidentally removed in
r194493.
2009-06-20 18:24:29 +00:00
Christian S.J. Peron
0e37f3e196 Implement the -z (zero counters) option for the various bpf counters.
Add necessary changes to the kernel for this (basically introduce a
bpf_zero_counters() function).  As well, update the man page.

MFC after:	1 month
Discussed with:	rwatson
2009-06-19 20:31:44 +00:00
Xin LI
80b807fef2 Two fixes for SMALL case when compiling with WARNS=6:
- Reduce scope where return value can be referenced.
 - Add a dummy access to timestamp to silence warning.

Submitted by:	Mingyan Guo <guomingyan gmail com>
2009-06-19 19:28:21 +00:00
Brooks Davis
54404cfb13 In preparation for raising NGROUPS and NGROUPS_MAX, change base
system callers of getgroups(), getgrouplist(), and setgroups() to
allocate buffers dynamically.  Specifically, allocate a buffer of size
sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow).

This (or similar gymnastics) is required for the code to actually follow
the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime
and where getgroups may return {NGROUPS_MAX}+1 results on systems like
FreeBSD which include the primary group.

In id(1), don't pointlessly add the primary group to the list of all
groups, it is always the first result from getgroups().  In principle
the old code was more portable, but this was only done in one of the two
places where getgroups() was called to the overall effect was pointless.

Document the actual POSIX requirements in the getgroups(2) and
setgroups(2) manpages.  We do not yet support a dynamic NGROUPS, but we
may in the future.

MFC after:	2 weeks
2009-06-19 15:58:24 +00:00
Brooks Davis
68cc62cec1 When checking if we can write to a file, use access() instead of a
manual permission check based on stat output.  Also, get rid of the
executability check since it is not used.

MFC after:	2 weeks
2009-06-19 15:52:35 +00:00
Hajimu UMEMOTO
46f39347f5 Since the width is always 2, it is enough to put just one
trailing space is enough.

MFC after:	1 week
2009-06-18 16:40:00 +00:00
Hajimu UMEMOTO
bd97a998dc Fix column width of weekday names for multibyte locales.
Noticed by:	nyan
Discussed with:	matusita, takawata
MFC after:	1 week
2009-06-17 14:47:06 +00:00
Ed Schouten
7c7cef7278 Add revoke(1).
While hacking on TTY code, I often miss a small utility to revoke my own
(pseudo-)terminals. This small utility is just a small wrapper around
the revoke(2) call, so you can destroy your very own login sessions.

Approved by:	re
2009-06-15 21:52:27 +00:00
Ed Schouten
cb3ec8e0c1 Make the chpass Makefile honour NO_FSCHG.
The chpass Makefile tried to set the fschg flag on the binaries, even if
NO_FSCHG was passed to the installworld. This meant that if I installed
FreeBSD into a Jail, I couldn't installworld from within the Jail
anymore.

Now that it listens to NO_FSCHG, we can just make it bail out when it
fails, just like PRECIOUSPROG does.
2009-06-15 21:05:00 +00:00
Dag-Erling Smørgrav
c540146463 Add volatile to sig_atomic_t where it was missing.
MFC after:	1 week
2009-06-14 21:39:52 +00:00
Ed Schouten
33f5882ec0 Include <sys/module.h> for modfind().
Submitted by:	Pawel Worach
2009-06-14 12:47:27 +00:00
Alexander Nedotsukov
64fbf83d6d Fix bug in zphys offset calculation I introduced while retyping
original patch.
2009-06-09 04:09:31 +00:00
Alexander Nedotsukov
e29dea04cb Chase ZFS v13 import changes.
This is a temporary fix until we find a way to avoid fstat
to be broken each time we change the znode.

Approved by:	lulf
2009-06-09 03:35:42 +00:00
Brian Somers
22da50cfc8 Change the behaviour of -F slightly; it now persists (forever) in
trying to open files rather than giving up when it encounters an
error.  ENOENT errors are not reported.

As a result, files that are moved away then recreated are not at
risk of being 'lost' to tail.  Files that are recreated and
temporarily have unreadable permissions will be shown when they
are fixed.

This behaviour is consistent with the GNU version of tail but
without the verbiage that goes with the GNU version.

This change also fixes error messages accompanying -f and -F.
They no longer report problems with (null)!

MFC after:	3 weeks
2009-06-05 09:08:53 +00:00
Edwin Groothuis
5db5ccf42c [patch] calendar.music: Chuck Berry was born in St. Louis, Missouri, not California
The /usr/bin/calendar program reports that Chuck Berry was born
    in San Jose California but he was not born in California.

    Chuck Berry was born in St. Louis, Missouri in 1926 on October 18.

    http://www.chuckberry.com/about/bio.htm
    http://www.khaldea.com/charts/chuckberry.shtml
    http://en.wikipedia.org/wiki/Chuck_Berry

PR:		conf/128215
Submitted by:	comet--berkeley (aka Pablo Picasso) <comet@transbay.net>
MFC after:	2 days
2009-06-04 21:48:04 +00:00
Ed Schouten
89f98d57d6 Remove window(1) from the base system.
Some time ago Tom Rhodes sent me an email that he was willing to perform
various cleanups to the window(1) source code. After some discussion, we
both decided the best thing to do, was to move window(1) to the ports
tree. The application isn't used a lot nowadays, mainly because it has
been superseeded by screen, tmux, etc.

A couple of hours ago Tom committed window(1) to ports (misc/window), so
I'm removing it from the tree. I don't think people will really miss it,
but I'm describing the change in UPDATING anyway.

Discussed with:	trhodes, pav, kib
Approved by:	re
2009-06-02 13:44:36 +00:00
Doug Barton
536613bc35 Add support for the build options that are currently in the port:
WITH_BIND_IDN
	WITH_BIND_LARGE_FILE
	WITH_BIND_SIGCHASE
	WITH_BIND_XML
2009-06-01 21:58:59 +00:00
Gabor Kovesdan
25dd52cdb1 - Add Hungarian catalog 2009-06-01 21:54:59 +00:00
Rick Macklem
61a2fc1fbb Change the "-4" option flag to "-e" since it does not refer to IPv4
and to make it consistent with the flag used by nfsd and mountd.

Approved by:	kib (mentor)
2009-06-01 20:34:00 +00:00
Bjoern A. Zeeb
c2c2a7c11e Convert the two dimensional array to be malloced and introduce
an accessor function to get the correct rnh pointer back.

Update netstat to get the correct pointer using kvm_read()
as well.

This not only fixes the ABI problem depending on the kernel
option but also permits the tunable to overwrite the kernel
option at boot time up to MAXFIBS, enlarging the number of
FIBs without having to recompile. So people could just use
GENERIC now.

Reviewed by:	julian, rwatson, zec
X-MFC:		not possible
2009-06-01 15:49:42 +00:00
Marko Zec
1f7fcb28e6 Unbreak buildworld.
(not waiting for an approval from mentor (julian) due to emergency)
2009-05-31 15:41:46 +00:00
Jilles Tjoelker
6911f596a1 rm, find -delete: fix removing symlinks with uchg/uappnd set.
Formerly, this tried to clear the flags on the symlink's target
instead of the symlink itself.

As before, this only happens for root or for the unlink(1) variant of rm.

PR:		bin/111226 (part of)
Submitted by:	Martin Kammerhofer
Approved by:	ed (mentor)
MFC after:	3 weeks
2009-05-30 10:42:19 +00:00
Xin LI
896406c91a Use prototype for usage(). This makes perror(1) WARNS=6 clean.
Approved by:	gnn
2009-05-28 21:37:40 +00:00
Xin LI
948c1a68c6 Correct off-by-one issue in truss(1) which happens when system call number
is nsyscalls.

PR:		bin/134916
Submitted by:	Steven Hartland <steven hartland multiplay co uk>
MFC after:	2 weeks
2009-05-28 00:38:24 +00:00
Ed Schouten
96b676e999 Update ee(1) in the base system to version 1.5.0.
This version is now licensed under a 2-clause BSD license, instead of
the Artistic license. I've reverted a lot of local modifications we made
to ee, because they have been integrated upstream as well.

Only local modifications include:

- $FreeBSD$ ID.
- Pathname to init.ee.
- catopen() call, to honor LC_MESSAGES instead of LANG.

To keep SVN happy, I'm putting an application/octet-stream mime type on
the KOI8 translations.

Reviewed by:	current@
2009-05-27 17:27:03 +00:00
Andrew Thompson
11c63ede84 Delete the old USB stack. The new stack has settled in and has all the
drivers/functionality and then some.
2009-05-27 16:16:56 +00:00
Jamie Gritton
73d0971bf2 Add support for the arbitrary named jail parameters used by jail_set(2)
and jail_get(2).  Jail(8) can now create jails using a "name=value"
format instead of just specifying a limited set of fixed parameters; it
can also modify parameters of existing jails.  Jls(8) can display all
parameters of jails, or a specified set of parameters.  The available
parameters are gathered from the kernel, and not hard-coded into these
programs.

Small patches on killall(1) and jexec(8) to support jail names with
jail_get(2).

Approved by:	bz (mentor)
2009-05-27 14:30:26 +00:00
Ed Schouten
cfe04e82b1 Merge local changes to ee(1) into contrib space.
The source file, manual page and English translation are now directly
obtained from the contrib/ directory. This makes it a lot easier to
merge a newer version of ee(1) into the tree.

Thanks to:	des and jhb
2009-05-26 21:06:51 +00:00
Ed Schouten
15814131d4 Remove unused curses replacement implementation from ee(1) sources. 2009-05-26 19:06:56 +00:00
Ed Schouten
a982207b32 Vendor import of ee 1.4.2. 2009-05-26 18:50:01 +00:00
Brian Somers
f1b746f92d Bump the document date to reflect the recent address range enhancements.
Suggested by:	throdes
2009-05-25 21:29:06 +00:00
Ed Schouten
4b54fa116c Fix kdump build when building it by hand.
I don't entirely like this approach, but it will only be temporarily,
namely until we get rid of COMPAT_43TTY. I do want <sys/ioctl_compat.h>
to cause a compiler error when included, because it's just there for
binary compatibility.

Reported by:	Andrzej Tobola <ato iem pw edu pl>
2009-05-25 20:07:41 +00:00
Rick Macklem
bcdaa85069 Add the "-4" option to nfsstat, so that it will reports stats
for the experimental nfs subsystem when that option is specified.

Approved by:	kib (mentor)
2009-05-25 15:48:10 +00:00
Brian Somers
f879e8d923 Implement "addr1,+N" ranges - not dissimilar to grep's -A switch.
PR:		134856
Submitted by:	Jeremie Le Hen - jeremie at le-hen dot org
2009-05-25 06:45:33 +00:00
George V. Neville-Neil
1fdc45cd2e A few more style changes as well as a more broad allowance for
errors to be given by the caller.  Change output to be easier
for use in scripts.

Submitted by:	bce
2009-05-20 22:19:22 +00:00
Maxim Konovalov
2785354e68 o style.Makefile(5): remove SRCS. 2009-05-20 05:49:06 +00:00
George V. Neville-Neil
99000ae194 Fix a few style(9) nits.
Submitted by:	danfe
2009-05-19 20:16:18 +00:00
George V. Neville-Neil
9a3009b800 Add a new program, perror, which takes an errno as a command line argument
and outputs the associated textual message in the same way that
perror(3) would if called within a program.
2009-05-19 17:40:22 +00:00
Andriy Gapon
05e605b764 find: do not silently disable -L when -delete is used
First of all, current behavior is not documented and confusing,
and it can be very dangerous in the following sequence:
find -L . -type l
find -L . -type l -delete
(the second line is even suggested by find(1)).

Instead simply refuse to proceed when -L and -delete are both used.
A descriptive error message is provided.
The following command can be safely used to remove broken links:
find -L . -type l -print0 | xargs rm -0

To do:		update find(1)
PR:		bin/90687
Obtained from:	Anatoli Klassen <anatoli@aksoft.net>
Approved by:	jhb (mentor)
2009-05-19 14:23:54 +00:00
Xin LI
216fa4c607 Reduce diff against my local version: replace malloc+memset() cases to calloc(). 2009-05-15 19:41:10 +00:00
Diomidis Spinellis
1de3b2ff03 Fix print_syscall_ret parameter order. 2009-05-13 13:00:52 +00:00
Diomidis Spinellis
b53ae7114c Fix compilation error introduced in r192025. 2009-05-13 12:43:37 +00:00
Diomidis Spinellis
ee3b0f6e2e Add -c option to summarize number of calls, errors, and system time.
Reviewed by:	alfred
2009-05-12 20:42:12 +00:00
Ed Schouten
f31b4b6a80 Add support for old TTY ioctls to kdump.
At first I allowed ioctl_compat.h to be included, but it just returned
an empty file. I had to do this, to keep kdump happy. I really want to
raise a compiler error when including this header, so now it will just
throw an error if you don't set COMPAT_43TTY.
2009-05-09 15:09:40 +00:00
Steven Kreuzer
9330df7e5d Add my birthday
Approved by:	wxs (mentor)
2009-05-07 15:32:13 +00:00
Rene Ladan
da98b8a90d Add my birthday to the calendar.
Approved by:	remko
2009-05-05 16:45:25 +00:00
Sean Nicholas Barkas
d1884d416a Add myself as a mentee of dwmalone for the committers graph. Also add my
birthday to the calendar.

Approved by:	dwmalone (mentor)
2009-05-05 15:03:19 +00:00
David E. O'Brien
7dbb948b5f Merge vendor/file/dist@191739, bringing FILE 5.00 to 8-CURRENT. 2009-05-04 00:37:44 +00:00
Roman Divacky
7149aa0155 Mention -h in usage() and manpage. Rename term_{r,e} to term_{so,se}.
Suggested by:	ru
Approved by:	ed (mentor)
2009-05-02 07:02:31 +00:00
Ruslan Ermilov
0c4ffccadb Fixed multi-byte character support to actually work. 2009-04-30 13:53:00 +00:00