freebsd-nq/lib/libc
Kyle Evans 773fa8cd13 execve: disallow argc == 0
The manpage has contained the following verbiage on the matter for just
under 31 years:

"At least one argument must be present in the array"

Previous to this version, it had been prefaced with the weakening phrase
"By convention."

Carry through and document it the rest of the way.  Allowing argc == 0
has been a source of security issues in the past, and it's hard to
imagine a valid use-case for allowing it.  Toss back EINVAL if we ended
up not copying in any args for *execve().

The manpage change can be considered "Obtained from: OpenBSD"

Reviewed by:	emaste, kib, markj (all previous version)
Differential Revision:	https://reviews.freebsd.org/D34045
2022-01-26 13:40:27 -06:00
..
aarch64 libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
amd64 libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
arm libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
capability Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
compat-43
db tools/build: Don't redefine open() for the linux bootstrap 2021-08-02 14:33:23 +01:00
gdtoa Remove sparc64 specific parts of libc. 2020-02-26 18:55:09 +00:00
gen libc: Teak comment about mips 2022-01-10 10:15:15 -07:00
gmon
i386 libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
iconv libc: Fix "harmless" iconv one-byte overread 2021-12-21 22:47:38 +00:00
include libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
inet
isc
locale libc/locale: Fix races between localeconv(3) and setlocale(3) 2021-09-17 10:47:46 -04:00
md
nameser
net libc: Fix build with -DNS_REREAD_CONF. 2021-12-29 17:01:05 -05:00
nls Implement strerror_l(). 2020-12-16 09:02:09 +00:00
posix1e acl_delete_entry(): remove write-only variable 2021-11-29 17:39:51 +02:00
powerpc libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
powerpc64 libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
powerpcspe [PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask(). 2021-02-28 21:11:29 -06:00
quad Add casts and L suffixes to libc quad support, to work around various 2020-02-17 20:14:59 +00:00
regex libc: Fix regexec when sizeof(char *) > sizeof(long) 2021-12-23 16:38:10 +00:00
resolv res_init: remove unused inet_makeaddr with IN_LOOPBACKNET 2021-11-09 09:33:48 -06:00
riscv libc: Remove _get_tp() and _set_tp(). 2021-12-09 13:23:26 -08:00
rpc libc clnt_com_create: relock rpcsoc_lock earlier when port is obtained from portmapper 2022-01-09 07:36:06 +02:00
secure libc: ssp: sprinkle around some __dead2 2021-09-30 23:55:17 -05:00
softfloat libc: use standard LF line endings, not CRLF 2021-04-03 16:20:07 -04:00
stdio __sflush(): on write error, if nothing was written, reset FILE state back 2022-01-25 17:26:05 +02:00
stdlib qsort.c: prevent undefined behavior 2022-01-13 11:09:38 +01:00
stdtime tzcode: Implement timezone change detection 2021-09-12 03:07:58 +00:00
string libc: correct SPDX tag on strstr.c 2022-01-16 11:56:28 -05:00
sys execve: disallow argc == 0 2022-01-26 13:40:27 -06:00
tests Remove quotes around Makefile .error/.warn/.info strings 2022-01-22 14:03:07 -05:00
uuid uuid(3): Document return values 2021-11-19 03:58:34 -05:00
x86 Make CPU_SET macros compliant with other implementations 2021-12-30 12:20:32 +01:00
xdr typo: s/impelmentation/implementation/. 2020-02-07 15:14:29 +00:00
yp
libc_nossp.ldscript
libc.ldscript
Makefile mips: remove libc 2021-12-31 00:14:53 -07:00
Makefile.depend
Makefile.depend.options Update libssp paths in various Makefile.depend* files 2020-01-06 18:15:55 +00:00
Versions.def Create namespace for the symbols added during 14-CURRENT cycle. 2021-07-15 19:40:28 +03:00