Commit Graph

13001 Commits

Author SHA1 Message Date
christos
048e0d6b52 simplify. 2015-12-03 20:01:19 +00:00
christos
96135c5b6f PR/50496: Alex Kozlov: teach unzip to extract symlinks
Our libarchive does not handle symliks yet, but later versions do.
Set mode and times for symlinks. Finally handle hardlinks for
completion although they are not handled yet by librarchive.
2015-12-03 20:00:12 +00:00
sjg
b35a5f4c5f Fix evaluation of defined(FOO) and ${FOO} > 0
add a unit-test to catch it.
2015-12-02 00:28:24 +00:00
sjg
69ecbee5a0 Avoid calling brk_string() and hence Var_Export1() on
empty strings.
2015-12-01 07:26:08 +00:00
sjg
1c3d99f499 Use lstat(2) if we have a link, incase it is a symlink.
Patch from bdrewery at FreeBSD.org
2015-11-30 23:37:56 +00:00
sjg
bea1b39c5f Avoid accessing beyond end of empty string.
Detected by Address Sanitizer - dim at FreeBSD.org
2015-11-30 23:15:43 +00:00
sjg
8098e1a571 ParseTrackInput: do not access beyond end of buffer.
Detected by Address Sanitizer - dim at FreeBSD.org
2015-11-26 00:23:04 +00:00
christos
1ef9a127cf PR/50360: Thomas Klausner: Fix MKREPRO issue 2015-11-25 01:12:03 +00:00
uebayasi
e1ddff408d A few more. 2015-11-22 01:20:36 +00:00
christos
e9836e5e7e fix format 2015-11-21 15:22:17 +00:00
christos
301b67f323 WARNS=6 2015-11-21 15:01:43 +00:00
christos
2ea5bc272a PR/50454: Timo Buhrmester: Fix wrong allocation for wall(1) -g
Modernize.
2015-11-21 14:59:51 +00:00
christos
2e3d23cd2c redo previous, not needed. 2015-11-13 19:13:50 +00:00
christos
4ae24fd01a Handle 0b locally since anyway this is not portable. 2015-11-13 16:04:58 +00:00
christos
5e9bf06a78 Recognize binary constants 2015-11-12 17:34:01 +00:00
pooka
d0f0cf2fcb In ioconfname mode, #define IOCONF as the ioconf token.
Avoids having to retype the name to call config_init/fini_component().
2015-11-12 14:38:21 +00:00
christos
5851f02af6 Delete extra declaration of svc_fdset... And some commented out code.
This badly needs some modernization.
2015-11-08 01:59:31 +00:00
joerg
a08385b414 Explain what "-V none" does. 2015-11-07 18:26:55 +00:00
joerg
3f2a71f305 paths.h is not used. 2015-11-07 18:11:21 +00:00
jnemeth
3980f190ce typo 2015-11-06 12:49:06 +00:00
wiz
f46449d46b Sort options in SYNOPSIS.
Order is: 0123.9AaBbCc...Zz;
options without arguments in a block first, then the ones with arguments.
2015-11-05 14:02:07 +00:00
ozaki-r
a0fb6b682b Add missing options to SYNOPSIS and sort 2015-11-05 09:28:30 +00:00
joerg
772e6dc22c ' != " so make the condition actually work. 2015-11-02 12:06:33 +00:00
shm
c4764e65c8 - Added error checks for initgroups(3) and setgroups(2).
- Reorder functions in privilege regain - setgroups(2) should be called after
  seteuid(2).

OK christos@
2015-10-29 11:31:52 +00:00
shm
93eb731454 Added missing sa_mask initialization (CID 979636)
OK kamil@ mrg@
2015-10-28 08:15:53 +00:00
shm
39d8d23068 Fixed off-by-one in decode_ss (CID 977426)
OK kamil@
2015-10-28 07:27:24 +00:00
shm
805afefc0d Added namelen initialization in getpeername(3) call (CID 979631)
OK kamil@
2015-10-27 14:53:00 +00:00
shm
b1dc5cb72e Fixed memory leak (CID 978341)
OK kamil@
2015-10-27 14:47:45 +00:00
mrg
60c6cf919b port across the change from freebsd rev 290024:
In gunzip(1), treat trailing garbage as a warning and not an error.  This
allows scripts to distinguish it between real fatal errors, for instance a
CRC mismatch.

Update manual page for the behavior change.

PR:		bin/203873
Submitted by:	Eugene Grosbein <eugen grosbein net>
MFC after:	2 weeks
2015-10-27 07:36:18 +00:00
sjg
b690002e9b PrintOnError: fflush stdout before running .ERROR
produces more consistent results in unit-tests.
2015-10-25 05:24:44 +00:00
christos
354d41acbc simplify 2015-10-22 00:29:58 +00:00
sjg
80c2cdd094 Ensure emsg initialized 2015-10-20 21:30:57 +00:00
christos
96e2a4cea0 more descriptive errors 2015-10-14 18:31:52 +00:00
christos
29160715bc the next symbol should be a type. 2015-10-13 20:49:39 +00:00
christos
14356dd961 handle anonymous struct/union members. 2015-10-13 20:25:21 +00:00
christos
17f4a693be more descriptive aborts 2015-10-13 16:09:33 +00:00
sjg
19a6f2c62e Add unit-test for discarded :? 2015-10-12 17:09:29 +00:00
sjg
5a3dc2452c The conditional expressions used with ':?' can be expensive
eg. exists() does stat(2).
If 'wantit' is FALSE, we are going to discard everything anyway,
so skip evaluating the conditional and expanding either lhs or rhs.
2015-10-12 16:48:13 +00:00
pgoyette
b4d63f0a4b Fix typo - Bahamas starts with a 'B' not with a 'G' 2015-10-11 22:08:46 +00:00
sjg
c7f1b3e52d Avoid echo -n in unit-tests 2015-10-11 06:32:15 +00:00
sjg
df0424202d Add Boolean wantit to Var_Parse and Var_Subst
wantit will be FALSE when we are just consuming to discard
in which case we skip "expensive" things like Cmd_Exec.

Reviewed by: christos
2015-10-11 04:51:24 +00:00
dholland
1fb0cf16c7 Don't assume HAVE_POSIX_SPAWN when building a host prog. From Joachim
Kuebart in PR 50301. needs pullup-7
2015-10-10 22:54:03 +00:00
sjg
53b398eca4 Do not hard-code ingnoring of makeDependfile 2015-10-10 03:58:59 +00:00
christos
472bcd2198 PR/50322: Timo Buhrmester: tail -F <file> misbehaves with stdin closed
Compare fp with stdin not fileno(fp) with STDIN_FILENO, because if tail
is called with 0 closed, then we are not going to be setting event filters
for the file because we'll erroneously think it is stdin.
2015-10-09 17:51:26 +00:00
jnemeth
1b254ad09b note the release of NetBSD 7.0 2015-10-09 00:09:52 +00:00
christos
ebf0d565d5 don't check for NULL before free() (Tilman Sauerbeck) 2015-10-06 17:36:25 +00:00
christos
f05010c404 - PR/50291: Fix memory leak
- estrdup/emalloc
- use EXIT_FAILURE instead of 1
2015-09-29 14:27:00 +00:00
christos
20c3ea3d63 Kill sys/modctl.h which we don't need. 2015-09-27 03:37:16 +00:00
christos
c4bba3a5cb Put -Isys after the ioctl Makefile has a chance to add other paths first. 2015-09-26 13:31:27 +00:00
christos
f72496b8cd Add dtrace ioctls 2015-09-26 03:31:11 +00:00