1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 23:35:36 -08:00
Commit Graph

1009 Commits

Author SHA1 Message Date
guenther
828e760f53 Move the typedefs for in_{addr,port}_t from <sys/types.h> to
<netinet/in.h> and <arpa/inet.h>

ok and ports test naddy@ (thanks!)
ok krw@ beck@ millert@
2017-02-04 02:54:33 +00:00
jsg
cc65dc7ef9 install libcxxabi and libcxx headers when COMPILER_VERSION is clang
ok patrick@
2017-01-27 13:30:39 +00:00
kettenis
c9b8f0a24d Add max_align_t.
ok millert@
2017-01-06 14:36:50 +00:00
jca
afa5894845 Kill the /usr/include/ssl symlink
Proposed some time ago by tedu@, builk build by ajacoutot@
2016-11-12 03:04:27 +00:00
tb
76c3425b36 Set owners and permissions only after all headers are installed. Add the -P
flag to chown to change the symlinks themselves instead of their targets.
Also change permissions of all symlinks, so they don't depend on the umask
during make build.

ok millert
2016-11-08 19:56:56 +00:00
tb
b718d5d406 Move libcrypto, librpcsvc and gnu/usr.bin/cc/include from RDIRS to PRDIRS,
and add prereq targets, so some header files are generated by BUILDUSER
during 'make prereq' instead of by root during 'make includes'.

Switch the order of 'make cleandir' and 'make includes' during 'make build'
so we don't generate many files twice.

Except for some machine@ symlinks from ${MACHINE}/stand, /usr/obj is now
clean from files generated by root during 'make build'. Those will be
cleaned up in a second step.

help, testing & ok deraadt, input from natano, further testing rpe
2016-10-16 19:28:44 +00:00
sthen
2b5055b02e Unhook sqlite3. 2016-09-23 09:18:05 +00:00
fcambus
7742623a4c Remove duplicated includes in stdlib.h and termios.h
OK guenther@
2016-09-20 21:10:22 +00:00
kettenis
e2d18ed965 Add dl_unwind_find_exidx prototype.
ok guenther@
2016-09-20 18:24:55 +00:00
guenther
9e9a60b097 Don't declare select() in <unistd.h>
ok deraadt@ millert@
2016-09-12 19:36:26 +00:00
guenther
407745eaed Change the (unused) restimespec member of __res_state from a timespec
to a local equivalent to eliminate a dependency on <sys/time.h> being
included

ok deraadt@ millert@
2016-09-12 19:35:31 +00:00
millert
6ecde746de Move the 10 (!) defintions of NULL to their own mini header file and
update the NULL definition for C++11.  OK deraadt@ guenther@ kettenis@
2016-09-09 18:12:37 +00:00
nicm
77abaea03f Make the key sizes and offsets arrays const, ok tedu 2016-09-04 14:51:39 +00:00
nicm
bcaff74cc4 Add the usual header stuff (#ifdef _ICDB_H_ etc) to icdb.h, ok tedu 2016-09-04 11:53:23 +00:00
tedu
f6bf8f90c0 i forgot to commit sha2.h changes for SHA512/256 2016-09-03 17:00:29 +00:00
guenther
937c6c5fe0 Pull in <sys/select.h> for fd_set
ok deraadt@
2016-08-27 04:28:28 +00:00
guenther
8ae7fd5a8b Stop publicly declaring _yp_dobind() and struct dom_binding, closing out
a rant Theo wrote 24 years ago.  Mark __ypexclude_{add,is,free}() as hidden

"get off my lawn!" deraadt@
2016-05-30 02:53:29 +00:00
guenther
fbe95b3563 Stop supporting longjmperror(); it's not used, not portable, and the checks
longjmp performs can't really be relied upon, even after we got rid of the
false positives...

ok millert@ deraadt@
2016-05-23 00:18:56 +00:00
guenther
df1557eb24 Remove iruserok(_sa)? and __ivaliduser(sa)?
ok millert@ deraadt@
2016-05-23 00:12:58 +00:00
guenther
2032f1fe08 Remove sigreturn declaration and the now-unused libc syscall stub 2016-05-09 23:55:52 +00:00
tedu
3d8a654b1a remove dbm.h 2016-05-07 21:58:24 +00:00
guenther
fe38b55cb0 Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a.  This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes.  'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@
2016-05-07 19:05:21 +00:00
guenther
157c34b356 Prepare for future ld.so/libc bump: update <tib.h> with the definitions
that will be needed and make libpthread work when ld.so/libc.a provide an
initial TIB.
2016-03-20 02:30:28 +00:00
jca
574dde883c Remove #ifdef __vax__ bits
ok deraadt@ tb@ (who had the same diff)
2016-03-17 20:55:35 +00:00
deraadt
c6c30f45cd remove cpp version of __sputc, since the inline version is all we have
ever used.
ok jsg
2016-03-16 04:56:08 +00:00
millert
abd93d17ae Expose snprintf() and vsnprintf() for XPG 5. It predates C99 but
still specified snprintf() and vsnprintf() based on earlier drafts.
Allows snprintf() and vsnprintf() to be used when _XOPEN_SOURCE is
defined as 500.  OK guenther@
2016-03-14 20:43:03 +00:00
deraadt
696cd27b24 We are done providing support for the vax.
lots of agreement.
2016-03-09 16:28:44 +00:00
millert
1647db04b3 Convert sigemptyset and sigfillset to inline functions to avoid
warnings with newer gcc versions and -Werror=unused-value.
OK guenther@
2016-02-04 22:04:34 +00:00
jca
7519139380 Remove decls #if'0ed since rev. 1.1
POSIX used to specify those declarations, but later removed them.

ok guenther@
2016-01-25 12:17:48 +00:00
jasper
d88f57029e After nearly 20 years of warning that malloc.h is obsolete, it's about time we
actually remove this header. It was originally added for ports, which is
malloc.h-free now.

additional ports bulk by aja@
ok bently@ dcoppa@ millert@ sthen@
2016-01-20 19:09:52 +00:00
ratchov
bde5d16205 Expose internal functions necessary to open audio devices and midi
ports using existing file descriptors.
2015-12-20 11:29:29 +00:00
millert
e7fbb21cb1 POSIX says that ffs(), strcasecmp(), strncasecmp(), r?index() and
the b* byte functions belong in strings.h, not string.h so break
them out of string.h into a new strings.h.  As long as there is no
POSIX or X/OPEN define in use string.h will pull in strings.h.
OK naddy@ deraadt@
2015-11-20 23:40:32 +00:00
tedu
025678fa0f add a version field to prevent mayhem if different data gets stored 2015-11-18 17:59:56 +00:00
tedu
e55899f04c add icdb.h here (this header may go away entirely, but the functions
need to live somewhere in the meantime.)
2015-11-18 16:48:34 +00:00
tedu
46d82e2ec0 Add icdb, the internal c database. A simpler replacement for the old
Berzerkeley DB code.
2015-11-18 16:46:49 +00:00
tedu
8a63353a77 Add _shadow variants to the two popular getpw functions (uid and nam).
This version of the function will always open the secure/shadow/master
password files. Soon, the regular variants of these functions will not.
(Intermixing shadow and regular gets a little weird; don't do that.)
Not using struct spwd and getspwnam functions to reduce churn in callers.
Should just be a one line diff in most places.
ok deraadt
2015-11-18 16:44:46 +00:00
deraadt
e9ff445ba1 libocurses can go to the Attic. last consumer of it was ramdisk more(1)
conceptual ok guenther millert nicm
2015-11-14 23:56:48 +00:00
guenther
60d4950662 Split the intra-thread functionality from kill(2) into its own syscall
thrkill(2), rolling the kill(2) syscall number with the ABI change to
avoid breaking binaries during during the transition.  thrkill(2) includes
a 'tcb' argument that eliminates the need for locking in pthread_kill()
and simplifies pthread_cancel().  Switch __stack_smash_handler() to use
thrkill(2) and explicitly unblock SIGABRT.

Minor bump to both libc and libpthread: make sure you install a new kernel!

ok semarie@
2015-11-10 04:30:59 +00:00
guenther
d994eebbf7 Move the last of the __DBINTERFACE_PRIVATE bits from <db.h> to libc's wrapper
and eliminate the now superfluous -D option

ok kettenis@ millert@
2015-10-17 21:48:42 +00:00
deraadt
58857ab480 tame -> pledge. 2015-10-09 01:26:40 +00:00
deraadt
4b9ea9621a delete xdr_ypresp_all_seq prototype 2015-09-28 20:49:24 +00:00
kettenis
1042567dd9 Stop installing any header files in /usr/include/dev/pci/drm.
Userland should get these from /usr/X11R6/include/libdrm.

ok deraadt@ (and suggested by jsg@)
2015-09-27 14:52:47 +00:00
guenther
261d695547 Trim symbols that aren't part of our new resolver
OK semarie@
2015-09-25 23:32:51 +00:00
guenther
c261d7e9a9 Revert: finger slip 2015-09-14 08:24:37 +00:00
guenther
f09ad35c18 Prefer the standardized <poll.h> over <sys/poll.h> 2015-09-14 08:16:14 +00:00
guenther
85858ec2de Wrap <rpc/*.h> so that calls go direct and the symbols are all weak.
Hide __xprt_register() and _authenticate(); truncate <rpc/svc_auth.h>

ok deraadt@
2015-09-13 15:36:56 +00:00
guenther
af44c6e45d authdes_create() was never implemented 2015-09-13 12:29:03 +00:00
deraadt
bf89e9b125 Hide netgroup internals inside libc. The parts that netgroup_mkdb
wants to use, well.... copy them there.
ok guenther
2015-09-10 18:59:34 +00:00
deraadt
2868cab32a Move to next tame() API. The flags are now passed as a very simple string,
which results in tame() code placements being much more recognizeable.
tame() can be moved to unistd.h and does not need cpp symbols to turn the
bits on and off.  The resulting API is a bit unexpected, but simplifies the
mapping to enabling bits in the kernel substantially.
vague ok's from various including guenther doug semarie
2015-09-09 17:56:59 +00:00
guenther
061188c8bf Stop exporting from libc the <mpool.h> and the mpool_* API
ports scan by sthen@
2015-09-09 15:35:24 +00:00
guenther
181ba704e2 Use new framework for wrapping dbopen()
Move internal declarations from <db.h> to libc's hidden/db.h

ok kettenis@
2015-09-05 11:28:35 +00:00
daniel
f7094e1118 These days pcc defines __GNUC__ and we don't support gcc2. Also needed
for upcoming CompCert port.

Final version of the diff is from kettenis@ with input from jsg@ and tedu@.

ok kettenis@, jsg@, "I agree" millert@
2015-09-04 23:47:09 +00:00
guenther
9b9d2a55a6 Add framework for resolving (pun intended) libc namespace issues, using
wrapper .h files and asm labels to let internal calls resolve directly and
not be overridable or use the PLT.  Then, apply that framework to most of
the functions in stdio.h, string.h, err.h, and wchar.h.  Delete the
should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.

tests clean on i386, amd64, sparc64, powerpc, and mips64

naming feedback from kettenis@ and millert@
ok kettenis@
2015-08-31 02:53:56 +00:00
guenther
bb64080b0f Use static and __{BEGIN,ENV}_HIDDEN_DECLS to hide a bunch of internal
symbols that are not longer exported.  (This improves the generated code.)

ok deraadt@
2015-08-27 04:37:09 +00:00
guenther
b3b7ef2e4e Hide many (194!) symbols that nothing should be using.
Delete exect(2); it wasn't portable across archs and nothing used it.

ports test build by naddy@
ok deraadt@ kettenis@
2015-08-26 01:54:08 +00:00
yasuoka
572174f265 Build and install libradius as default.
ok deraadt
2015-07-23 06:04:12 +00:00
millert
5dd668c8ea Add VIS_DQ to escape double quotes. OK deraadt@ semarie@ reyk@ 2015-07-20 01:52:27 +00:00
martynas
2c96417951 Define new C99 macros:
- MATH_ERRNO, MATH_ERREXCEPTION and math_errhandling
- Optional FP_FAST_FMA{,F,L} macros if fma() executes as fast or faster
than (x * y) + z;  which in practice is achievable if gcc implements
__FP_FAST_FMA{,F,L}
Reported by John Marino @ DragonFlyBSD.
2015-07-19 17:41:49 +00:00
millert
8fb4bdfc76 The first argument to devname(3) should be dev_t, not int.
The man page was already correct.
2015-07-14 19:05:11 +00:00
millert
b5c8b44bc3 Remove function argument name from posix_spawnattr_getsigmask()
prototype to match other prototypes in the file.  OK guenther@ deraadt@
2015-05-20 22:50:07 +00:00
millert
c9da469ac9 Remove obsolete timezone() function.
Add timezone and daylight symbols for XSI compatibility.
2015-04-07 01:47:04 +00:00
guenther
fd7ad13f9e gcc 2.x is dead
ok millert@
2015-04-04 18:05:04 +00:00
millert
62f3e54ab3 Remove obsolete copy of tzfile.h. It is an internal tzcode header
that should never have been installed.
2015-03-17 20:40:41 +00:00
millert
78badebcb0 Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@ 2015-03-17 19:31:30 +00:00
millert
f7055df57d tzfile.h is an internal header that should never have been installed.
What's worse, the tzfile.h that gets installed is over 20 years old
and doesn't match the real tzfile.h in libc/time.  This makes the
tree safe for /usr/include/tzfile.h removal.  The TM_YEAR_BASE
define has been moved to time.h temporarily until its usage is
replaced by 1900 in the tree.  Actual removal of tzfile.h is pending
a ports build.  Based on a diff from deraadt@
2015-03-15 00:41:27 +00:00
tedu
b8a0470688 Use standard spelling for types, and rename local variable from "free".
No actual change, but makes it easier to reuse the code elsewhere.
Suggested by Andre Smagin
2015-02-20 11:51:03 +00:00
sthen
1c6b5d0448 Make sure to replace an existing /usr/include/ssl symlink, otherwise repeated
builds will have a bogus /usr/include/openssl/openssl as found by naddy. ok jca@
2015-02-18 15:31:10 +00:00
tedu
06bb4cbae5 stop deleting the openssl include directory, causing unnecessary rebuilds.
ok jca sthen
2015-02-16 14:06:15 +00:00
millert
3a41feed02 Protect fgetwln(), wcslcat() and wcslcpy() with __BSD_VISIBLE
OK tedu@ kettenis@
2015-02-09 23:02:25 +00:00
tedu
e58af03110 add restrict to strtol like functions. ok guenther 2015-02-08 02:58:50 +00:00
guenther
8a1f5a5836 Delete option COMPAT_43: support for pre-sa_len binaries has been obsolete
for a couple decades.  Keep the OSIOCGIFCONF ioctl to support COMPAT_LINUX
but move the rest of the Linux-specific ioctl() handling into linux_socket.c
This lets struct osockaddr finally move from sys/socket.h to protocols/talkd.h

ok krw@ deraadt@ mpi@
2015-01-21 02:23:14 +00:00
tedu
7a4e5fc41a increase TMP_MAX to the equivalent of INT_MAX. it's actually more,
but safer not to wraparound by accident.
ok deraadt millert miod
2015-01-20 22:09:50 +00:00
krw
5f1af72573 Make some $OpenBSD$ lines prettier/standardier by eliminating
superflous '*' after '/*' and adding blank after terminating '$'.
Also eases parsing of the lines by simple awk scripts.

Aesthetic approval from tedu@.
2015-01-19 15:30:52 +00:00
deraadt
e87170bba9 Stop including <sys/param.h> from <netdb.h>. Portable software must either
include <sys/param.h> (to operate in legacy mode) or if it wishes to operate
in the POSIX world use <limits.h>
ok guenther millert doug naddy
2015-01-18 20:29:31 +00:00
tedu
c0497f64e1 remove des.h. it somehow escaped from ssleay into /usr/include, but none
of the functions prototyped here exist in libc, making it useless.
2015-01-17 20:37:04 +00:00
deraadt
0ea6fd7293 Since <netdb.h> soon won't include <sys/param.h>, MAXHOSTNAMELEN may
not be in scope, so hardcode as 256.  Other options have more downside.
2015-01-16 00:27:00 +00:00
deraadt
587e6a09eb Switch to including <sys/types.h> instead of <sys/param.h>
This hides the unavoidably cruddy sys/param.h namespace in some programs.
Little impact, because many programs are cruddy and still get it via
other includes.
ports testing thanks to sthen and naddy
ok guenther millert
2015-01-16 00:01:28 +00:00
tedu
af4f502b8b we don't have an alloca() symbol anywhere in libc, don't prototype it.
instead, #define to __builtin_alloca. if that doesn't work, you're hosed.
from an old discussion about the perils of alloca. (don't use alloca!)
2015-01-15 19:55:58 +00:00
millert
8acb1e22e6 Add fgetwln(3) from FreeBSD and bump libc minor revision. 2015-01-12 20:58:07 +00:00
guenther
d4bb4faeba $OpenBSD for our rev here 2014-12-20 05:43:26 +00:00
tedu
7f91f42385 claim posix 2008 compat. apparently people look at this and get scared
when it's really old. but no actual ports fallout in espie's build.
ok deraadt
2014-12-13 20:42:41 +00:00
tedu
0a2869cb84 update swab() to match the current posix definition. "rationale: none."
rewrite the function to be simpler as well. the compiler can unroll the
loop for us if necessary.
ok schwarze
2014-12-11 23:05:38 +00:00
deraadt
f7510a6ece Change rand(), random(), drand48(), lrand48(), mrand48(), and srand48()
to returning strong random by default, source from arc4random(3).
Parameters to the seeding functions are ignored, and the subsystems remain
in strong random mode.  If you wish the standardized deterministic mode,
call srand_deterministic(), srandom_determistic(), srand48_deterministic(),
seed48_deterministic() or lcong48_deterministic() instead.
The re-entrant functions rand_r(), erand48(), nrand48(), jrand48() are
unaffected by this change and remain in deterministic mode (for now).

Verified as a good roadmap forward by auditing 8800 pieces of software.
Roughly 60 pieces of software will need adaptation to request the
deterministic mode.

Violates POSIX and C89, which violate best practice in this century.
ok guenther tedu millert
2014-12-08 21:45:19 +00:00
tedu
80dc78aa39 header changes for recent libc changes:
add siphash
delete setkey, encrypt, cfree
2014-12-08 20:39:56 +00:00
tedu
817d1ee3be change prototype for crypt_newhash. the login_cap_t is a holdover from its
pwd_gensalt origins, but a string argument works equally work and is more
friendly to consumers beyond local user accounts.
ok deraadt
2014-11-21 05:13:44 +00:00
tedu
faa4eeece1 prototype for crypt_newhash(). adding it here because this is where
login_cap_t lives and i don't want to forward declare it in unistd.h
2014-11-19 22:59:50 +00:00
millert
c2a8008657 Add prototype for stravis(). 2014-11-17 19:51:54 +00:00
jsing
b600beed7b Rename libressl to libtls to avoid confusion and to make it easier to
distinguish between LibreSSL (the project) and libressl (the library).

Discussed with many.
2014-10-31 13:46:17 +00:00
guenther
e356e1c257 Add prototypes for xdr_{accepted,rejected}_reply() and svcudp_enablecache()
(Both NetBSD and FreeBSD provide these prototypes)

ok millert@
2014-10-29 04:34:21 +00:00
guenther
9f295d469e Our setpgrp() is the BSD version with two args and not the XSI
version with zero args, so it should only be visible if __BSD_VISIBLE
(and not also for __XPG_VISIBLE).  Contrawise, readlink() has been
part of base POSIX since 1995, so move to proper #if area for that.
Move crypt_checkpass() to the pure-BSD section of the file.

setpgrp() issue noted by Matti Karnaattu (mkarnaattu (at) gmail.com)
ok millert@
2014-09-18 04:37:56 +00:00
matthieu
cb736800fc Missed this sendmail reference in the sendmail removal 2014-09-16 00:19:31 +00:00
doug
e6ff12da83 Sync readlink(2) with IEEE Std 1003.1-2008.
discussion, help and ok guenther@
2014-09-01 05:09:52 +00:00
miod
9a210c530b Add uuid support routines to libc. From FreeBSD via NetBSD via Bitrig via
Markus Mueller.
2014-08-31 09:36:36 +00:00
guenther
7496a82a13 setgrfile() isn't implemented 2014-08-31 04:04:38 +00:00
guenther
b099c39fbd inet_nsap_{addr,ntoa}() were removed on 2013/12/17 2014-08-31 04:04:01 +00:00
guenther
cbcba4176a Declare and document getthrid()
indirectly prodded by krw@
2014-08-31 04:02:08 +00:00
guenther
ed42a740c1 Add additional userland interfaces for setting close-on-exec on fds
when creating them: mkostemp(), mkostemps(), the 'e' mode letter for
fopen(), freopen(), fdopen(), and popen().  The close-on-exec flag will
be cleared by the action created by posix_spawn_file_actions_adddup2().

Also, add support for the C11 'x' mode letter for fopen() and freopen(),
setting O_EXCL when possibly creating files.

Note: this requires kernel support for pipe2() and dup3()!

ok millert@
2014-08-31 02:21:18 +00:00
guenther
b65639bd21 Add additional kernel interfaces for setting close-on-exec on fds
when creating them: pipe2(), dup3(), accept4(), MSG_CMSG_CLOEXEC,
SOCK_CLOEXEC.  Includes SOCK_NONBLOCK support.

ok matthew@
2014-08-31 01:42:36 +00:00
guenther
8cf7d58c8a Delete duplicate conditional
diff from frantisek holop (minusf (at) obiit.org)
2014-08-10 02:49:24 +00:00
matthew
177a742757 Change lsearch()'s "base" argument to require a non-const pointer to
align with POSIX and other systems.

Pointed out by Elliott Hughes on tech
ok deraadt
2014-07-18 04:16:09 +00:00
pelikan
4f42d1192c international currency locale rules as per POSIX.1-2008
required for libc++

ok guenther afresh1
2014-07-14 07:22:06 +00:00
deraadt
b68230f567 enter libressl for make includes 2014-07-14 01:01:27 +00:00
guenther
7c5b55ffaa Tackle the endian.h mess. Make it so that:
* you can #include <sys/endian.h> instead of <machine/endian.h>,
   and ditto <endian.h>  (fixes code that pulls in <sys/endian.h> first)

 * those will always export the symbols that POSIX specified for
   <endian.h>, including the new {be,le}{16,32,64}toh() set.  c.f.
	http://austingroupbugs.net/view.php?id=162

   if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h>
   currently exports (ntohs, NTOHS, dlg's bemtoh*, etc)

 * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and
   <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER
   and betoh*

ok deraadt@
2014-07-12 16:25:08 +00:00
guenther
014e36e3da Welcome to 1989: assume the compiler support const 2014-07-12 02:51:52 +00:00
guenther
9bfcd1767c Per C99, wchar.h has to forward declare struct tm 2014-07-12 02:48:33 +00:00
tedu
9e593bd9b7 stop installing netbt headers 2014-07-11 21:50:28 +00:00
halex
150f0d6bfa make dump support DUIDs for command line arguments and /etc/dumpdates (using
the new shiny -U switch)

dumpdates part originating from, and discussed with, Maximilian Fillinger

seems reasonable to krw@, "get it in" deraadt@
2014-07-11 16:01:40 +00:00
beck
e5388d055a Clean up after arc4random u_int32_t uint32_t change
ok jsing@
2014-07-09 16:57:49 +00:00
tedu
5f651b4a12 update _POSIX2_FORT_RUN, so that sysconf(_SC_2_FORT_RUN) remains correct.
because you care. reminded by matthew.
2014-07-08 21:35:39 +00:00
deraadt
bbb6b66290 Change return value of getentropy() to int 0 for success. Maximum
buffersize is enforced strictly, this supplies sufficient entropy
payload to act as seed material.  Discourage general use of this
API, but lock down this function name as the go-to for userland
PRNG seeding.  Improve documentation.
ok miod matthew
2014-06-14 18:01:41 +00:00
deraadt
eacbc5b32c Add new getentropy() system call. Code and pressure from matthew.
I accepted that he's right (again) to seperate this out from heavy
sysctl API and this will simply a variety of things.  Functionname
is not used by anyone in the ports tree, so we guess we can use it.
Shocking that no application has a function called this.
ok matthew & others who pushed him to start this early on
2014-06-13 08:26:09 +00:00
matthew
abf4a3ad42 Add timingsafe_memcmp().
ok deraadt, jmc, tedu
2014-06-13 02:12:17 +00:00
guenther
6ffa79183a Can't use a variable 'c' in a standard include; rename it to '_c'
ok deraadt@ millert@
2014-05-26 01:49:36 +00:00
tedu
5f7129452b add prototypes for new crypt functions 2014-05-16 21:28:15 +00:00
espie
2bf795a714 these files have moved to libutil 2014-05-12 19:27:24 +00:00
tedu
c0e6b18c7f no md5crypt 2014-05-12 19:13:51 +00:00
espie
42dcb48712 move the ohash functions into libutil by popular demand.
It's not a standard interface, so it doesn't belong in libc.
I hate duplicating the code in client programs, so do beck@, kettenis@,
schwarze@, millert@, miod@... and they agree with libutil.
2014-05-12 19:09:00 +00:00
espie
a795a9b40f tweak interface to do the right thing, after useful comments from millert@
(mostly use a calloc function to avoid potential integer overflow)
2014-05-12 19:07:37 +00:00
martynas
0ad9e87784 Annotate wide character routines so they get protected by Wbounded.
OK millert@
2014-05-03 16:19:53 +00:00
martynas
7c58654270 - Provide extended-precision math constants req'd by POSIX
- Explicitly cast double-precision constants as needed for
FLT_EVAL_METHOD = 2 archs
OK guenther@, ratchov@
2014-05-03 16:13:03 +00:00
sperreault
20149d178a Implement AI_ADDRCONFIG
This is a getaddrinfo() flag that is defined thusly in RFC 3493:

   If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be
   returned only if an IPv4 address is configured on the local system,
   and IPv6 addresses shall be returned only if an IPv6 address is
   configured on the local system.  The loopback address is not
   considered for this case as valid as a configured address.

      For example, when using the DNS, a query for AAAA records should
      occur only if the node has at least one IPv6 address configured
      (other than IPv6 loopback) and a query for A records should occur
      only if the node has at least one IPv4 address configured (other
      than the IPv4 loopback).

The flag is set by default when hints is NULL.

ok Eric Faurot, Jason McIntyre
2014-04-28 21:38:59 +00:00
tedu
7e25e286a3 change mallocarray to reallocarray. useful in a few more situations.
malloc can, as always, be emulated via realloc(NULL).
ok deraadt
2014-04-22 14:26:26 +00:00
reyk
84fc8f7ce6 Remove KERBEROS5 from the Makefiles (except ssh for now, where it is
already manually disabled).

ok deraadt@
2014-04-22 10:21:56 +00:00
guenther
d01ec05984 Add errc/verrc/warnc/vwarnc family: versions of err/... that take the errno
value to use for the strerror() message as an argument.  Originally from
FreeBSD 3.0

Patch from Steffen Nurpmeso (sdaoden (at) gmail.com) with minor tweaks.
2014-04-22 00:33:02 +00:00
guenther
0dd8069ec2 Remove historical comment about <varargs.h> and warn people from using
the _* functions outside libc
2014-04-21 16:13:24 +00:00
deraadt
e1603b917b Introducing: void *mallocarray(size_t nmemb, size_t size);
Like calloc(), except without the cleared-memory gaurantee
ok beck guenther, discussed for more than a year...
2014-04-21 13:17:32 +00:00
guenther
ece79e109f Use internal '__' names for __attributes__ in public headers 2014-04-21 11:27:34 +00:00
henning
4254632602 stop installing altq includes 2014-04-19 15:58:56 +00:00
miod
252ab50e97 Move build machinery for libcrypto from libssl/crypto to libcrypto, as well
as configuration files; split manpages and .pc files between libcrypto and
libssl.
No functional change, only there to make engineering easier, and libcrypto
sources are still found in libssl/src/crypto at the moment.

ok reyk@, also discussed with deraadt@ beck@ and the usual crypto suspects.
2014-04-11 22:51:51 +00:00
matthew
d5aa66952d Define intptr_t in <unistd.h> as specified by POSIX
ok millert
2014-04-01 05:04:50 +00:00
tedu
d8e2f36e09 safe to remove gets, now that's gone from cstdio too 2014-03-27 15:28:16 +00:00
eric
d216d6b129 Make the asr API public. Install asr.h to /usr/include.h and manpages.
Include tweaks suggested by mpi@

ok deraadt@
2014-03-26 18:13:15 +00:00
tedu
62c9c9a7ee try to put the pin back in.
removing gets means removing it from libstdc++ and guenther tells me
that will require changing version numbers.
2014-03-25 15:55:15 +00:00
tedu
c792825af2 no gets 2014-03-25 15:23:27 +00:00
kettenis
383d6c0749 unbreak the tree; no more libwrap 2014-03-24 19:09:14 +00:00
tedu
c0c2aeee79 more bm excision 2014-03-23 23:41:31 +00:00
naddy
022886465c Remove the MD4 functions.
"A collision attack published in 2007 can find collisions for full
MD4 in less than two hash operations."

ok deraadt@, man pages ok jmc@
2014-03-23 23:27:22 +00:00
guenther
acf82b0a9d lint is dead (long live the lint!), so stop using it as a cpp conditional
(namespace pollution!) or talking about its opinion on code.

ok krw@
2014-03-16 18:38:30 +00:00
tedu
11f7b9b824 the default rsh is now spelled ssh. ok deraadt 2014-03-13 15:24:41 +00:00
florian
32f51239e2 Unhook httpd(8) from build
OK krw@, gilles@, lteo@, tedu@, todd@, benno@, sthen@
"The time is right." and much help getting the show on
the road deraadt@
2014-03-13 10:09:43 +00:00
tedu
2fa321beb4 add explicit_bzero to libc. implementation subject to change, but start
the ball rolling. ok deraadt.
2014-01-22 21:06:45 +00:00
guenther
746ad4a9f9 Delete struct definitions that have been obsolete for a dozen years
ok deraadt@
2014-01-08 06:50:57 +00:00
martynas
0ad647d636 Annotate a few more bounded functions: realpath(3) needs a buffer
of size at least PATH_MAX.  pread(2), pwrite(2) and readlinkat(2)
also take the buffer and the bound.  OK theo.
2013-12-28 01:51:53 +00:00
millert
9a476230f2 Fix typo; 200809 not 20080 for __POSIX_VISIBLE. Noticed by jca@ 2013-12-13 20:48:39 +00:00
zhuk
d33565a9ed Zap some getdirentries() leftovers.
okay guenther@
2013-12-13 18:09:27 +00:00
naddy
4ba3f2b83e remove the final vestiges of the stty(), gtty(), and ftime() compatibility
interfaces; ok deraadt@
2013-12-08 17:05:09 +00:00
deraadt
fcaa69366a oops, sgtty.h stays for a little longer 2013-12-05 17:16:02 +00:00
deraadt
6c13836a7e express final disapproval of the interfaces in libcompat, such as
them ftime(), gtty(), stty(), re_comp(), cuserid() and others.
Discussion and ongoing work to fix the ports tree from many, especially
naddy.
ok naddy
[There is a bit more cleanup possible after that, but this is considered
the current safe step]
2013-12-04 22:58:24 +00:00
krw
b50d95c846 CIRCLEQ begone.
ok miller@
2013-12-02 02:28:21 +00:00
millert
6290d6dbce The getopt() prototype and externs don't belong in stdlib.h. Berkeley
moved them to unistd.h to match POSIX in 1995 but we never did.
The exception to this is getsubopt() which POSIX says should be in
stdlib.h.  The non-standard suboptarg extern remains in the BSD-only
section of stdlib.h.  Neither getsubopt() nor suboptarg belong in
unistd.h or getopt.h.  They were only there to allow us to protect
all the getopt() bits from being multiply defined.  OK guenther@
2013-11-22 21:32:49 +00:00