Commit Graph

12845 Commits

Author SHA1 Message Date
christos 2703f4af80 Use absolute paths for RCS commands (Martin Natano) 2015-07-24 18:56:44 +00:00
christos 8bfaa68572 From Martin Natano @bitrig: Use execve(2) instead of system to apply patches
that require rcs command execution instead system(3) to avoid malicious
filenames in patches causing bad things to happen. In the process, lose SCCS
support. It is not like we are shipping sccs commands for that to work.
2015-07-24 18:56:00 +00:00
dholland 7fee31e593 Document previously secret -d debug option. Bump date. 2015-07-16 08:42:53 +00:00
christos ea87266e4c From William Orr:
- add long options
- print usage on invalid command line args
2015-07-12 11:40:52 +00:00
nakayama dafd5f4472 zgrep(1): suppress the prefixing of filename on output when only
one file is specified to match the grep(1)'s output.
2015-07-06 12:05:40 +00:00
christos da9061f1c7 fix infinite loop 2015-07-04 22:45:08 +00:00
christos eeda512b55 If we fail 5 times in a row, fail correctly (Steffen Nurpmeso). 2015-07-04 15:09:49 +00:00
christos fc4b744883 Fix segmentation fault caused by freeing prematurely function parameter types
inside cast expressions.
2015-07-01 15:34:30 +00:00
dholland 3b1701b0a5 Repair accidental regression in -r1.49: for -a mode, don't allow
calendars to be other than regular files unless the -x option is in
effect.

(If not in -a mode, we're running purely as the user whose calendar it
is and if they want to DoS themselves with named pipes it's their own
lookout.)
2015-07-01 06:48:25 +00:00
dholland c1180ac6a1 Correct privilege handling problems in calendar -a (which runs as root
from /etc/daily); do not exec other programs while the real uid is
still 0.

Also, clear the supplementary groups list up front and call initgroups
when becoming another user, to avoid leaking any extra group
privileges that we might have.

And finally, don't silently ignore errors changing uid and gid; those
are serious if they happen.
2015-07-01 06:45:51 +00:00
christos 627745abcd remove <sys/cdefs.h> for portability reasons 2015-06-21 20:26:02 +00:00
wiz 4175efc234 filesystem -> file system. 2015-06-21 12:05:11 +00:00
mlelstv 9b4eccc9c7 Restore logic for setting the VERASE character.
- use terminfo _unless_ the terminal does overstrike.
- use terminfo data not only for an unset tty.
2015-06-21 08:23:22 +00:00
mrg 3a70beec89 separate the 3 functions midirecord uses from libaudio.a into its own
file and link it directly, instead of having an (implicit) dependancy
on usr.bin/audio/common being built before usr.bin/midirecord is linked.
2015-06-21 06:06:01 +00:00
mrg 0602c83b22 fix the log message typo. 2015-06-21 06:04:45 +00:00
hubertf 30d2284760 There was a pilot flying a small single engine charter plane, with
a couple of very important executives on board. He was coming into
the Berkeley airport through thick fog with less than 10 miles
visibility when his instruments went out.

He began circling around looking for a landmark. Finally, a small
opening in the fog appears and he sees a tall building with a guy
working alone on the fifth floor. He banks the plane around, rolls
down the window and shouts to the guy, "Hey where am I?"

The man replies, "You're in an airplane." The pilot rolls up the
window, executes a 275 degree turn and proceeds to perform a
perfect blind landing on the airport runway 5 miles away. Just as
the plane stops, so does the engine as the fuel has run out.

The passengers are amazed and one asks how he did it.

"Quite easy," replies the pilot, "I asked the guy in that building
a simple question. The answer he gave me was 100 percent correct
but absolutely useless, therefore, that must be NetBSD's
support office and from there the airport is just five miles due
East." (Credits:
http://www.techsupportforum.com/forums/f289/microsoft-joke-404432.html)

Seriously: give the reader of the manpage an idea on what this program
is for without forcing them to Google or read another manpage.
2015-06-20 16:42:32 +00:00
christos be0200b5b7 remove unused label 2015-06-19 17:20:02 +00:00
christos 43fc769556 remove useless assignment and explain why. 2015-06-19 17:17:24 +00:00
christos a038441bc0 restore use of whitespace needing shell. 2015-06-19 14:32:56 +00:00
christos 0002ddbc7d make needshell customizable, so that xinstall can use it. 2015-06-19 14:32:04 +00:00
christos 3f6f33cbde create needshell so we don't scan the string multiple times. 2015-06-19 14:25:34 +00:00
christos fc12b1912c use isspace() 2015-06-19 14:25:16 +00:00
mlelstv 75fd2a8412 Adjust metachar handling to previous behaviour:
- space and tab are no shell metachars, remove them from generic
  metachar function
- add space and tab as to-be-quoted characters for :Q modifier
- add = and : as characters that require command handling by the shell
2015-06-19 08:03:35 +00:00
christos 12ca937409 grr too many different compilation options. 2015-06-18 19:49:08 +00:00
christos e02fe630ea this is not buf.c 2015-06-18 15:51:57 +00:00
justin a9e309ea46 Fix non native build on metachar.c 2015-06-18 15:34:44 +00:00
christos 9beb5dadf3 Centralize the "is a meta char" test, instead of using two different arrays. 2015-06-17 17:43:23 +00:00
christos 5e58d82807 restore unlink file if strip fails (from Takeshi Nakayama) 2015-06-17 15:52:37 +00:00
christos b1e483495a centralize shell metachar handling. 2015-06-17 15:34:55 +00:00
christos e9677ce525 Use the bourne shell if the after command has shell metachars. 2015-06-17 15:34:08 +00:00
christos 62c8098c95 add missing quote, remove some braces. 2015-06-17 01:38:02 +00:00
christos 7d718eded8 one more stray \n 2015-06-17 00:03:42 +00:00
christos afe59ce9dc more stray \n 2015-06-17 00:01:59 +00:00
christos b72399dd23 fix error statement 2015-06-16 23:44:44 +00:00
christos 616ae4c0ec fix printf statement 2015-06-16 23:42:08 +00:00
christos ff53269704 fix some error handling. 2015-06-16 22:54:10 +00:00
christos b921b70209 remove stray newlines from errors/warnings 2015-06-16 21:12:19 +00:00
christos 561ef1fe67 - improve error printing
- deduplicate run functions and don't use the shell so that we handle
  filenames with spaces and metacharacters consistently.
2015-06-15 16:33:38 +00:00
martin 61f9154cab Add optional support for posix_spawn (instead of vfork) and enable it for
the in-tree build.
2015-06-15 07:05:09 +00:00
martin 25ed20a82e Do not set MLIBDIR if MKCOMPAT=no 2015-06-13 20:38:52 +00:00
gson cebb0ef7cc Don't call exit() from a signal handler, as it's not async-signal-safe;
use _exit() instead.
2015-06-11 18:12:00 +00:00
mrg 9c78f1be19 midirecord first appears in netbsd 7. 2015-06-08 06:33:35 +00:00
joerg fc207b9190 Format-string related warnings work fine now with both GCC 4.8 and
Clang.
2015-06-06 13:48:37 +00:00
joerg d88f290a56 Drop assignment from uninitialized and otherwise unused variable. 2015-06-06 13:08:31 +00:00
wiz b96dc7bfa6 Drop trailing whitespace. 2015-06-05 07:33:40 +00:00
sjg fab1dc5098 Document .OBJDIR target. 2015-06-05 05:37:42 +00:00
enami aeb1240e20 Fix expand() to process successive escape sequences correctly. 2015-06-03 23:15:22 +00:00
wiz 9424727910 Add missing .El and other minor fixes. 2015-06-03 14:38:38 +00:00
christos c3b6f86ce5 Add a gettext implementation from William Orr. 2015-06-03 14:32:16 +00:00
manu 41797faa82 Fix warning about uninitialized variable
This warning gets fatal when including make(1) as a crunchgen(1) binary.
2015-05-25 09:01:06 +00:00