Commit Graph

10067 Commits

Author SHA1 Message Date
Gabor Kovesdan
cb47bf1448 - Fix installation when WITH_BSD_GREP is set to yes
Submitted by:	Aleksandr Rybalko <ray@ddteam.net>
2011-10-23 16:04:07 +00:00
Tim Kientzle
e588d6dad2 Typo from previous commit. Urgh. 2011-10-22 16:53:29 +00:00
Tim Kientzle
431595df6c Bring in the --gid --gname --uid and --uname implementation
from libarchive.googlecode.com.

MFC after:	3 days
2011-10-22 16:52:04 +00:00
Dimitry Andric
6122f3e60d Upgrade our copy of llvm/clang to r142614, from upstream's release_30
branch.  This brings us very close to the 3.0 release, which is expected
in a week or two.

MFC after:	1 week
2011-10-22 14:08:43 +00:00
Dag-Erling Smørgrav
c04743dac1 It turns out that truss also used kdump's mkioctls script, and expected
ioctlname() to return a pointer to the name rather than print it.  This did
not show up in testing because truss had its own prototype for ioctlname(),
so it would build fine and run fine as long as the program being traced did
not issue an ioctl.

Teach mkioctls to generate different versions of ioctlname() based on its
first command-line argument.

Pointed out by:	Garrett Cooper <yanegomi@gmail.com>
2011-10-21 11:08:25 +00:00
Dag-Erling Smørgrav
60e45df8ed Fix copy-pasto in CAPFAIL_INCREASE case.
Noticed by:	pjd
2011-10-18 09:39:41 +00:00
Dag-Erling Smørgrav
99afdfe58d Make ktrace(1) build cleanly at WARNS level 6 by completely rethinking the
way in which it handles the -C, -c, -g and -p options.

MFC after:	3 weeks
2011-10-18 08:26:12 +00:00
Dag-Erling Smørgrav
e141be6f79 Revisit the capability failure trace points. The initial implementation
only logged instances where an operation on a file descriptor required
capabilities which the file descriptor did not have.  By adding a type enum
to struct ktr_cap_fail, we can catch other types of capability failures as
well, such as disallowed system calls or attempts to wrap a file descriptor
with more capabilities than it had to begin with.
2011-10-18 07:28:58 +00:00
Ed Schouten
2a5e51fa7b Sort header file names.
Spotted by:	des
2011-10-17 13:54:55 +00:00
Ed Schouten
d13b008d74 Add missing #include.
Note to myself: don't write patches while watching a movie.
2011-10-16 19:23:43 +00:00
Ed Schouten
d2ea3bed52 Don't cast SIZE_T_MAX to off_t.
I focused so much on the 32-bits case where we have to cast SIZE_T_MAX
up in size, that I forgot about the 64-bits case, where off_t and size_t
are equal in size. Simply cast both numbers to uintmax_t, as we can
assume st_size is never negative.

Reported by:	cperciva
2011-10-16 19:15:25 +00:00
Eitan Adler
36daf0495a - change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by:	lstewart
Approved by:	sahil (mentor)
MFC after:	3 days
2011-10-16 14:30:28 +00:00
Marcel Moolenaar
ead616352b o Use C99 designated initializer to properly handle ELFOSABI_STANDALONE.
o  In elf_get_byte(), cast through uint8_t and not char to avoid sign
   extension.
2011-10-16 14:11:05 +00:00
Ed Schouten
49e3600b9c Fix ncplist to build with WARNS=6.
Add some const and static keywords to get it all to build. Also add
missing #includes.
2011-10-16 10:00:28 +00:00
Ed Schouten
7687733bfb Undo r226423.
It seems su does build without warnings, but it requires a small fix to
libbsm headers, which I have not committed to SVN yet.
2011-10-16 09:09:33 +00:00
Ed Schouten
c75216d258 Build rwho(1) with WARNS=6.
The only reason why it didn't build with WARNS=6, is because of some
simple to fix string formatting bugs.

MFC after:	3 months
2011-10-16 08:54:41 +00:00
Ed Schouten
03d26e9e38 Use integer to store the result of getch().
We need to use an integer to make the comparison against ERR work.

MFC after:	3 months
2011-10-16 08:36:10 +00:00
Ed Schouten
43f65c0c3c Remove WARNS line. This tool builds with WARNS=6 properly. 2011-10-16 08:14:12 +00:00
Ed Schouten
1e2070ab5b Fix build of m4 with WARNS=6.
Change the parser; rename `exp' to `exponent' not to collide with exp(3).
2011-10-16 08:09:17 +00:00
Ed Schouten
aa404b67bb Remove unneeded WARNS=3 lines.
It seems these two tools can be built properly with WARNS=6, even on
architectures that are stricter about alignment.
2011-10-16 08:04:43 +00:00
Ed Schouten
196769ee58 Build at(1) with NO_WFORMAT instead of WARNS=1. 2011-10-16 07:57:01 +00:00
Ed Schouten
73b018e38e Make some internal fixes to ruptime(1):
- Prevent possible unaligned access to struct whoent.
- Increase uptime column by one, to properly print hosts with an uptime
  greater than 1000 days.
- Reduce code complexity by storing struct whod inside struct hs.
- Set WARNS to 6.

MFC after:	3 months
2011-10-16 07:36:27 +00:00
Xin LI
d9b3a15b37 According to the NetBSD foundation [1]:
Third parties are encouraged to change the license on any files which have
a 4-clause license contributed to the NetBSD Foundation to a 2-clause
license. We would also encourage you to inform us about these files, so
that we can continue to track the many places in which NetBSD is used.

http://www.netbsd.org/about/redistribution.html#why2clause [1]

Requested by:	joel@
2011-10-16 07:35:26 +00:00
Xin LI
41cbfdc954 Partially revert r226274, the old code was right. 2011-10-16 07:05:43 +00:00
Mikolaj Golub
8d105928ec In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.

Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:

  echo 1 |script /tmp/script.out cat

PR:		bin/161526
Reported by:	Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by:	Stefan Bethke <stb@lassitu.de>
MFC after:	3 days
2011-10-15 19:08:22 +00:00
Ed Schouten
2bd338d6c4 Fix whitespace inconsistencies in systat(1).
According to md5(1), the resulting binary is the same.
2011-10-15 13:20:36 +00:00
Ed Schouten
50af444a74 Put parentheses in the right place.
Noted by:	jilles@
Broken by:	me. :-(
2011-10-14 10:43:55 +00:00
Ed Schouten
b7cf00e8d9 Make nl(1) build with WARNS=6.
Obtained from:	NetBSD
2011-10-14 07:28:39 +00:00
Ed Schouten
51b671f6de Build last(1) and leave(1) with WARNS=6.
These ports were only built with WARNS=1, because they use certain
format extensions. We can use NO_WFORMAT for that instead.
2011-10-14 07:26:20 +00:00
Ed Schouten
b173dd440b Build tr(1) with WARNS=6. 2011-10-14 07:25:20 +00:00
Ed Schouten
583458543c Build look(1) with WARNS=6. 2011-10-14 07:24:48 +00:00
Ed Schouten
c5d693c5d0 Build finger(1) with WARNS=6. 2011-10-14 07:24:23 +00:00
Raphael Kubo da Costa
91a7fc18f0 Add myself to committers-ports.dot and calendar.freebsd.
Approved by:	avilla (mentor)
2011-10-13 20:36:43 +00:00
Dag-Erling Smørgrav
51b6c61f98 Clean up mkioctls a bit, and fix cross-building by checking ${MACHINE}
instead of $(uname -m).

Pointed out by:	nyan@
2011-10-13 16:29:24 +00:00
Dag-Erling Smørgrav
81a3139422 Make kdump compile cleanly at WARNS level 6, with one exception: the
ipfilter headers contain a duplicated function declaration.  Turn off
-Werror to allow kdump to compile in spite of this.

It would be neat to be able to turn off -Werror on a file-by-file basis...

PR:		bin/161478
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2011-10-12 21:45:12 +00:00
Gleb Kurtsou
bfcdfc8b98 Add myself
Approved by:	mdf (mentor)
2011-10-12 20:18:13 +00:00
Dimitry Andric
ce4903ad98 Add symlink from clang to clang-cpp, so you can use CPP=clang-cpp in
Makefiles.  Also add a manpage symlink for it.

MFC after:	3 days
2011-10-12 17:47:15 +00:00
Dimitry Andric
0e19228d25 Add manpage symlink for clang++(1).
PR:		docs/149051
MFC after:	3 days
2011-10-12 17:25:49 +00:00
Xin LI
6a99195fb8 - Fix an off-by-one bug in addgroup().
- Fix the error message when setgid() failed.

PR:		bin/161509
Submitted by:	Jeremy Huddleston <jeremyhu apple com>
MFC after:	2 weeks
2011-10-12 01:19:12 +00:00
Gabor Kovesdan
bbf9339dbb - Fix counting of match limit (-m)
Reported by:	Nali Toja <nalitoja@gmail.com>
Approved by:	delphij (mentor)
2011-10-12 01:09:57 +00:00
Gabor Kovesdan
afbbd357de - Use getprogname() instead of __progname
- Allow disabling bzip2 support with WITHOUT_BZIP2
- Fix handling patterns that start with a dot
- Remove superfluous semicolon

Approved by:	delphij (mentor)
2011-10-11 22:27:23 +00:00
Dag-Erling Smørgrav
c601ad8eeb Add a new trace point, KTRFAC_CAPFAIL, which traces capability check
failures.  It is included in the default set for ktrace(1) and kdump(1).
2011-10-11 20:37:10 +00:00
Dag-Erling Smørgrav
661522f5f3 The previous commit did not fix the issue since it did not prevent sign
extension.  Cast to u_register_t first, then to uintmax_t.

Submitted by:	bde@
2011-10-11 15:04:58 +00:00
Dag-Erling Smørgrav
63a896e49b Cast to unsigned for %#jx.
Noticed by:	jh@
2011-10-11 07:46:45 +00:00
Xin LI
140c037a0c Incorporate recent changes from NetBSD. Most notable change is the addition
of support of decompressing xz files.

Obtained from:	NetBSD
2011-10-10 06:37:32 +00:00
Dag-Erling Smørgrav
95bb676aee Address some of bde@'s concerns with the new code. 2011-10-08 21:02:08 +00:00
Dag-Erling Smørgrav
515dfc239d Teach kdump(1) to decode capability bitmasks.
MFC after:	3 weeks
2011-10-08 13:01:38 +00:00
Dag-Erling Smørgrav
6eaa54110b Fix the dependency issue properly by a) moving kdump_subr.c to the front
of the SRCS list and b) listing kdump_subr.h in DPSRCS.
2011-10-08 12:59:41 +00:00
Dag-Erling Smørgrav
d09e66be12 Bring ioctlname() in line with all the other *name() functions, which
actually print the name (or the numeric value, if they can't figure out
the correct name) instead of just returning a pointer to it.  Also, since
ioctl numbers are not and probably never will be unique, drop support for
using a switch statement instead of an if/else chain.
2011-10-08 12:47:00 +00:00
Dag-Erling Smørgrav
09307b2547 I appreciate the logic behind using a (void) cast to indicate that the
return value is intentionally ignored, but frankly, all it does is
get in the way of the code.

Also fix a few other incorrect casts, such as (void *)malloc(foo) and
passing signed values to %x.
2011-10-08 12:28:06 +00:00