summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/execve.2
Commit message (Collapse)AuthorAgeFilesLines
* Fix exec_imgact_shell()'s handling of two error cases: (1) Previously, ifalc2010-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
* mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to theuqs2010-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
* Update xrefs from 4.3BSD to modern signal functions in various man pages.jilles2010-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.
* - Don't suggest opening file for writing in preparation for fexecve(2).pjd2009-07-051-6/+5
| | | | | | - execve(2)/fexecve(2) won't return ETXTBSY if file is open for reading. Approved by: re (kib)
* When calculating arguments to the interpreter for the shebang scriptkib2008-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.
* Man pages for the openat(2), fexecve(2) and related syscalls.kib2008-04-161-2/+55
| | | | Reviewed by: ru
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-091-4/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* Sort SEE ALSO references (in dictionary order, ignoring case).ru2004-07-041-1/+1
|
* Eliminate double whitespace.ru2004-07-031-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-4/+8
|
* mdoc(7) police: "The .Fa argument.".ru2002-12-191-1/+3
|
* mdoc(7) police: Fixed abuses of the .Ar and .Em macros.ru2002-12-181-1/+1
|
* mdoc(7) police: Tidy up the syscall language.ru2002-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.
* Document file descriptor reopening and current standardization status.wollman2002-08-071-0/+19
|
* The .Fn function.keramida2002-07-151-2/+6
|
* mdoc(7) police: markup the previous delta.ru2001-12-041-1/+3
|
* Return a more meaningful errno when the length of the interpreterjwd2001-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
* Remove the internal implementation details of wrapping syscalls,ru2001-10-261-16/+0
| | | | | | which do not match the reality anyway. Approved by: deischen, bde
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-011-1/+1
|
* Remove whitespace at EOL.dd2001-07-151-1/+1
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* mdoc(7) police: remove extraneous .Pp before and/or after .Sh.dd2001-07-091-1/+0
|
* mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).ru2001-07-061-1/+1
|
* mdoc(7) police: Change -filled displays (which just happenru2001-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.
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-1/+1
|
* Add reference to elf(5) in addition to already mentioned a.out(5) and add bothsobomax2000-11-271-0/+4
| | | | elf(5) and a.out(5) into `SEE ALSO' section.
* Avoid use of direct troff requests in mdoc(7) manual pages.ru2000-11-101-2/+0
|
* Fix description of argv[0] passed to interpreted scripts; it's the name ofben2000-08-051-3/+3
| | | | the interpreter, _not_ the argv[0] passed in the original exec() call.
* Use `Er' variable to define first column width in ERRORS section. It wasphantom2000-05-041-1/+1
| | | | initially suggested by mdoc(7) style, but was broken over the years
* Introduce ".Lb" macro to libc manpages.phantom2000-04-211-0/+2
| | | | More libraries manpages updates following.
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-021-1/+2
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Various man page cleanup:mpp1999-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>
* Change reference to mount(1) to mount(8)chris1999-08-141-2/+2
|
* Mention that set-id bits are not honoured for shell scripts andhoek1999-04-271-1/+8
| | | | | | | filesystems with the "nosuid" option. Mention that syscall tracing is disabled sometimes. PR: misc/11328
* Document that arg max is controllable via sysctl.alex1998-01-111-5/+7
|
* execve of interpreter filesadam1997-07-081-2/+2
| | | | reword for grammar/clarity
* Cleanup some of the Lite2 merge. Most of it is mdoc cleanup,mpp1997-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.
* Merge from Lite2 onto mainline -peter1997-03-111-7/+14
| | | | | - add undelete() and undelete.2 (requires libc minor bump some time) - man page updates
* Remove the EINVAL error from the ERRORS sections thatmpp1997-01-111-2/+0
| | | | | say is means that a pathname had the high-order bit set, since this is no longer an error.
* Update a bunch of man pages to use .Fn insteadmpp1996-08-221-1/+1
| | | | of .Nm when referencing funciton names.
* NCARGS is defined as 65536 in the released system, not 20480.mpp1996-08-151-1/+1
|
* Fixed various problems: typos, grammer, missing include filesmpp1996-05-231-1/+1
| | | | | wrong function type declarations, and wrong argument type declarations.
* Correct a bunch of man page cross references and generallympp1996-02-111-1/+2
| | | | | | try and silence "manck". ncurses, rpc, and some of the gnu stuff are still a big mess, however.
* Reviewed by: julian and (hsu?)julian1996-01-221-0/+17
| | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+261
OpenPOWER on IntegriCloud