Commit Graph

13143 Commits

Author SHA1 Message Date
mrg
5f8222cdb9 query the window size and use it instead of assuming 24 lines.
now the header isn't re-printed a lot of times in tall windows.
2015-09-20 00:30:04 +00:00
joerg
f66e764c57 Workaround const issues of SSL_set_tlsext_host_name. 2015-09-16 15:32:53 +00:00
wiz
c39756ad10 servername cannot be NULL here.
Noted by joerg@.
2015-09-12 20:23:27 +00:00
wiz
7a5da4c401 Bump version for SNI support. 2015-09-12 20:18:52 +00:00
wiz
f9b7d2341e Add Server Name Indication (SNI) support for https.
Needed for e.g. some github URLs.
2015-09-12 19:38:42 +00:00
joerg
2bb600f982 Negating an integer and comparing it to 1 is a fancy way of checking for
0, which in this case would be DEVI_ORPHAN. That clearly can't be the
intention here, so switch to using != as operation without negation
instead.
2015-09-12 19:11:13 +00:00
uebayasi
ba0b12db31 Libraries should be built in sub-make. libkern is polluting .PATH too much. 2015-09-11 02:26:22 +00:00
sjg
0173eb921e Output Entering/Leaving messages for objdir when != srcdir and -w flag
This helps ensure Emacs can find source of error.

Reviewed by: christos
2015-09-10 17:15:11 +00:00
jnemeth
7c8eb9ef85 Pretty difficult for a TV show (Star Trek) to have a first airing
on two different dates.  Dump the erroneous one.
2015-09-08 11:07:37 +00:00
uebayasi
6639db6cc2 About ${CTFCONVERT}. 2015-09-08 05:48:07 +00:00
uebayasi
fe281df765 ${MD_OBJS} and friends. 2015-09-08 02:23:34 +00:00
uebayasi
0e43d38dc2 ${LD} input files and library (*.a) support. 2015-09-08 00:53:39 +00:00
sevan
9f88c39420 Switch from a mixture of tabs & 3 spaces to a single style, 3 spaces 2015-09-07 12:29:19 +00:00
sevan
b62382f11c Add pkgsrc/Bitrig 2015-09-07 12:20:32 +00:00
uebayasi
82a183dddd Fix previous. 2015-09-04 21:32:54 +00:00
uebayasi
cea9d6a0de Fix segmentation fault. 2015-09-04 15:50:48 +00:00
uebayasi
9b48d49489 Sort files in ${ALLFILES} in the order of parsing of `files.*'.
config(1) reads the first `files.${MACHINE}' when it encounters `machine'.
Then it includes common `files.${MACHINE_SUBARCH}', `files.${MACHINE_ARCH}',
and MI `sys/conf/files' at last.  This change makes the first "file" in
`files.${MACHINE}' appear first in ${ALLFILES}.
2015-09-04 10:16:35 +00:00
uebayasi
ce4642ec41 Make config(1) output only ${ALLFILES}, selected input files, and pass it to
Makefile.kern.inc, where files are filtered by suffix.
2015-09-04 06:10:47 +00:00
uebayasi
ca8d7a3596 *.o files don't need special handling at all now. Makefile.kern.inc knows
*.o input files don't need to get compiled, but need to get linked.
2015-09-04 06:01:40 +00:00
uebayasi
5b92bb3c7a Output ${ALLFILES}, the list of selected *.[csSo] files, sorted in the exact
order config(1) parses "file ..." commands in config(5) files.  Define
${CFILES}, ${SFILES}, and ${OFILES} as subset of ${ALLFILES} selected by
suffix.
2015-09-04 05:52:15 +00:00
uebayasi
bc2bf167eb Now Makefile.kern.inc handles swap<kernel>.c compiling/linking nicely,
config(1) can become less hackish.
2015-09-04 05:13:32 +00:00
uebayasi
dc9cfb5d59 Share more code by making *.o handling less special. 2015-09-04 01:24:01 +00:00
uebayasi
bc619545b7 Add generated *.c files (devsw.c and ioconf.c) to ${CFILES} by config(1)
internally.  ${MI_CFILES} in Makefile.kern.inc is no longer needed.
2015-09-03 14:23:52 +00:00
uebayasi
b5b4952dae After thought, revert "Generate *.c files under conf/". Generate *.c files
under top build directory.  *.c files are never placed just under $S/.  Keep
this exclusiveness.
2015-09-03 13:53:36 +00:00
uebayasi
9d10d0209d Pretty-print `Makefile' output. 2015-09-03 13:32:07 +00:00
uebayasi
eaa72931c4 Move `all' target definition to Makefile.kern.inc. 2015-09-03 09:28:00 +00:00
uebayasi
d891b756ba Define kernel dependency in Makefile.kern.inc. 2015-09-03 06:09:46 +00:00
uebayasi
dfa246e2cf Fix build. 2015-09-03 06:08:38 +00:00
mrg
aa0a9ba7c2 remove these items:
o Disallow unknown options.
 o Kill makeoptions.

because they're overly strict and i use these both regularly
to do stuff that isn't in the base src, and i'm quite sure
i am not the only one.
2015-09-03 05:45:16 +00:00
uebayasi
77d324a2b9 In `-S' mode, create symlinks from outside of $S to build directory, for
files that are placed outside of $S, so that `Makefile.kern.inc' can see all
files under either $S or build directory.
2015-09-03 02:45:24 +00:00
uebayasi
a453d60989 Fix build. 2015-09-02 16:29:44 +00:00
uebayasi
7a8426662a Define ${OBJS} in `Makefile.kern.inc'. Relative paths are not truncated
(a/b/c/x.c -> x.c) in `-S' mode.  Don't provide some explicit rules for `-S'
mode for safety.
2015-09-02 14:17:03 +00:00
uebayasi
558aab1be0 Output relative path for ${CFILES} and ${SFILES} in generated `Makefile'.
`Makefile.kern.inc' knows how to deal with $S prefix, so don't bother it in
config(1).
2015-09-02 13:42:14 +00:00
uebayasi
7db0c115b3 Simplify generated `Makefile' by calculating ${OBJS} from merging ${CFILES},
${SFILES}, and ${OFILES} except swap<kernel>.o excluded.
2015-09-02 13:06:06 +00:00
uebayasi
dccd2cf552 In `-S' mode, generate *.c files under conf/ subdirectory. Register generated
.c files to the `files' list internally.
2015-09-02 05:09:25 +00:00
uebayasi
e53d4b70ba Fix build. 2015-09-01 20:18:41 +00:00
uebayasi
b06817457f Experimental ``suffix rules + subdirectories'' build support (-S). 2015-09-01 16:01:23 +00:00
uebayasi
64903d9c8f Prepare to build subdirectories. Not enabled yet. 2015-09-01 14:32:20 +00:00
uebayasi
57eaa88e97 Bump version for "buildprefix". 2015-09-01 13:45:52 +00:00
uebayasi
2cb009cdd9 Introduce a new syntax, "buildprefix", to specify prefix of files under kernel
build subdirectory.  This is not used now that everything is built at the
top of kernel build directory.  It will become mandatory for source/object
files put out of kernel source tree to specify corresponding build subdirectory.
Only ``no dots''  relative path is accepted as "buildprefix".
2015-09-01 13:42:48 +00:00
uebayasi
974426dd69 Keep track of directory of files internally. 2015-09-01 12:46:20 +00:00
uebayasi
3f0546850b Clean up struct files. 2015-09-01 12:32:26 +00:00
uebayasi
3374c75eeb Use per-suffix lists where appropriate. 2015-09-01 12:10:56 +00:00
uebayasi
f5d74fcda3 Abstract struct filetype is no longer needed. 2015-09-01 11:35:46 +00:00
uebayasi
0b130540fb Merge struct objects into struct files. Keep per-suffix file lists. 2015-09-01 11:22:59 +00:00
uebayasi
a0ed6f857a Start merging struct files and struct objects. 2015-09-01 10:37:48 +00:00
pgoyette
06cd199b91 Allow redefinition of options (with only a warning message). Removal
of non-included options was already only a warning.

This also affects redefinition and removal of file-system and makeoption
entries.

Reviewed and OKd by uebayasi@
2015-09-01 01:50:14 +00:00
uebayasi
5f38d8b6fe Properly handle absolute prefix. 2015-09-01 01:17:56 +00:00
jnemeth
cd3c3a4632 If we're going to note the USSR shooting down civilian airliners,
we should be fair and pick on the USA as well.
2015-09-01 00:56:17 +00:00
uebayasi
4c482b808f Refactor emit file functions. No functional changes. 2015-09-01 00:38:30 +00:00
pgoyette
b899b8fdca Need to read closer - there was another occurrence of the same tyepo 2015-08-31 12:00:12 +00:00
pgoyette
2ff0a553cb Tyepo 2015-08-31 11:52:37 +00:00
uebayasi
b877b4042a Restore the old behavior of "maxusers" to allow the value to be overriden.
Problem reported by John D. Baker.
2015-08-31 02:58:25 +00:00
uebayasi
cf356c3efd Revert "Accept only relative paths ...". This will be redone in much better,
stricter way.
2015-08-30 21:58:19 +00:00
wiz
7cb8e9f6ca Fix a macro usage. Add more markup. 2015-08-30 06:57:51 +00:00
uebayasi
623bd6b2aa Define compile rules in sys/conf/Makefile.kern.inc except those overriden by
"file ... compile-with ...".  As rules are still explicit, be careful to not
override by checking .if !target(xxx.o).
2015-08-30 05:12:00 +00:00
uebayasi
0fac7c8310 Define `makeoptions' values as parameters with "makeoptions_" prefix too.
C sources are encouraged to include relevant opt_*.h files rather than relying
on -DXXX passed via makefiles.
2015-08-30 01:33:20 +00:00
uebayasi
8c9276859d No need to define swap<kernel>.o build rule. 2015-08-29 17:42:05 +00:00
uebayasi
b6c3503b87 Define ``normal'' .c/.S rules as .for loops. Still explicit and ugly, but
these will be eventually replaced with suffix rules.  Tested x68k where .c/.S
rules are overriden with "compile-with".
2015-08-29 17:35:23 +00:00
uebayasi
75298111a7 Convert MAXUSERS, take 2.
Define MAXUSERS in opt_param.h and include it from sys/param.h, for more
accurate dependency.  Don't define -DMAXUSERS and add it to ${CPPFLAGS}.
config(5)'s "maxusers" syntax doesn't change.

(The version just before revert was OK, but I had something bad in my obj
dirs.)
2015-08-29 14:07:45 +00:00
uebayasi
95712061f0 Revert MAXUSERS. CVS is hard. 2015-08-29 13:34:21 +00:00
uebayasi
9d7c5e580c Revert MAXUSERS changes. Need fresh air. 2015-08-29 07:33:18 +00:00
uebayasi
8b68b0de02 Fix previous. 2015-08-29 07:24:49 +00:00
uebayasi
4401376950 Define MAXUXERS in opt_param.h. Bump config(1) version. 2015-08-29 07:08:38 +00:00
uebayasi
ca847f032e Revert "Retire optional rule' argument of file' command". It is still used
in m68k ports.
2015-08-29 02:54:07 +00:00
joerg
0555fac4ac ~0 and -1 are the same for two-complement machines. ISO C says left
shifts of negative values are UB, so do the shift for the unsigned
equivalent and cast to int afterwards.
2015-08-28 09:42:07 +00:00
uebayasi
b5595827d0 Simplify. 2015-08-28 09:16:29 +00:00
uebayasi
54e231918a Retire optional rule' argument of file' command.
This has existed since Rev. 1.1 of Torek's config(8) [1], but probably has
never been used by anyone.

(I can not imagine how a `file' like look like if `rule' is specified.)

[1] http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.sbin/config.new/Attic/files.c?rev=1.1
2015-08-28 09:04:02 +00:00
uebayasi
36644ae2ff Error out if a given path is absolute. 2015-08-28 08:56:39 +00:00
uebayasi
47065f5afc Accept only relative paths (from $S) for file' and object'. Simplify code.
config(1) does not need to be super-smart about path handling, because it is
usually used with make(1), that is much smarter.

Pre-compiled object files, specified using `object', are regarded as read-only
input, thus they should be put under $S (or $S/..), as part of a source tree.
2015-08-28 08:31:28 +00:00
uebayasi
50408f97eb Global paths looked up at output stage (mk*()) are relative to `srcdir'.
Ignore "prefix" by not calling sourcepath().
2015-08-28 03:55:15 +00:00
uebayasi
0b9ddf3cc0 Paths given to "file" and "object" are relative from "prefix" if defined. 2015-08-28 02:59:09 +00:00
uebayasi
a72d45f1a5 + suffix rules 2015-08-28 01:01:57 +00:00
uebayasi
5e9af25b8a + copy symtab 2015-08-27 10:22:12 +00:00
uebayasi
1e1f20e153 One more about linker script, another about genassym. 2015-08-26 06:38:57 +00:00
uebayasi
14880f9a49 I don't like -Ttext . 2015-08-25 13:13:54 +00:00
uebayasi
39d2263741 + kill makeoptions 2015-08-25 09:01:28 +00:00
mrg
ef363e2dc9 if you change display types, the "Showing %s, refresh every %d seconds."
message is retained, and you can't get rid of it.  since it's dispalyed
in inverse, it feels like there's always an error happening (which is
really what the code has -- the above string is displayed via the error()
function.)  for several types of key press that largely are just "redraw"
operation (space, ^L, etc.), clear the error string as well.
2015-08-23 18:33:15 +00:00
uebayasi
7722a65218 TODOs about kernel options. 2015-08-23 01:30:21 +00:00
uebayasi
9c743328e7 Linker script TODO items. 2015-08-22 14:47:05 +00:00
jnemeth
b4ea321c71 - sort
- add a bunch of missing release
2015-08-21 02:32:24 +00:00
christos
92a97b467e move driver attach declarations to ioconf.h 2015-08-20 09:44:24 +00:00
pgoyette
b0e637a9da Insert comment regarding PR/48571 so it doesn't get lost.
config(1) ioconf is insufficient for pseudo-devices

config_{init,fini}_component
2015-08-19 03:39:45 +00:00
uebayasi
3dbb19470d + pseudo(dev) attach 2015-08-19 03:23:34 +00:00
shm
675ae4bd49 Remove unnecessary fclose(3) call 2015-08-09 09:49:25 +00:00
shm
7a0fcb9b1d Do not use pamh after pam_end. It's cosmetic change since pam_strerror
ignores that parameter.
2015-08-09 09:39:21 +00:00
shm
13fc423c66 Add missed munmap(2) in extract_config 2015-08-08 15:52:41 +00:00
mrg
366296f5a8 add a description about what was being attempted to failed writes messages. 2015-08-05 07:10:03 +00:00
mrg
a0e3e3912d rename struct write_info as struct track_info, and the variable name 'wi'
as 'ti', as this info is useful for reading as well.
2015-08-05 06:54:39 +00:00
wiz
282efd00b8 Fix two typos. 2015-08-02 12:19:12 +00:00
christos
429d474275 remove reference to SCCS which is not supported anymore.
XXX: pullup-7
2015-08-02 03:19:02 +00:00
christos
e139f8ac36 from bitrieg:
Substitution commands might contain a newline in the replacement pattern
(escaped with a backslash before it), causing patch's understanding of
the state the ed child process is in to diverge from reality. This can
lead to patch unwillingly feeding '!' (execute shell command) lines to
ed. Finding out how to do this is left as an exercise to the reader.

XXX: pullup-7
2015-07-30 21:47:51 +00:00
christos
0bc60106c2 Make the return type of "? type1 : void *" or "? void * : type1" to be type1
instead of void *.
2015-07-29 18:23:32 +00:00
christos
38c355353a Be more specific about the type errors 2015-07-29 18:22:06 +00:00
christos
8d365aaee5 revert previous, will fix differently. 2015-07-28 19:46:42 +00:00
christos
9495115b2a fix build (stdbool lossage) 2015-07-28 19:32:07 +00:00
christos
afb2c8bbbf handle c99 nested struct initialization { .data.foo[0] = 1 } 2015-07-28 17:56:56 +00:00
christos
4de23ec610 fix member list deallocation; remove #if 0'ed code. 2015-07-28 17:55:13 +00:00
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
manu
cbae0e6269 Make sure netstat builds with -DSMALL
src/usr.bin/netstat relies on code from src/sbin/route. WHen building
with -DSMALL, some functions such as mpls_ntoa() or p_rtrmx() are not
built in src/sbin/route. We therefore have to make sure they are not
used in src/usr.bin/netstat.
2015-05-25 03:56:20 +00:00
christos
2dad2d2d11 Add -N (VIS_NOLOCALE), sort. 2015-05-24 19:42:39 +00:00
matt
2a4267c6e4 #include <sys/exec_elf.h> for ksyms 2015-05-20 07:16:15 +00:00
matt
cac6d59cc3 Use :Q instead of " to quote make vars DBG and LDSTATIC 2015-05-16 02:33:12 +00:00
ozaki-r
6011d36bd6 Fix rump.{netstat,route} shows host's interface names in link local addresses
Interface names of IPv6 link local addresses are resolved
by getnameinfo(3). So we need to rump-ify it as well as
if_indextoname and getifaddrs.
2015-05-15 06:58:59 +00:00
joerg
1d5828794c Mark error as dead. 2015-05-13 20:13:21 +00:00
christos
cd5bb2fe49 handle compound literals with a trailing comma 2015-05-11 17:20:06 +00:00
dholland
5a52d2d51f Remove pointless casts. 2015-05-09 23:29:51 +00:00
dholland
90a10bbb8a Make error() printflike instead of using sprintf before calling it. 2015-05-09 23:28:43 +00:00
dholland
98fbb52a77 Use proper (enough) parentheses in macro expansion. 2015-05-09 23:19:34 +00:00
dholland
86f52a859f Use errx when malloc fails, and also don't cast the return value of
malloc/realloc.
2015-05-09 23:16:51 +00:00
dholland
d4e3de0b16 one crash -> errx Christos missed 2015-05-09 23:14:22 +00:00
dholland
ceecfabaa7 Polish the error messages.
Don't use warn/err to print error messages about the input, as
prepending the program name to those both isn't helpful and confuses
programs that try to parse compile logs.
2015-05-09 23:12:57 +00:00
dholland
d1ac143f58 #if 0 code should still compile :-) 2015-05-09 22:58:22 +00:00
christos
8cde9e3d9b modernize:
- make crash() called atexit
	- use err/errx
	- remove __P
2015-05-09 21:44:47 +00:00
dholland
a9ad5ddc08 Also check the other emitted getrlimit call for failure. 2015-05-09 18:48:14 +00:00
christos
bb21fbff87 CID 1225082: Check getrlimit() return 2015-05-09 15:12:12 +00:00
sjg
ca0319bf7c When evaluating condtionals from .if we want to require
that the lhs is a variable reference, a number or a quoted string.
This helps avoid subtle bugs caused by typos.

When conditionals are being evaluated during variable expansion
we cannot be as strict becuase lhs will already have been expanded.

We therefor pass a boolean to Cond_EvalExpression to tell it how
lhs should be treated.

Add unit-tests/cond2.mk to test the above

Reviewed by: christos, joerg
2015-05-05 21:51:09 +00:00
lukem
ee0aef00c4 Add -x xferbufsize to set xferbuf size.
Implement  -x xferbufsize  set the socket send and receive buffer size,
as per 'xferbuf' in interactive mode.

Patch from Nicholas Mills (via private mail), with minor adjustment by me.
2015-04-23 23:31:23 +00:00
snj
68a743c9eb Update for 2015 dates. From Jeff Woodall in PR misc/49587, with
a typo fixed in Election Day (and the "even years" bit removed).
2015-04-23 06:19:10 +00:00
joerg
0057d0442d Explain what max is and handle i reaching it again. 2015-04-16 13:31:03 +00:00
joerg
e2d874fb89 Don't use memcpy for overlapping ranges. Simplify, memmove is good
enough to skip empty ranges.
2015-04-16 11:39:23 +00:00
pooka
6ee4aeae8e Accept 0 size for -d type=reg, it grows dynamically anyway.
(though perhaps there should be some way to limit that)
2015-04-16 10:05:43 +00:00
christos
d6eaf99167 Coverity CID 1264915, Via FreeBSD (Xin Li)
When reading in the original file name from gzip header, we read
in PATH_MAX + 1 bytes from the file.  In r281500, strrchr() is
used to strip possible path portion of the file name to mitigate
a possible attack.  Unfortunately, strrchr() expects a buffer
that is NUL-terminated, and since we are processing potentially
untrusted data, we can not assert that be always true.

Solve this by reading in one less byte (now PATH_MAX) and
explicitly terminate the buffer after the read size with NUL.
2015-04-15 02:29:12 +00:00
sjg
545bddb17b Use separate vars to track cwd and last dir a process read. 2015-04-11 05:24:30 +00:00
sjg
c6534f45d3 export-all.mk should be including export.mk
sadly some shells do not grok named signals.
2015-04-10 20:41:59 +00:00
tron
d1aa912cef Fix casts which are inconsistent with *printf() formats and remove the
use of a non-standard type in the process.
2015-04-10 09:34:43 +00:00
wiz
2690505034 It's 2015. 2015-04-10 08:43:32 +00:00
wiz
302cc6cfe4 Remove trailing whitespace. 2015-04-10 08:43:16 +00:00
uebayasi
c59f84ea6d Typo in previous. 2015-04-10 03:51:44 +00:00
uebayasi
e29416eeae More about attribute -> bus, and child configuration. 2015-04-10 03:30:09 +00:00
sjg
baa0bd3c22 Forgot to tweak date 2015-04-09 18:22:08 +00:00
sjg
065f2cad03 jobs mode handles '-' very differently to compat mode, but this is not
reflected in make.1
Also fix handling to match the behavior described in the comment
of JobPrintCommand (only matters if shell sets hasErrCtl).

A better long term solution is needed since the current behavior
is sub-optimal wrt '-' and different from all other makes.

Reviewed by: christos
2015-04-09 18:21:01 +00:00
christos
4e91feb5e1 remove ancient dup. 2015-04-07 17:49:40 +00:00
plunky
312b53dde5 change _whatdb => _mandb as that is the correct keyword here,
and move it to the correct position in the list.
2015-04-07 10:17:21 +00:00
wiz
75bbcb9aa1 Document xz decompression support better. From Joachim Henke on netbsd-docs. 2015-04-06 21:41:17 +00:00
christos
27de1fdbf3 build ops.h first, because trying to build dependencies and ops.h at the
same time leads to spurious failures.
2015-04-04 19:32:06 +00:00
christos
60a029958d accept typenames in param decls. 2015-04-03 21:40:04 +00:00
sjg
73c21af432 Close child's reference to meta file. 2015-04-01 01:03:55 +00:00
sjg
f15792411b Move initialization of savederr to the block where it is used
to avoid spurious warning from gcc 5
2015-03-26 22:20:42 +00:00
roy
a37502b2b6 Add RTF_BROADCAST to mark routes used for the broadcast address when
they are created on the fly. This makes it clear what the route is for
and allows an optimisation in ip_output() by avoiding a call to
in_broadcast() because most of the time we do talk to a host.
It also avoids a needless allocation for the storage of llinfo_arp and
thus vanishes from arp(8) - it showed as incomplete anyway so this
is a nice side effect.

Guard against this and routes marked with RTF_BLACKHOLE in
ip_fastforward().
While here, guard against routes marked with RTF_BLACKHOLE in
ip6_fastforward().
RTF_BROADCAST is IPv4 only, so don't bother checking that here.
2015-03-23 18:33:17 +00:00
mrg
99baa91ed3 if not playing (-q mode), don't call ioctl() or try to use the results.
now -q mode works.
2015-03-22 22:47:43 +00:00
plunky
e8fd30eb55 parse and print the HIDLANGIDBaseList attribute 2015-03-16 19:10:48 +00:00
christos
cefb10afe1 The latest refactoring changes broke sed -i:
cd /tmp; echo foo > test; sed -i.orig s,fo,ba, test
Back them out until they are fixed.
2015-03-12 12:40:41 +00:00
jnemeth
71db0be446 note birth and death of Douglas Adams 2015-03-11 17:35:16 +00:00
mlelstv
170fbd6544 Resolve names of datagram services correctly. 2015-03-08 06:46:51 +00:00
christos
b52075bfab add flag that let's you not wait for all the processes specified. 2015-03-04 16:36:12 +00:00
christos
ee9a5a1870 PR/49716: Henning Petersen: Use false and true on bool, fix sign in printf
formats.
2015-03-04 13:34:49 +00:00
christos
dacc247666 PR/49714: Henning Petersen: Change NULL in EV_SET to 0. 2015-03-04 13:31:53 +00:00
christos
1fddf0eec4 Add a timeout parameter. 2015-03-03 19:59:48 +00:00
christos
c7da06e6d1 there is no more makewhatis; it has been replaced by makemandb 2015-03-03 17:59:32 +00:00
christos
90298a02bf add pwait 2015-03-02 21:54:13 +00:00
christos
8fb724825c Add -s option, cleanup warnings. 2015-03-02 21:53:48 +00:00
christos
b957b96ffc Add pwait, from FreeBSD 2015-03-02 21:43:39 +00:00
enami
c1e351a1b2 Don't truncate at microseconds while preserving timestamps.
One of motivation of this change is to make the behavior of test(1)
-nt/ot with preserved copy (like cp -p) closer to the NetBSD 6.
Of course whether full timestamps are kept or not depends also on
underlying file system.

The ifdef added in mv(1) since existing ifdefs was our local change
to compile it on solaris (though I couldn't test it):
http://mail-index.netbsd.org/tech-userlevel/2014/11/28/msg008831.html
2015-03-02 03:17:24 +00:00
mrg
fe7264a410 be explicit about stdout mode. 2015-03-01 09:56:54 +00:00
asau
7004d56080 Hide more subroutines in processing phase. 2015-03-01 01:07:46 +00:00
asau
2390183275 Close files opened at processing time within processing phase. 2015-03-01 01:00:07 +00:00
asau
ee4b150430 Move run-time data structures into processing part. 2015-03-01 00:51:08 +00:00
asau
82be1f5db2 Move data I/O file pointers into processing part. 2015-03-01 00:38:01 +00:00
asau
1f228785da Improve modularity of "sed" source:
- move program source input subroutines into compiler part;
- move data I/O subroutines into processor part.
2015-02-28 21:56:53 +00:00
roy
81601736f6 Document RTF_LOCAL 2015-02-26 09:58:12 +00:00
christos
95f20280d9 Treat complex numbers like other floating numbers. This caused a core-dump
when linting libm complex code and assumed the size of the type larger than
the array size of value bitmaps.
2015-02-09 18:17:34 +00:00
christos
3934378a65 Allocate the right size for pcb blocks.
XXX: pullup-7!
2015-02-08 15:09:45 +00:00
christos
b0698f50d1 print the timer flags. 2015-02-07 19:36:06 +00:00
christos
58fd765e07 Add QXL, re-enable I915 2015-02-07 14:37:42 +00:00
martin
3af45c0517 Drop i915, it still causes duplicate case statements
(DRM_IOCTL_QXL_UPDATE_AREA == DRM_IOCTL_I915_BATCHBUFFER)
2015-02-07 11:24:55 +00:00
christos
e4344b2827 Extend the scripts to handle the X drm ioctls. 2015-02-06 20:08:23 +00:00
christos
3babb960e1 Extend the list of the headers processed to generate symbolic ioctls to
the X sets, and include the DRM ioctls. Unfortunately the DRM ioctls for
different cards overlap, so until I write some code to merge them, only
enable one (currently the i915).
2015-02-06 20:07:45 +00:00
christos
42e28dd7ad use strtoi instead of strtonum, since this is a tool. 2015-01-29 19:26:20 +00:00
christos
b3decb4766 latent strtonum removal. 2015-01-29 13:20:51 +00:00
christos
f47593bb0f use strtonum from libc (Kamil Rytarowski) 2015-01-29 03:28:19 +00:00
christos
fff8579aad delete extern 2015-01-29 03:27:06 +00:00
christos
93da4522d3 appease gcc-4.5.4 2015-01-22 20:01:22 +00:00
gson
7a9652e2cb Retry read() on EINTR. Fixes premature exit of
</dev/random progress -e cat >/dev/null
2015-01-17 10:57:51 +00:00
mrg
a1b1261ab6 do not use directory paths present in gzip files with the -N flag,
similar to the problem reported in pigz.
2015-01-13 02:37:20 +00:00
christos
eea786b46d Increase the buffer limit; otherwise files in:
http://www.taxdetective.ca/Samples/sampledatafiles.html

fail.
2015-01-12 14:17:08 +00:00
christos
e8283fa6b1 fix wordexp result handling 2015-01-10 17:16:01 +00:00
christos
ef0ab4422a fix incorrect arg size computation 2015-01-10 17:16:00 +00:00
prlw1
8707c3a333 Simplify code so that gcc 4.8 can understand it.
http://mail-index.netbsd.org/tech-userlevel/2015/01/06/msg008882.html
2015-01-09 12:45:32 +00:00
riastradh
3299a48014 Omit no longer existing l, m from default trace points. 2015-01-08 22:03:42 +00:00
christos
819d4545f4 Provide -C == -A + -B like fgrep, from Anon Ymous 2015-01-08 03:56:33 +00:00
christos
f8128537a0 adjust to the netname4 prototype. 2015-01-07 22:43:01 +00:00
pooka
0397f3a735 Move sysproxy support into a separate component, rumpkern_sysproxy,
instead of it being always provided by the rump kernel base.  This
move accomplishes two things:

1) it is no longer necessary to provide sysproxy hypercall stubs for
   platforms which do not want to use sysproxy
2) it is easier to reason about the security aspects, since configurations
   not linking the sysproxy component simply do not support remote
   system calls

discussed on rumpkernel-users
2015-01-07 22:24:03 +00:00
joerg
1382c4d712 Don't depend on yacc skeleton to include sys/cdefs.h early. 2015-01-04 18:31:09 +00:00
joerg
6e60cc85b0 Mark debug_log as printf-like. 2015-01-03 22:57:54 +00:00
christos
da9cda45ee don't shadow div(3) 2015-01-01 04:57:01 +00:00
mrg
4fe8b4e652 - this is midirecord(1) not midiorecord(1)
- add the -o handling to the getopt() and man page
- bump date
2014-12-30 18:52:47 +00:00
wiz
6fc026f9ce Sync usage with man page. 2014-12-30 12:14:34 +00:00
wiz
bd9cac43f4 Describe -T. Sync SYNOPSIS with options. Sort options.
Remove trailing whitespace. Use more markup.
2014-12-30 12:10:07 +00:00
mrg
34602bc4ec only prev_div needs to be static.
add channel to some log messages.
2014-12-30 06:08:14 +00:00
mrg
e2cc3fc481 install midirecord. 2014-12-30 04:22:18 +00:00
mrg
3f4db5ffea add a program to record midi files from /dev/music.
this doesn't process several potential result that netbsd does
not output on /dev/music, and should be largely complete for
our current sequencer(4).
2014-12-30 04:14:25 +00:00
mrg
9dd3b8ae69 add a decode_uint() function. 2014-12-30 01:22:09 +00:00
christos
ad7787327b And correct it. 2014-12-26 12:45:57 +00:00
christos
1a965b8777 Correct the provenance of finger.1 and show the link that it was part of
2BSD (from Marcin F. Michalski)
2014-12-26 03:49:00 +00:00
christos
f4b2cc8e89 Correct provenance of who(1) (from Marcin F. Michalski) 2014-12-26 01:43:58 +00:00
dennis
7ad3371ebc Update stats-keeping in sys/kern/vfs_cache.c to remove (most)
races while allowing consistent lockless sampling of the per-cpu
statistics without atomic operations.  Update comment describing
the locking protocol to include this.

These files were fumble-fingered out of the last commit.
2014-12-24 20:01:21 +00:00
dennis
61933bb52e Move enough additional 'w' code into 'uptime' to keep the latter
from double-counting utmp users.
2014-12-22 15:24:14 +00:00
christos
2a8765d5a2 Fix various security related issues:
0001. Do not recognize paths, mail folders, and pipes in mail addresses
    by default.  That avoids a direct command injection with syntactically
    valid email addresses starting with |.

    Such addresses can be specified both on the command line, the mail
    headers (with -t) or in address lines copied over from previous
    while replying.

    This was assigned CVE-2014-7844 for some versions of BSD mailx.  It is
    documented behavior for Heirloom mailx, and was mentioned in an old
    technical report about BSD mailx (which does not usually make its way
    into operating system installations).  The patch switches off this
    processing and updates the documentation.

Added expandaddr option to explicitly enable this behavior.

    0002. When invoking sendmail, prevent option processing for email
    address arguments.  This prevents changing e.g. the Postfix
    configuration file in unexpected ways.  This behavior was documented for
    BSD mailx (sort of), but not for Heirloom mailx.  We did not assign a
    CVE to this because it is more of a missing feature, and code invoking
    mailx needs adjustment in the caller as well.

Fixed.

    0003. Make wordexp support mandatory.  (No functional change.)

Fixed (replaced explicit shell pipe implementation).

    0004. Prevent command execution in the expand function, which is IMHO
    unexpected.  (Not really required with patch 1, and there is still
    information disclosure/DoS potential if this expansion occurs.)  This is
    a historic vulnerability already fixed in the Debian package,
    retroactively assigned CVE-2004-2771:

Fixed (as part of the pipe replacement with wordexp).
2014-12-16 19:30:24 +00:00
uebayasi
d8aa702d35 Revert debug code. Simplify. 2014-12-15 15:49:25 +00:00
uebayasi
fc1f7728b8 config(1): Fix build of old trees (bin/49389) (take 2)
Look into sys/conf/Makefile.kern.inc to check if "build_kernel" .USE target
is defined.  If not (== old source trees), generate one on the fly.
2014-12-15 15:41:18 +00:00