Commit Graph

10796 Commits

Author SHA1 Message Date
Peter Wemm
9b67bbba3c Give up on using iconv to convert to UTF-8 at build time. I don't see any
practical way to make iconv(1) as a build tool.  Instead pre-convert.
This gives us UTF-8 nvi catalogs even on systems without iconv enabled.
2013-08-12 09:56:52 +00:00
Peter Wemm
6c43122a42 Don't build the UTF-8 version of the catalogs without iconv enabled.
Pointy-hat to:	peter (don't do things at 4am!)
2013-08-11 21:46:06 +00:00
Peter Wemm
e656ab0f3a Don't install a ru_SU.KOI8-R symlink, 'make delete-old' will just remove
it again.
2013-08-11 20:46:05 +00:00
Peter Wemm
f0957ccae4 Update nvi-1.79 to 2.1.1-4334a8297f
This is the gsoc-2011 project to clean up and backport multibyte support
from other nvi forks in a form we can use.

USE_WIDECHAR is on unless building for the rescue crunchgen. This should
allow editing in the native locale encoding.

USE_ICONV depends on make.conf having 'WITH_ICONV=YES' for now.  This
adds the ability to do things like edit a KOI8-R file while having $LANG
set to (say) en_US.UTF-8.  iconv is used to transcode the characters for
display.

Other points:
* It uses gencat and catopen/etc instead of homegrown msg catalog stuff.
* A lot of stuff has been trimmed out, eg: the perl and tcl bindings which
  we could never use in base anyway.
* It uses ncursesw when in widechar mode.  This could be interesting.

GSoC info: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/zy/1
Repo at: https://github.com/lichray/nvi2

Obtained from:  Zhihao Yuan <lichray@gmail.com>
2013-08-11 20:03:12 +00:00
Edward Tomasz Napierala
f8a2fe5ead In su(1), fix option ordering and clarify that the login class specified
must be defined in login.conf.

MFC after:	1 month
2013-08-11 11:06:49 +00:00
Simon J. Gerraty
84efbe96f1 ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.
2013-08-10 21:31:35 +00:00
Mark Johnston
a94a4b74bd Pass variables prefixed with both LD_ and LD_32_ to the run-time linker.
This prevents unintentional execution of programs when running ldd(1) on
32-bit Linux binaries.

PR:		175339, 127276
Suggested by:	kib, rstone
Reviewed by:	kib
MFC after:	2 weeks
2013-08-07 00:28:17 +00:00
Peter Wemm
6d2b20fd17 Update serf 1.2.1 -> 1.3.0 for svn 2013-08-02 19:21:46 +00:00
Jilles Tjoelker
9d6d5a7131 find: Allow -delete to delete files given as arguments.
Formerly, a command like find dir1/dir2 -delete would delete everything
under dir1/dir2 but not dir1/dir2 itself.

When -L is not specified and "." can be opened, the fts(3) code underlying
find(1) is careful to avoid following symlinks or being dropped in different
locations by moving the directory fts is currently traversing. If a
problematic concurrent modification is detected, fts will not enter the
directory or abort. Files found in the search are returned via the current
working directory and a pathname not containing a slash.

For paranoia, find(1) verifies this when -delete is used. However, it is too
paranoid about the root of the traversal. It is already assumed that the
initial pathname does not refer to directories or symlinks that might be
replaced by untrusted users; otherwise, the whole traversal would be unsafe.
Therefore, it is not necessary to do the check for fts_level ==
FTS_ROOTLEVEL.

Deleting the pathnames given as arguments can be prevented without error
messages using -mindepth 1 or by changing directory and passing "." as
argument to find. This works in the old as well as the new version of find.

Tested by:	Kurt Lidl
Reviewed by:	jhb
2013-08-02 14:14:23 +00:00
Simon J. Gerraty
51ee2c1cc6 Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.
2013-08-02 06:25:28 +00:00
Mark Johnston
9e1db66eb4 Properly print arguments to vfork(2) and rfork(2).
PR:		180976
Submitted by:	Yuri <yuri@tsoft.com> (original patch)
MFC after:	1 week
2013-08-01 02:57:04 +00:00
David E. O'Brien
c89bc70064 MFC'ing to 9.2. 2013-07-30 19:21:36 +00:00
Andrey A. Chernov
f1135552c6 grep -i does not work for simple patterns and single byte locales, like
LANG=ru_RU.KOI8-R grep -i <some single KOI8-R letter>
Fix it.

MFC after:      3 days
2013-07-30 18:16:43 +00:00
Dag-Erling Smørgrav
1453595f49 Include an Accept header in requests.
PR:		kern/180917
MFC after:	1 week
2013-07-30 13:07:55 +00:00
Dag-Erling Smørgrav
cb67f01df2 Add Michael Gmelin's name to the copyright statement. 2013-07-30 13:05:51 +00:00
Andriy Gapon
a29cc9a34b Revert r253748,253749
This WIP should not have been committed yet.

Pointyhat to:	avg
2013-07-28 18:44:17 +00:00
Andriy Gapon
c722ec3a51 remove needless inclusion of machine/cpu.h in userland
MFC after:	21 days
2013-07-28 18:35:43 +00:00
Joel Dahl
b5a4266b48 Remove EOL whitespace. 2013-07-28 06:16:12 +00:00
Peter Wemm
4705e3668d Update subversion-1.8.0 -> 1.8.1. Update supporting
components: apr-1.4.6 -> 1.4.8 and apr-util-1.4.1 -> 1.5.2.

This is a post point-zero bug-fix / fix-sharp-edges release, including
some workarounds for UTF-8 for people who haven't yet turned on WITH_ICONV.
2013-07-28 06:02:40 +00:00
Pedro F. Giffuni
21244d5227 Make the BSD-licensed patch the default.
The BSD-licensed patch(1) command has matured and it's behaviour
can be considered equivalent to the older version of GNU patch
in the tree.

The switch has been extensively tested [1] and only two ports
presented regressions, which have since been fixed.

For convenience a new WITH_GNU_PATCH option is available,
but it will likely be removed in the near future.

PR:		176313
Approved by:	portmgr
2013-07-26 21:25:18 +00:00
Dag-Erling Smørgrav
dcd47379ff Implement certificate verification, and many other SSL-related
imrovements; complete details in the PR.

PR:		kern/175514
Submitted by:	Michael Gmelin <freebsd@grem.de>
MFC after:	1 week
2013-07-26 15:53:43 +00:00
Pedro F. Giffuni
b9740ba1a8 patch: style fix
Submitted by:	gogolok
2013-07-24 15:46:49 +00:00
Andrey V. Elsukov
6794f46021 Remove the large part of struct ipsecstat. Only few fields of this
structure is used, but they already have equal fields in the struct
newipsecstat, that was introduced with FAST_IPSEC and then was merged
together with old ipsecstat structure.

This fixes kernel stack overflow on some architectures after migration
ipsecstat to PCPU counters.

Reported by:	Taku YAMAMOTO, Maciej Milewski
2013-07-23 14:14:24 +00:00
Dag-Erling Smørgrav
011a8335f8 mdoc nit 2013-07-21 07:24:25 +00:00
Pawel Jakub Dawidek
de89bd6bc2 Close uniq(1) in the capability mode sandbox and limit descriptors using
capability rights.
2013-07-18 22:11:27 +00:00
Pawel Jakub Dawidek
e14da991ec - Make localtime(3) to work in sandbox.
- Move strerror(3) initialization to its own function.
2013-07-18 21:56:10 +00:00
Gleb Smirnoff
c780f37850 Sweep unused nlist entries.
Sponsored by:	Nginx, Inc.
2013-07-16 12:22:36 +00:00
Gleb Smirnoff
2898a92a21 Nuke "systat -mbuf". It was broken since FreeBSD 5, and since there
haven't been any complaints, no one used it.
2013-07-15 12:15:14 +00:00
Andrey V. Elsukov
05d1f5bce0 Introduce new structure sfstat for collecting sendfile's statistics
and remove corresponding fields from struct mbstat. Use PCPU counters
and SFSTAT_INC() macro for update these statistics.

Discussed with:	glebius
2013-07-15 06:16:57 +00:00
Hiroki Sato
3fddef95af Add -F fibnum option to specify an FIB number for -r flag. 2013-07-12 17:11:30 +00:00
David Chisnall
3334a61716 Report error for out-of-range numerical inputs. Requested by brooks. 2013-07-10 10:57:09 +00:00
Andrey V. Elsukov
db8c087944 Migrate structs ahstat, espstat, ipcompstat, ipipstat, pfkeystat,
ipsec4stat, ipsec6stat to PCPU counters.
2013-07-09 10:08:13 +00:00
Andrey V. Elsukov
69edf037d7 Migrate struct carpstats to PCPU counters. 2013-07-09 10:02:51 +00:00
Andrey V. Elsukov
a786f67981 Migrate structs ip6stat, icmp6stat and rip6stat to PCPU counters. 2013-07-09 09:54:54 +00:00
Andrey V. Elsukov
5b7cb97c2b Migrate structs arpstat, icmpstat, mrtstat, pimstat and udpstat to PCPU
counters.
2013-07-09 09:50:15 +00:00
Andrey V. Elsukov
5da0521fce Use new macros to implement ipstat and tcpstat using PCPU counters.
Change interface of kread_counters() similar ot kread() in the netstat(1).
2013-07-09 09:43:03 +00:00
Andrey V. Elsukov
c80211e3cf Prepare network statistics structures for migration to PCPU counters.
Use uint64_t as type for all fields of structures.

Changed structures: ahstat, arpstat, espstat, icmp6_ifstat, icmp6stat,
in6_ifstat, ip6stat, ipcompstat, ipipstat, ipsecstat, mrt6stat, mrtstat,
pfkeystat, pim6stat, pimstat, rip6stat, udpstat.

Discussed with:	arch@
2013-07-09 09:32:06 +00:00
Kevin Lo
ed74b69c2d Remove unnecessary cast to pid_t. 2013-07-04 03:24:58 +00:00
David E. O'Brien
6d85e39be1 Merge r252513 from src/gnu/usr.bin/patch into src/usr.bin/patch:
Properly handle input lines containing NUL characters such that pgets()
accurately fills the read buffer.

Callers of pgets() still mis-process the buffer contents if the read line
contains NUL characters, but this at least makes pgets() accurate.
2013-07-03 22:46:30 +00:00
David E. O'Brien
0571fd57a1 Merge r252512 from src/gnu/usr.bin/patch into src/usr.bin/patch:
Make it so that 'patch < FUBAR' and 'patch -i FUBAR' operate the same.

The former makes a copy of stdin, but was not accurately putting the
content of stdin into a temp file.  This lead to the undercounting
the number of lines in hunks containing NUL characters when reading
from stdin.  Thus resulting in "unexpected end of file in patch" errors.
2013-07-03 22:44:26 +00:00
Pawel Jakub Dawidek
d7499324a8 Few more style nits.
MFC after:	1 month
2013-07-03 20:44:47 +00:00
Pawel Jakub Dawidek
7c33a30a7a Sandbox rwho(1) using capability mode and Capsicum capabilities.
rwho(1) gets only read-only access to /var/rwho/ directory.

Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by:	Google Summer of Code 2013
Reviewed by:	pjd
MFC after:	1 month
2013-07-03 20:42:10 +00:00
Pawel Jakub Dawidek
c05bfdd395 Style cleanups.
Submitted by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by:	Google Summer of Code 2013
Reviewed by:	pjd
MFC after:	1 month
2013-07-03 20:28:33 +00:00
Peter Wemm
7900abff04 As a followup to r252547, propate const down the call stack. 2013-07-03 18:27:45 +00:00
Peter Wemm
33e7ec3e83 Attempt to deal with a compile failure that shows up with gcc, which
has -Werror on.  Without this, yylex() is inconsistently or redundantly
defined.
2013-07-03 18:25:27 +00:00
Peter Wemm
0d5daade6d If you've compiled your base system with WITH_ICONV, then use it for svn
alongside the other consumers (bsdtar, csh etc).

The svnlite build gets upset when it hits non-ascii characters in
inconvenient places.
2013-07-01 07:07:35 +00:00
Peter Wemm
e513819332 Update to current configuration. 2013-07-01 07:00:12 +00:00
Mateusz Guzik
214e08782b killall: add -q flag to suppress error message when no processes are matched
Man-page text provided by wblock.

PR:		bin/30542
Submitted by:	Tony Finch <dot@dotat.at> (original version)
MFC after:	1 week
2013-06-30 20:27:31 +00:00
Mateusz Guzik
8f99c21f94 truss: recognize O_DIRECTORY, O_EXEC, O_TTY_INIT and O_CLOEXEC
MFC after:	3 days
2013-06-30 13:14:46 +00:00
Hiren Panchasara
0536a9b831 Adding myself to the calendar!
Approved by:	sbruno (mentor)
2013-06-30 01:20:59 +00:00