aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys/execve.2
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit b2c76c41be32)
* execve: disallow argc == 0Kyle Evans2022-02-101-1/+4
| | | | | | | | | | | | | | | | | | | | 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" (cherry picked from commit 773fa8cd136a5775241c3e3a70f1997633ebeedf) (cherry picked from commit c9afc7680f3e1f0510518de9de4264553a31aade)
* libc: Fix most issues reported by mandocGordon Bergling2020-12-191-1/+1
| | | | | | | | | | | | | | - varios "new sentence, new line" warnings - varios "sections out of conventional order" warnings - varios "unusual Xr order" warnings - varios "missing section argument" warnings - varios "no blank before trailing delimiter" warnings - varios "normalizing date format" warnings MFC after: 1 month Notes: svn path=/head/; revision=368817
* Document EINTEGRITY errors for many system calls.John Baldwin2020-03-301-1/+3
| | | | | | | | | | | | | | | | | | | EINTEGRITY was previously documented as a UFS-specific error for mount(2). This documents EINTEGRITY as a filesystem-independent error that may be reported by the backing store of a filesystem. While here, document EIO as a filesystem-independent error for both mount(2) and posix_fadvise(2). EIO was previously only documented for UFS for mount(2). Reviewed by: mckusick Suggested by: mckusick MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24168 Notes: svn path=/head/; revision=359465
* exec{l,v}{e,p} arrived in 7th Edition research Unix to support the Bourne ShellWarner Losh2020-03-241-1/+1
| | | | | | | | which introduced environment variables. Document that here. Verified by consulting the TUHS archive. Notes: svn path=/head/; revision=359284
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Fix exec_imgact_shell()'s handling of two error cases: (1) Previously, ifAlan Cox2010-09-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | the first line of a script exceeded MAXSHELLCMDLEN characters, then exec_imgact_shell() silently truncated the line and passed on the truncated interpreter name or argument. Now, exec_imgact_shell() will fail and return ENOEXEC, which is the commonly used errno among Unix variants for this type of error. (2) Previously, exec_imgact_shell()'s check on the length of the interpreter's name was ineffective. In other words, exec_imgact_shell() could not possibly fail and return ENAMETOOLONG. The reason being that the length of the interpreter name had to exceed MAXSHELLCMDLEN characters in order that ENAMETOOLONG be returned. But, the search for the end of the interpreter name stops after at most MAXSHELLCMDLEN - 2 characters are scanned. (In the end, this particular error is eventually discovered outside of exec_imgact_shell() and ENAMETOOLONG is returned. So, the real effect of this second change is that the error is detected earlier, in exec_imgact_shell().) Update the definition of MAXINTERP to the actual limit on the size of the interpreter name that has been in effect since r142453 (from 2005). In collaboration with: kib Notes: svn path=/head/; revision=212965
* mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to theUlrich Spörlein2010-05-131-24/+24
| | | | | | | | | | | | | | bottom of the manpages and order them consistently. GNU groff doesn't care about the ordering, and doesn't even mention CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put them. Found by: mdocml lint run Reviewed by: ru Notes: svn path=/head/; revision=208027
* Update xrefs from 4.3BSD to modern signal functions in various man pages.Jilles Tjoelker2010-05-061-2/+2
| | | | | | | | | | sigvec(2) references have been updated to sigaction(2), sigsetmask(2) and sigblock(2) to sigprocmask(2), sigpause(2) to sigsuspend(2). Some legacy man pages still refer to them, that is OK. Notes: svn path=/head/; revision=207735
* - Don't suggest opening file for writing in preparation for fexecve(2).Pawel Jakub Dawidek2009-07-051-6/+5
| | | | | | | | | - execve(2)/fexecve(2) won't return ETXTBSY if file is open for reading. Approved by: re (kib) Notes: svn path=/head/; revision=195380
* When calculating arguments to the interpreter for the shebang scriptKonstantin Belousov2008-08-261-1/+18
| | | | | | | | | | | executed by fexecve(2), imgp->args->fname is NULL. Moreover, there is no way to recover the path to the script being executed. Do what some other U*ixes do unconditionally, namely supply /dev/fd/n as the script path when called from fexecve(). Document requirement of having fdescfs mounted as caveat. Notes: svn path=/head/; revision=182191
* Man pages for the openat(2), fexecve(2) and related syscalls.Konstantin Belousov2008-04-161-2/+55
| | | | | | | Reviewed by: ru Notes: svn path=/head/; revision=178245
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* Sort SEE ALSO references (in dictionary order, ignoring case).Ruslan Ermilov2004-07-041-1/+1
| | | | Notes: svn path=/head/; revision=131594
* Eliminate double whitespace.Ruslan Ermilov2004-07-031-1/+1
| | | | Notes: svn path=/head/; revision=131539
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-4/+8
| | | | Notes: svn path=/head/; revision=131504
* mdoc(7) police: "The .Fa argument.".Ruslan Ermilov2002-12-191-1/+3
| | | | Notes: svn path=/head/; revision=108087
* mdoc(7) police: Fixed abuses of the .Ar and .Em macros.Ruslan Ermilov2002-12-181-1/+1
| | | | Notes: svn path=/head/; revision=108040
* mdoc(7) police: Tidy up the syscall language.Ruslan Ermilov2002-12-181-6/+6
| | | | | | | | | | | | | Stop calling system calls "function calls". Use "The .Fn system call" a-la "The .Nm utility". When referring to a non-BSD implementation in the HISTORY section, call syscall a function, to be safe. Notes: svn path=/head/; revision=108028
* Document file descriptor reopening and current standardization status.Garrett Wollman2002-08-071-0/+19
| | | | Notes: svn path=/head/; revision=101480
* The .Fn function.Giorgos Keramidas2002-07-151-2/+6
| | | | Notes: svn path=/head/; revision=100144
* mdoc(7) police: markup the previous delta.Ruslan Ermilov2001-12-041-1/+3
| | | | Notes: svn path=/head/; revision=87359
* Return a more meaningful errno when the length of the interpreterJohn W. De Boskey2001-11-281-0/+3
| | | | | | | | | | | | | | | | exceeds MAXSHELLCMDLEN to avoid secondary /bin/sh execution. Update execve man page to reflect change. Increase MAXSHELLCMDLEN to a slightly more meaningful value. PR: kern/32106 Submitted by: b@etek.chalmers.se Reviewed by: bsd MFC after: 2 weeks Notes: svn path=/head/; revision=87025
* Remove the internal implementation details of wrapping syscalls,Ruslan Ermilov2001-10-261-16/+0
| | | | | | | | | which do not match the reality anyway. Approved by: deischen, bde Notes: svn path=/head/; revision=85555
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-011-1/+1
| | | | Notes: svn path=/head/; revision=84306
* Remove whitespace at EOL.Dima Dorfman2001-07-151-1/+1
| | | | Notes: svn path=/head/; revision=79754
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79531
* mdoc(7) police: remove extraneous .Pp before and/or after .Sh.Dima Dorfman2001-07-091-1/+0
| | | | Notes: svn path=/head/; revision=79454
* mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).Ruslan Ermilov2001-07-061-1/+1
| | | | Notes: svn path=/head/; revision=79366
* mdoc(7) police: Change -filled displays (which just happenRuslan Ermilov2001-02-071-1/+1
| | | | | | | | | to be the same as -ragged in the current implementation) to -ragged. With mdocNG, -filled displays produce the correct output, formatted and justified to both margins. Notes: svn path=/head/; revision=72126
* mdoc(7) police: split punctuation characters + misc fixes.Ruslan Ermilov2001-02-011-1/+1
| | | | Notes: svn path=/head/; revision=71895
* Add reference to elf(5) in addition to already mentioned a.out(5) and add bothMaxim Sobolev2000-11-271-0/+4
| | | | | | | elf(5) and a.out(5) into `SEE ALSO' section. Notes: svn path=/head/; revision=69276
* Avoid use of direct troff requests in mdoc(7) manual pages.Ruslan Ermilov2000-11-101-2/+0
| | | | Notes: svn path=/head/; revision=68575
* Fix description of argv[0] passed to interpreted scripts; it's the name ofBen Smithurst2000-08-051-3/+3
| | | | | | | the interpreter, _not_ the argv[0] passed in the original exec() call. Notes: svn path=/head/; revision=64283
* Use `Er' variable to define first column width in ERRORS section. It wasAlexey Zelkin2000-05-041-1/+1
| | | | | | | initially suggested by mdoc(7) style, but was broken over the years Notes: svn path=/head/; revision=59954
* Introduce ".Lb" macro to libc manpages.Alexey Zelkin2000-04-211-0/+2
| | | | | | | More libraries manpages updates following. Notes: svn path=/head/; revision=59460
* Remove single-space hard sentence breaks. These degrade the qualitySheldon Hearn2000-03-021-1/+2
| | | | | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc. Notes: svn path=/head/; revision=57686
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Various man page cleanup:Mike Pritchard1999-08-151-4/+4
| | | | | | | | | | | | | - Sort xrefs - FreeBSD.ORG -> FreeBSD.org - Be consistent with section names as outlines in mdoc(7) - Other misc mdoc cleanup. PR: doc/13144 Submitted by: Alexy M. Zelkin <phantom@cris.net> Notes: svn path=/head/; revision=49828
* Change reference to mount(1) to mount(8)Chris Costello1999-08-141-2/+2
| | | | Notes: svn path=/head/; revision=49709
* Mention that set-id bits are not honoured for shell scripts andTim Vanderhoek1999-04-271-1/+8
| | | | | | | | | | filesystems with the "nosuid" option. Mention that syscall tracing is disabled sometimes. PR: misc/11328 Notes: svn path=/head/; revision=46107
* Document that arg max is controllable via sysctl.Alexander Langer1998-01-111-5/+7
| | | | Notes: svn path=/head/; revision=32447
* execve of interpreter filesAdam David1997-07-081-2/+2
| | | | | | | reword for grammar/clarity Notes: svn path=/head/; revision=27280
* Cleanup some of the Lite2 merge. Most of it is mdoc cleanup,Mike Pritchard1997-03-121-10/+5
| | | | | | | | | | | but in one case the Lite2 changes were flat out wrong and caused the man page to disagree with a header file. There are still some *roff macro calls that were added that I have yet to figure out what to do with in some of the man pages. Notes: svn path=/head/; revision=23778
* Merge from Lite2 onto mainline -Peter Wemm1997-03-111-7/+14
| | | | | | | | - add undelete() and undelete.2 (requires libc minor bump some time) - man page updates Notes: svn path=/head/; revision=23660
* Remove the EINVAL error from the ERRORS sections thatMike Pritchard1997-01-111-2/+0
| | | | | | | | say is means that a pathname had the high-order bit set, since this is no longer an error. Notes: svn path=/head/; revision=21570
* Update a bunch of man pages to use .Fn insteadMike Pritchard1996-08-221-1/+1
| | | | | | | of .Nm when referencing funciton names. Notes: svn path=/head/; revision=17780
* NCARGS is defined as 65536 in the released system, not 20480.Mike Pritchard1996-08-151-1/+1
| | | | Notes: svn path=/head/; revision=17615
* Fixed various problems: typos, grammer, missing include filesMike Pritchard1996-05-231-1/+1
| | | | | | | | wrong function type declarations, and wrong argument type declarations. Notes: svn path=/head/; revision=15874
* Correct a bunch of man page cross references and generallyMike Pritchard1996-02-111-1/+2
| | | | | | | | | try and silence "manck". ncurses, rpc, and some of the gnu stuff are still a big mess, however. Notes: svn path=/head/; revision=14038