Commit Graph

16707 Commits

Author SHA1 Message Date
rodrigc
424fc070ef Remove names from some prototypes 2015-09-20 20:21:49 +00:00
rodrigc
e23bf826df Remove names from some prototypes 2015-09-20 20:16:34 +00:00
rodrigc
1737b90d79 Remove names from prototypes 2015-09-20 20:15:44 +00:00
rodrigc
fbd3bd1bfb Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
rodrigc
0cd26f001a Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 04:26:55 +00:00
rodrigc
8c6e2102df Use ANSI C prototypes.
Eliminates gcc 4.9 warnings.
2015-09-20 04:23:16 +00:00
rodrigc
101e50ce2f Add declaration to eliminate -Wmissing-prototypes warning 2015-09-20 04:21:44 +00:00
rodrigc
f7aca4b673 Add declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings. 2015-09-20 04:20:31 +00:00
rodrigc
5289640ead Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 04:17:53 +00:00
rodrigc
fd3fe449bf Define _NS_PRIVATE to make declarations visible.
This eliminates -Wmissing-prototypes warnings.
2015-09-20 04:17:03 +00:00
rodrigc
587e2d1829 Add missing includes to eliminate -Wmissing-prototypes warnings 2015-09-20 04:15:37 +00:00
rodrigc
a584fc06f1 Adding missing declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 04:06:55 +00:00
rodrigc
07e3f06934 Add missing include to eliminate -Wmissing-prototypes warning 2015-09-20 04:06:04 +00:00
rodrigc
177f72974d Add declaration to eliminate -Wmissing-prototypes warning 2015-09-20 03:59:27 +00:00
rodrigc
49c1e7af60 Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 03:58:27 +00:00
rodrigc
4c66a735a8 Adding missing include to eliminate -Wmissing-prototypes warning 2015-09-20 03:56:57 +00:00
rodrigc
0fd58af262 Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 03:55:03 +00:00
rodrigc
08c0b3cae7 Add declarations to eliminate -Wmissing-prototypes warnings. 2015-09-20 03:53:08 +00:00
rodrigc
0046fafdb2 Add declaration to eliminate -Wmissing-prototypes warning. 2015-09-20 03:51:15 +00:00
rodrigc
418ac8aebe Add missing include to eliminate -Wmissing-prototypes warnings 2015-09-20 03:49:08 +00:00
rodrigc
04f98ba6e2 Add missing includes to eliminate -Wmissing-prototypes warnings 2015-09-20 03:45:57 +00:00
hrs
a3fcca6713 Add PF_LOCAL support in getaddrinfo(3) and getnameinfo(3):
- In a PF_LOCAL address, "hostname" must begins with '/' and "servname"
  is always NULL.  All of ai_flags are ignored.

- PF_UNSPEC matches PF_LOCAL.  EAI_SERVICE is not returned to make
  AF-independent programming easier; "servname" is always ignored
  in PF_LOCAL.  In practice, PF_INET* and PF_LOCAL are
  mutually-exclusive because a hostname which begins with '/' is invalid
  in PF_INET*.  No domain name resolution is performed for a PF_LOCAL address.

Differential Revision:	https://reviews.freebsd.org/D3634
2015-09-20 01:09:23 +00:00
jilles
b76aba5008 libc: Consistently call _ioctl() internally, not ioctl(). 2015-09-19 20:27:09 +00:00
bdrewery
deb97713e0 Replace beforeinstall: handling with FILES.
This actually fixes some cases to respect LIBRARIES_ONLY.

Sponsored by:	EMC / Isilon Storage Division
2015-09-18 23:49:32 +00:00
delphij
76fb979246 There is no HP 300 support in FreeBSD anymore, so remove the obsolete
BUGS section.

While I'm there also bump Dd date.

MFC after:	2 weeks
2015-09-18 20:28:37 +00:00
trasz
bd8e12dd02 Kernel part of reroot support - a way to change rootfs without reboot.
Note that the mountlist manipulations are somewhat fragile, and not very
pretty.  The reason for this is to avoid changing vfs_mountroot(), which
is (obviously) rather mission-critical, but not very well documented,
and thus hard to test properly.  It might be possible to rework it to use
its own simple root mount mechanism instead of vfs_mountroot().

Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2698
2015-09-18 17:32:22 +00:00
des
c5050a3b9f Upgrade to Unbound 1.5.4. 2015-09-17 16:10:11 +00:00
bdrewery
bdebc05d94 Update META_MODE dependencies. 2015-09-17 05:06:34 +00:00
rodrigc
da6ab8d992 Use unsigned variables in a few places.
Eliminates gcc 4.9 warnings.
2015-09-14 18:59:01 +00:00
rodrigc
03b17210ed Use ANSI C prototypes.
Eliminates gcc 4.9 warnings.
2015-09-14 18:44:13 +00:00
jilles
5f1339c5cc db/recno: Open with close-on-exec like btree and hash do. 2015-09-13 17:17:52 +00:00
jilles
036f5d34b6 setuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD). 2015-09-13 14:00:49 +00:00
markj
34116761ff Remove the v_cache_min and v_cache_max sysctls. They are unused and have
no effect.

Reviewed by:	alc
Sponsored by:	EMC / Isilon Storage Division
2015-09-11 03:00:24 +00:00
tuexen
9701f78cf8 Zero out a local variable also when PURIFY is not defined.
This silence a warning brought up by valgrind whenever if_nametoindex
is used. This was already discussed in PR 166483, but the code
committed in r234329 guards the initilization with #ifdef PURIFY.
Therefore, valgrind still complains. Since this code is not performance
critical, always zero out the local variable to silence valgrind.

PR:		166483
Discussed with:	eadler@
MFC after:	4 weeks
2015-09-10 10:23:23 +00:00
hrs
0e29b6e367 - Fix SIGSEGV when sa == NULL. NULL check in getnameinfo_inet()
did not work as expected.

- Simplify afdl table lookup.

MFC after:	3 days
2015-09-09 09:19:07 +00:00
andrew
a04f5ff10f Enable mincore_test on arm64, we now have a working pmap_mincore.
PR:		202307
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2015-09-08 18:44:12 +00:00
trasz
ca187714e1 Make it possible to use acl_create_entry_np(3) to use first entry to an
empty ACL, and to append an entry to an ACL.

Submitted by:	sef@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-08 14:52:14 +00:00
kib
b522c482ce Style. Use ANSI definition, wrap long lines, no initialization in
declaration for locals.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-09-08 08:48:53 +00:00
kib
36ed4c2481 In the pthread_once(), if the initializer has already run, then the
calling thread is supposed to see accesses issued by the initializer.
This means that the read of the once_control->state variable should
have an acquire semantic.  Use atomic_thread_fence_acq() when the
value read is ONCE_DONE, instead of straightforward atomic_load_acq(),
to only put a barrier when needed (*).

On the other hand, the updates of the once_control->state with the
intermediate progress state do not need to synchronize with other
state accesses, remove _acq suffix.

Reviewed by:	alc (previous version)
Suggested by:	alc (*)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-09-08 08:41:07 +00:00
dim
0d218be831 In libz's inflateMark(), avoid left-shifting a negative integer, which
is undefined.

Reviewed by:	delphij
Differential Revision: https://reviews.freebsd.org/D3344
MFC after:	3 days
2015-09-07 20:55:14 +00:00
delphij
b4f95287e7 MFV r287451 + 287452: file 5.24 + fix for bin/181436.
PR:		181436
MFC after:	2 weeks
2015-09-04 05:56:14 +00:00
delphij
db0a2c953d Expose an interface to determine if an ACE is inherited.
Submitted by:	sef
Reviewed by:	trasz
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D3540
2015-09-04 00:14:20 +00:00
cem
f96df638b8 Detect badly behaved coredump note helpers
Coredump notes depend on being able to invoke dump routines twice; once
in a dry-run mode to get the size of the note, and another to actually
emit the note to the corefile.

When a note helper emits a different length section the second time
around than the length it requested the first time, the kernel produces
a corrupt coredump.

NT_PROCSTAT_FILES output length, when packing kinfo structs, is tied to
the length of filenames corresponding to vnodes in the process' fd table
via vn_fullpath.  As vnodes may move around during dump, this is racy.

So:

 - Detect badly behaved notes in putnote() and pad underfilled notes.

 - Add a fail point, debug.fail_point.fill_kinfo_vnode__random_path to
   exercise the NT_PROCSTAT_FILES corruption.  It simply picks random
   lengths to expand or truncate paths to in fo_fill_kinfo_vnode().

 - Add a sysctl, kern.coredump_pack_fileinfo, to allow users to
   disable kinfo packing for PROCSTAT_FILES notes.  This should avoid
   both FILES note corruption and truncation, even if filenames change,
   at the cost of about 1 kiB in padding bloat per open fd.  Document
   the new sysctl in core.5.

 - Fix note_procstat_files to self-limit in the 2nd pass.  Since
   sometimes this will result in a short write, pad up to our advertised
   size.  This addresses note corruption, at the risk of sometimes
   truncating the last several fd info entries.

 - Fix NT_PROCSTAT_FILES consumers libutil and libprocstat to grok the
   zero padding.

With suggestions from:	bjk, jhb, kib, wblock
Approved by:	markj (mentor)
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3548
2015-09-03 20:32:10 +00:00
trasz
09a927822a Fix acl_strip_np(3) breakage introduced in r279962.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-03 11:31:34 +00:00
trasz
8155434653 Fix the way acl_init(3) uses posix_memalign(3) - the latter doesn't
set errno.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-03 11:30:39 +00:00
hrs
fd2a8c5a25 - snprintf() returns at most size-1 of the chars printed into
the buffer.  (n == hostlen) also means the buffer length was
  too short.

- Use sdl->sdl_data only when (sdl->sdl_nlen > 0 && sdl->sdl_alen == 0)
  to prevent redundant output.
2015-09-02 16:50:49 +00:00
kib
3d333a281e Fix t_spawnattr test for attributes handling by posix_spawn(3).
Connect it to the build.

The code assumed that SCHED_* constants form a contiguous set of
numbers, remove the assumption by using schedulers[] array in
get_different_scheduler().  This is no-op on FreeBSD, but improves
code portability.

The selection of different priority used the min/max priority range of
the current scheduler class, instead of the priority to be changed to.
The bug caused the test failure.

Remove duplication of POSIX_SPAWN_SETSIGDEF flag and now unused
duplications of MIN/MAX definitions.

Reviewed by:	jilles, pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3533
2015-09-01 12:47:11 +00:00
rodrigc
cc00887f9b Use unsigned variable.
Eliminates gcc 4.9 compiler warning.
2015-09-01 09:22:24 +00:00
rodrigc
a2c978ffe8 Use ANSI C prototypes.
Eliminates gcc 4.9 warnings.
2015-09-01 08:34:44 +00:00
hrs
065fd54760 Print sdl->sdl_data when sdl->sdl_nlen > 0 as link_ntoa(3) does.
MFC after:	1 week
2015-09-01 08:29:39 +00:00