Commit Graph

1879 Commits

Author SHA1 Message Date
Xin LI
36e60cda45 Remove GNU cpio after fix of CVE-2010-0624.
Note that this is actually a no-op for most users, as this GNU
cpio was broken on -HEAD and 8-STABLE since last March until
the recent fix.

FreeBSD 8.0+ uses BSD cpio by default and the code is being
actively maintained.

Blessed by:	kientzle
With hat:	secteam
MFC after:	3 days
2010-03-26 17:02:32 +00:00
Poul-Henning Kamp
ac33b97078 Use gpart(8) to set the active boot partition. 2010-03-24 11:21:33 +00:00
Edwin Groothuis
531a1a4b2c Replace -b with -C and -B (as proposed by Alexander).
Add -3, -A and -B to the usage.
Update regression test for the new parameters.
2010-03-21 21:33:21 +00:00
Konstantin Belousov
fe03378831 Add missing headers. While there, arrange headers alphabetically.
MFC after:	3 days
2010-03-16 20:42:54 +00:00
Konstantin Belousov
888025e45a Add missing headers.
MFC after:	3 days
2010-03-16 20:41:45 +00:00
Jilles Tjoelker
c3bb858966 sh: Do not abort on a redirection error on a compound command.
Redirection errors on subshells already did not abort the shell because
the redirection is executed in the subshell.

Other shells seem to agree that these redirection errors should not abort
the shell.

Also ensure that the redirections will be cleaned up properly in cases like
  command eval '{ shift x; } 2>/dev/null'

Example:
  { echo bad; } </var/empty/x; echo good
2010-03-14 14:24:35 +00:00
Jilles Tjoelker
a4a58620d3 sh: Add test for redirection error on subshell (should not abort). 2010-03-14 13:51:12 +00:00
Konstantin Belousov
43648bc031 Remove dot at the end of errx() message.
Noted by:	bde
MFC after:	3 days
2010-03-14 13:29:09 +00:00
Konstantin Belousov
6e2e67160e Adjust style, fix typo, do not print errno because it is meaningless there.
This test fails for now.

MFC after:	3 days
2010-03-14 13:05:48 +00:00
Konstantin Belousov
31f957034a Make it compile on LP64 arches.
MFC after:	3 days
2010-03-14 13:04:09 +00:00
Edwin Groothuis
3d7b0d842d Create regression tests for ncal:
- A couple of tests to check if the layout of the generated calenders
  is correct.

- A couple of tests to see if impossible combinations for -3, -A,
  -m, -y etc properly abort.

- A couple of test to confirm that the order of -A, -B, -3 etc give
  the right number of months.
2010-03-14 10:24:03 +00:00
Jilles Tjoelker
3a64dbc20a sh: Do not abort on a redirection error if there is no command word.
Although simple commands without a command word (only assignments and/or
redirections) are much like special builtins, POSIX and most shells seem to
agree that redirection errors should not abort the shell in this case. Of
course, the assignments persist and assignment errors are fatal.

To get the old behaviour portably, use the ':' special builtin.
To get the new behaviour portably, given that there are no assignments, use
the 'true' regular builtin.
2010-03-13 22:53:17 +00:00
Jilles Tjoelker
45249f152b sh: Add test for assignment errors (e.g. trying to change a readonly var).
We currently ignore readonly status for assignments before regular builtins
and external programs (these assignments are not persistent anyway), so just
check that the readonly variable really is not changed.
The test depends on the command builtin changes for 'command :'.
2010-03-13 22:30:52 +00:00
Jilles Tjoelker
d5c6bd74d9 sh: Add tests for " and $ inside `. 2010-03-12 23:23:46 +00:00
Jilles Tjoelker
0de1173276 sh: Add some testcases for ${v=w}, ${v-w}, ${v+w}.
These expansions, which were already in the Bourne shell, work correctly for
the most part. The testcases are only about the parts that already work
correctly.
2010-03-07 18:43:29 +00:00
Jilles Tjoelker
0019284ae8 sh: Add various testcases for here documents.
They are mainly about expansions in here documents but because all the
testcases are in $() command substitution, we also test that $() command
substitution is recursively parsed (or very close to it).
2010-03-07 15:08:42 +00:00
Jilles Tjoelker
1749097497 sh: Make sure to popredir() even if a function caused an error. 2010-03-06 17:31:09 +00:00
Jilles Tjoelker
544754df6f sh: Make sure to popredir() even if a special builtin caused an error. 2010-03-06 17:09:22 +00:00
Jilles Tjoelker
c848bc18e8 sh: Improve the command builtin:
* avoid unnecessary fork
* allow executing builtins via command
* executing a special builtin via command removes its special properties

Obtained from:	NetBSD (parts)
2010-03-06 16:57:53 +00:00
Jaakko Heinonen
12794df244 - Use errx(3) instead of err(3) when checking if snprintf(3) succeeded.
snprintf(3) doesn't set errno in the tested cases.
- If the same argument reference (for example %1) was specified more than
  once, the command didn't necessarily fit to the final command buffer. Fix
  this using a dynamic sbuf buffer. Add a few regression tests for the case.

PR:		bin/95079
No objections:	freebsd-hackers
2010-03-05 15:23:01 +00:00
Joel Dahl
0371d265dc The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from:	NetBSD
2010-03-03 07:38:12 +00:00
Joel Dahl
2509081a31 The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from:	NetBSD
2010-03-02 22:25:50 +00:00
Joel Dahl
7f890ba505 The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from:	NetBSD
2010-03-02 17:05:19 +00:00
Ulrich Spörlein
47e1a877c5 Always assign WARNS using ?=
- fix some nearby style bugs
- include Makefile.inc where it makes sense and reduces duplication

Approved by:	ed (co-mentor)
2010-03-02 16:58:04 +00:00
Antoine Brodin
b974b08f1d Add files to remove when MK_PPP=no. 2010-02-28 14:43:55 +00:00
Antoine Brodin
72647fe8e4 Add files to remove when MK_PORTSNAP=no. 2010-02-28 14:41:28 +00:00
Antoine Brodin
78d8164c0f Add files to remove when MK_PKGTOOLS=no. 2010-02-28 14:39:39 +00:00
Antoine Brodin
c13190b297 Add files to remove when MK_PF=no. 2010-02-28 14:37:39 +00:00
Antoine Brodin
58f47440a2 Add files to remove when MK_NTP=no. 2010-02-28 14:32:29 +00:00
Antoine Brodin
fda29b2349 Update files to remove when MK_RCMDS=no. 2010-02-28 14:29:22 +00:00
Antoine Brodin
50d16bbe9f Add files to remove when MK_RCS=no. 2010-02-28 14:26:28 +00:00
Antoine Brodin
236443476e Add files to remove when MK_ROUTED=no. 2010-02-28 14:24:38 +00:00
Antoine Brodin
1fe4843a49 Add files to remove when MK_TELNET=no. 2010-02-28 14:23:38 +00:00
Antoine Brodin
94cd15a9ee Add files to remove when MK_NDIS=no. 2010-02-28 14:21:15 +00:00
Antoine Brodin
8c7d0ea263 Update files to remove when MK_NCP=no. 2010-02-28 14:13:33 +00:00
Antoine Brodin
c742deed4f Update files to remove when MK_LPR=no. 2010-02-28 14:12:05 +00:00
Antoine Brodin
9586e95257 Add files to remove when MK_WIRELESS=no. 2010-02-28 14:08:12 +00:00
Antoine Brodin
e94be45c0c Do not remove fmt.1 when MK_MAIL=no.
X-MFC-With:	r203584
2010-02-26 23:26:15 +00:00
Ruslan Ermilov
9fd69f37d2 Fixed missing or broken library dependencies. 2010-02-25 14:42:26 +00:00
Ruslan Ermilov
a6d8ff1d6d Moved mcgrab(1) into a separate directory -- our .mk infrastructure
doesn't currently have support for building multiple programs in a
single makefile.

While here, fixed manpages and makefiles (missing dependencies).
2010-02-25 14:36:50 +00:00
Rebecca Cran
8dd83f1e16 Update the sendfile regression test so that it outputs results in the
TAP format.
Add a checksum to verify that the data hasn't been corrupted between
being read from disk and being received.

Approved by:	rrs (mentor)
2010-02-24 23:00:16 +00:00
Attilio Rao
4ed925457a Add a regression test for the kthread(9) interface.
Submitted by:	Giovanni Trematerra
		<giovanni dot trematerra at gmail dot com>
2010-02-20 15:20:28 +00:00
Jilles Tjoelker
9f21d0a3a5 sh: arith: Add a test for a bug in the dash arith code,
which I plan to import at some point.
Our current code handles it fine and it should stay that way.
2010-02-17 22:25:22 +00:00
Jilles Tjoelker
70293312f8 sh: arith: Test an octal constant as well. 2010-02-17 22:22:20 +00:00
Ulrich Spörlein
54673381cd Add missing newline in last line of file.
Uncovered via:	fromcvs vs. svn
Approved by:	ed (co-mentor)
2010-02-16 09:10:21 +00:00
Pawel Jakub Dawidek
7b0706f670 - Implement -q option for pgrep(1).
- Add regression test to test -q option.
2010-02-12 18:52:24 +00:00
Ruslan Ermilov
2949bd100b Fixed error checking of pthread(3) functions.
PR:		143807
Submitted by:	pluknet (partly)
2010-02-12 16:33:03 +00:00
Xin LI
cebcc1ac1b Symbolic link to mailwrapper should only be removed if both MK_MAILWRAPPER
and MK_SENDMAIL is "no".

Reported by:	Rob Farmer <rfarmer at predatorlabs.net>
2010-02-10 00:01:35 +00:00
Xin LI
07ea9a7c2f As it turns out, fmt(1) is being used by the base system as well as the
ports tree extensively and it is probably a good idea to keep it
regardless of NO_MAIL setting.

Reported by:	Alexander Best
Reviewed by:	antoine
X-MFC-With:	r203584
2010-02-09 18:22:26 +00:00
Jilles Tjoelker
91f2621cd1 sh: Make sure the mail2.0 test can actually fail if $MAIL is not touched. 2010-02-08 18:57:18 +00:00