1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/sys/sys
Alan Cox 8f7f5a7f26 Fix exec_imgact_shell()'s handling of two error cases: (1) Previously, if
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
2010-09-21 16:24:51 +00:00
..
_bus_dma.h
_iovec.h
_lock.h
_lockmgr.h
_mutex.h
_null.h
_pthreadtypes.h
_rmlock.h rmlock(9) two additions and one change/fix: 2010-09-01 19:50:03 +00:00
_rwlock.h
_semaphore.h
_sigset.h
_sockaddr_storage.h
_stack.h
_sx.h
_task.h Fix taskqueue_drain(9) to not have false negatives. For threaded 2010-07-22 16:41:09 +00:00
_termios.h
_timespec.h Rename st_*timespec fields to st_*tim for POSIX 2008 compliance. 2010-03-28 13:13:22 +00:00
_timeval.h
_types.h
_umtx.h
aac_ioctl.h
acct.h
acl.h First step at adopting FreeBSD to support PSARC/2010/029. This makes 2010-09-20 17:10:06 +00:00
agpio.h
aio.h
alq.h - Rework the underlying ALQ storage to be a circular buffer, which amongst other 2010-04-26 13:48:22 +00:00
apm.h
assym.h
ata.h
bio.h Correct bioq_disksort so that bioq_insert_tail() offers barrier semantic. 2010-09-02 19:40:28 +00:00
bitstring.h
blist.h
buf_ring.h Switch to our preferred 2-clause BSD license. 2010-05-05 20:39:02 +00:00
buf.h Add INVARIANTS checking that numfreebufs values are sane. Also add a 2010-06-11 17:03:26 +00:00
bufobj.h
bus_dma.h
bus.h bus_add_child: change type of order parameter to u_int 2010-09-10 11:19:03 +00:00
callout.h Make kern_tc.c provide minimum frequency of tc_ticktock() calls, required 2010-09-14 08:48:06 +00:00
cdefs.h Use private namespace for visibility keyword. 2010-08-27 09:55:51 +00:00
cdio.h
cdrio.h
cfictl.h
chio.h
clock.h
condvar.h
conf.h Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that created 2010-08-06 09:42:15 +00:00
cons.h
consio.h
copyright.h Remove trailing whitespace. 2010-09-02 14:05:32 +00:00
cpu.h
cpuctl.h
cpuset.h
ctype.h
dataacq.h
device_port.h
devicestat.h
digiio.h
dir.h
dirent.h
disk.h Remove spurious '/*-' marks and fix some other style problems. 2010-07-22 05:42:29 +00:00
disklabel.h
diskmbr.h Add NTFS partition type to GEOM_MBR. 2010-06-26 13:20:40 +00:00
diskpc98.h
dkstat.h
domain.h
dtrace_bsd.h Add the necessary DTrace function pointers. 2010-08-25 12:35:36 +00:00
dvdio.h
elf32.h
elf64.h
elf_common.h Add DF_1_LOADFLTR. 2010-09-12 17:55:56 +00:00
elf_generic.h
elf.h
endian.h Fix some way-past-brucification complaints from FlexeLint. 2010-05-20 06:16:13 +00:00
errno.h
eui64.h
event.h
eventhandler.h I added vfs_lowvnodes event, but it was only used for a short while and now 2010-05-11 22:46:36 +00:00
eventvar.h
exec.h
extattr.h
fail.h
fbio.h
fcntl.h
fdcio.h
file.h Apply band-aid around function-like macro fdrop() without turning it into 2010-06-11 23:38:25 +00:00
filedesc.h
filio.h
firmware.h
fnv_hash.h
gmon.h
gpt.h
hash.h
iconv.h Switch to our preferred 2-clause BSD license. 2010-04-07 16:50:38 +00:00
imgact_aout.h
imgact_elf.h Reword the comment, fixing typo. 2010-07-24 14:23:06 +00:00
imgact.h Supply some useful information to the started image using ELF aux vectors. 2010-08-17 08:55:45 +00:00
inflate.h
interrupt.h
ioccom.h IOCPARM_MAX defines maximum size of a structure that can be passed 2010-04-01 16:21:35 +00:00
ioctl_compat.h
ioctl.h
ipc.h
ipmi.h
jail.h
joystick.h
kbio.h
kdb.h
kenv.h
kernel.h - Implement MI helper functions, dividing one or two timer interrupts with 2010-05-24 11:40:49 +00:00
kerneldump.h
kobj.h
ksem.h
ksyms.h
kthread.h Remove spurious '/*-' marks and fix some other style problems. 2010-07-22 05:42:29 +00:00
ktr.h Remove extra commas from KTR_EVENT4() macro to match number of CTR6() args. 2010-07-24 10:07:17 +00:00
ktrace.h Remove an unused macro. exit1() invokes ktrprocexit() directly. 2010-08-19 15:55:50 +00:00
libkern.h Provide memchr() in the libkern. 2010-06-02 17:27:23 +00:00
limits.h
link_aout.h
link_elf.h Introduce implementation-private rtld interface _rtld_addr_phdr, which 2010-08-23 15:27:03 +00:00
linker_set.h
linker.h
lock_profile.h
lock.h Protect BSDI $Id from accidental manipulation. 2010-09-10 06:26:28 +00:00
lockf.h
lockmgr.h Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and 2010-08-20 19:46:50 +00:00
lockstat.h
mac.h
malloc.h Add MALLOC_DEBUG_MAXZONES debug malloc(9) option to use multiple uma 2010-07-28 15:36:12 +00:00
mbpool.h
mbuf.h MFp4: anchie_soc2009 branch: 2010-08-19 11:31:03 +00:00
mchain.h Switch to our preferred 2-clause BSD license. 2010-04-07 16:50:38 +00:00
md4.h
md5.h
mdioctl.h
memrange.h
mman.h Add the MAP_PREFAULT_READ option to mmap(2). 2010-08-28 16:57:07 +00:00
module.h
mount.h Rename the field to not confuse readers. The bytes are actually used. 2010-09-14 18:58:51 +00:00
mouse.h
mpt_ioctl.h
mqueue.h
msg.h
msgbuf.h
mtio.h
mutex.h
namei.h
nlist_aout.h Make the char *n_name member of struct nlist 'const'. 2010-06-10 14:19:51 +00:00
osd.h
param.h Fix exec_imgact_shell()'s handling of two error cases: (1) Previously, if 2010-09-21 16:24:51 +00:00
pciio.h
pcpu.h sys/pcpu.h: remove a workaround for a fixed ld bug 2010-09-15 10:02:46 +00:00
pioctl.h
pipe.h
pmc.h Set the comment at the right place for PMC uncore classes. 2010-06-15 09:12:31 +00:00
pmckern.h
pmclog.h
poll.h
posix4.h Add a facility to dynamically adjust or unconfigure p1003_1b mib. 2010-06-02 09:59:05 +00:00
power.h
priority.h
priv.h Fix typo in comment. 2010-07-20 11:20:45 +00:00
proc.h Adopt the deferring of object deallocation for the deleted map entries 2010-09-18 15:03:31 +00:00
procfs.h
protosw.h
ptio.h
ptrace.h Extend ptrace(PT_LWPINFO) to report siginfo for the signal that caused 2010-07-04 11:48:30 +00:00
queue.h
random.h
reboot.h
refcount.h
regression.h
resource.h Style fix - keep the line length below 80 characters. 2010-07-18 11:13:36 +00:00
resourcevar.h Revert r210225 - turns out I was wrong; the "/*-" is not license-only 2010-07-18 20:57:53 +00:00
rman.h
rmlock.h rmlock(9) two additions and one change/fix: 2010-09-01 19:50:03 +00:00
rtprio.h
runq.h
rwlock.h
sbuf.h Replace sbuf_overflowed() with sbuf_error(), which returns any error 2010-09-10 16:42:16 +00:00
sched.h Refactor timer management code with priority to one-shot operation mode. 2010-09-13 07:25:35 +00:00
sdt.h Add an extra comment to the SDT probes definition. This allows us to get 2010-08-22 11:18:57 +00:00
select.h
selinfo.h
sem.h
sema.h
serial.h
sf_buf.h
sglist.h
shm.h
sigio.h
signal.h Add a trap code for DTrace induced traps. 2010-08-24 13:11:24 +00:00
signalvar.h - Various style and whitespace fixes. 2010-07-08 19:15:26 +00:00
sleepqueue.h
smp.h Add helper macros to iterate over available CPUs in the system. 2010-06-11 15:56:18 +00:00
snoop.h
sockbuf.h
socket.h
socketvar.h With reworking of the socket life cycle in 7.x, the need for a "sotryfree()" 2010-09-18 11:18:42 +00:00
sockio.h
sockopt.h
sockstate.h
soundcard.h
stack.h
stat.h Rename st_*timespec fields to st_*tim for POSIX 2008 compliance. 2010-03-28 13:13:22 +00:00
statvfs.h
stddef.h
stdint.h
sun_disklabel.h
sx.h
syscall.h Regen 2010-08-30 14:26:02 +00:00
syscall.mk Regen 2010-08-30 14:26:02 +00:00
syscallsubr.h Move prototypes for kern_sigtimedwait() and kern_sigprocmask() to 2010-06-30 18:03:42 +00:00
sysctl.h Re-add r212370 now that the LOR in powerpc64 has been resolved: 2010-09-16 16:13:12 +00:00
sysent.h Kernel DTrace support for: 2010-08-22 10:53:32 +00:00
syslimits.h
syslog.h
sysproto.h Regen 2010-08-30 14:26:02 +00:00
systm.h Refactor timer management code with priority to one-shot operation mode. 2010-09-13 07:25:35 +00:00
taskqueue.h Fix taskqueue_drain(9) to not have false negatives. For threaded 2010-07-22 16:41:09 +00:00
termios.h
thr.h Make this file more C++ friendly. 2010-04-20 17:57:43 +00:00
tiio.h
time.h Add few more bintime math macros. 2010-09-08 20:09:50 +00:00
timeb.h
timeet.h Refactor timer management code with priority to one-shot operation mode. 2010-09-13 07:25:35 +00:00
timepps.h
timers.h
times.h
timespec.h Rename st_*timespec fields to st_*tim for POSIX 2008 compliance. 2010-03-28 13:13:22 +00:00
timetc.h Make kern_tc.c provide minimum frequency of tc_ticktock() calls, required 2010-09-14 08:48:06 +00:00
timex.h
tree.h
tty.h
ttycom.h
ttydefaults.h
ttydevsw.h
ttydisc.h
ttyhook.h
ttyqueue.h
turnstile.h
types.h Remove spurious '/*-' marks and fix some other style problems. 2010-07-22 05:42:29 +00:00
ucontext.h
ucred.h
uio.h
umtx.h
un.h
unistd.h Indicate that POSIX semaphores are always supported. 2010-09-19 12:01:50 +00:00
unpcb.h
user.h Add the support for reporting the NOCOREDUMP flag from 2010-05-27 08:10:12 +00:00
utsname.h
uuid.h
vmmeter.h Push down the page queues into vm_page_cache(), vm_page_try_to_cache(), and 2010-05-08 20:34:01 +00:00
vnode.h Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and 2010-08-20 19:46:50 +00:00
vtoc.h - In gpart_bootfile_read() fix an off-by-one error preventing the bootstrap 2010-06-03 13:01:55 +00:00
wait.h
watchdog.h