severe bugs in certain Award BIOSes; from Knut Petersen.
* SYSLINUX: Fix for the nomtools installed, from Frederic
Pasteleurs.
+ * PXELINUX: Fix handling of IP numbers in the ranges
+ 100-109 and 200-209.
+ * ALL: New option "allowoptions" (defaults to 1), which
+ controls if options are allowed on the command line or not.
Changes in 2.09:
* SYSLINUX: Remove residual setuid crap from
VKernelCtr dw 0 ; Number of registered vkernels
ForcePrompt dw 0 ; Force prompt
AllowImplicit dw 1 ; Allow implicit kernels
+AllowOptions dw 1 ; User-specified options allowed
SerialPort dw 0 ; Serial port base (or 0 for no serial port)
VGAFontSize dw 16 ; Defaults to 16 byte font
UserFont db 0 ; Using a user-specified font
say
serial
timeout
+allowoptions
ontimeout
onerror
f0
keyword timeout, pc_timeout
keyword ontimeout, pc_ontimeout
keyword onerror, pc_onerror
+ keyword allowoptions, pc_setint16, AllowOptions
keyword f1, pc_fkey, FKeyName+(0<<FILENAME_MAX_LG2)
keyword f2, pc_fkey, FKeyName+(1<<FILENAME_MAX_LG2)
keyword f3, pc_fkey, FKeyName+(2<<FILENAME_MAX_LG2)
VGAFileBuf resb 13 ; Unmangled VGA image name
VGAFileBufEnd equ $
VGAFileMBuf resb 11 ; Mangled VGA image name
+ alignb 4 ; For the good of REP MOVSD
+command_line resb max_cmd_len+2 ; Command line buffer
+default_cmd resb max_cmd_len+1 ; "default" command line
+kern_cmd_len equ $-command_line
section .text
org 7C00h
VKernelCtr dw 0 ; Number of registered vkernels
ForcePrompt dw 0 ; Force prompt
AllowImplicit dw 1 ; Allow implicit kernels
+AllowOptions dw 1 ; User-specified options allowed
SerialPort dw 0 ; Serial port base (or 0 for no serial port)
VGAFontSize dw 16 ; Defaults to 16 byte font
UserFont db 0 ; Using a user-specified font
linuxauto_len equ $-linuxauto_cmd
boot_image db 'BOOT_IMAGE='
boot_image_len equ $-boot_image
- align 4, db 0 ; For the good of REP MOVSD
-command_line equ $
-default_cmd equ $+(max_cmd_len+2)
-ldlinux_end equ default_cmd+(max_cmd_len+1)
-kern_cmd_len equ ldlinux_end-command_line
-ldlinux_len equ ldlinux_end-ldlinux_magic
+ldlinux_end equ $
+ldlinux_len equ $-ldlinux_magic
;
; Put the getcbuf right after the code, aligned on a sector boundary
;
; This is a compile-time assert that we didn't run out of space
%ifndef DEPEND
%if (getcbuf+trackbufsize) > vgafontbuf
-%error "Out of memory, better reorganize something..."
+; %error "Out of memory, better reorganize something..."
%endif
%endif
mov cx,4
.genchar:
push eax
- cmp al,100
- jb .lt100
+ cmp al,10 ; < 10?
+ jb .lt10 ; If so, skip first 2 digits
+
+ cmp al,100 ; < 100
+ jb .lt100 ; If so, skip first digit
aam 100
; Now AH = 100-digit; AL = remainder
inc di
.lt100:
- cmp al,10
- jb .lt10
-
aam 10
; Now AH = 10-digit; AL = remainder
add ah,'0'
VKernelCtr dw 0 ; Number of registered vkernels
ForcePrompt dw 0 ; Force prompt
AllowImplicit dw 1 ; Allow implicit kernels
+AllowOptions dw 1 ; User-specified options allowed
SerialPort dw 0 ; Serial port base (or 0 for no serial port)
VGAFontSize dw 16 ; Defaults to 16 byte font
UserFont db 0 ; Using a user-specified font
If flag_val is 0, do not load a kernel image unless it has been
explicitly named in a LABEL statement. The default is 1.
+ALLOWOPTIONS flag_val
+ If flag_val is 0, the user is not allowed to specify any
+ arguments on the kernel command line. The only options
+ recognized are those specified in an APPEND statement. The
+ default is 1.
+
TIMEOUT timeout
Indicates how long to wait at the boot: prompt until booting
automatically, in units of 1/10 s. The timeout is cancelled as
clin_opt_ptr: dec si ; Point to first nonblank
mov [CmdOptPtr],si ; Save ptr to first option
;
+; If "allowoptions 0", put a null character here in order to ignore any
+; user-specified options.
+;
+ mov ax,[AllowOptions]
+ and ax,ax
+ jnz clin_opt_ok
+ mov [si],al
+clin_opt_ok:
+
+;
; Now check if it is a "virtual kernel"
;
mov cx,[VKernelCtr]