diff options
author | hpa <hpa> | 2004-05-29 22:11:23 +0000 |
---|---|---|
committer | hpa <hpa> | 2004-05-29 22:11:23 +0000 |
commit | 975a4c3b343c09a340d95f1a2a4ece3556c57a10 (patch) | |
tree | 6a357b29c4306ff8bd950d176edde228daca64fb | |
parent | 32febd4f574911c90ae2d543f061b33379f200a7 (diff) | |
download | syslinux-975a4c3b343c09a340d95f1a2a4ece3556c57a10.tar.gz |
- Add "allowoptions" command
- Fix the handling of x0x IP addresses
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | isolinux.asm | 1 | ||||
-rw-r--r-- | keywords | 1 | ||||
-rw-r--r-- | keywords.inc | 1 | ||||
-rw-r--r-- | ldlinux.asm | 15 | ||||
-rw-r--r-- | pxelinux.asm | 11 | ||||
-rw-r--r-- | syslinux.doc | 6 | ||||
-rw-r--r-- | ui.inc | 10 |
8 files changed, 37 insertions, 12 deletions
@@ -12,6 +12,10 @@ Changes in 2.10: 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 diff --git a/isolinux.asm b/isolinux.asm index aebc6d4a..04d829ce 100644 --- a/isolinux.asm +++ b/isolinux.asm @@ -1750,6 +1750,7 @@ initrd_ptr dw 0 ; Initial ramdisk pointer/flag 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 @@ -13,6 +13,7 @@ prompt say serial timeout +allowoptions ontimeout onerror f0 diff --git a/keywords.inc b/keywords.inc index 7496dabf..44c64c66 100644 --- a/keywords.inc +++ b/keywords.inc @@ -59,6 +59,7 @@ keywd_table: 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) diff --git a/ldlinux.asm b/ldlinux.asm index 675b3e16..85bace0a 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -214,6 +214,10 @@ TextColorReg resb 17 ; VGA color registers for text mode 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 @@ -1451,6 +1455,7 @@ initrd_ptr dw 0 ; Initial ramdisk pointer/flag 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 @@ -1463,12 +1468,8 @@ linuxauto_cmd db 'linux auto',0 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 ; @@ -1482,6 +1483,6 @@ vgafontbuf equ 0E000h ; 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 diff --git a/pxelinux.asm b/pxelinux.asm index ffbeed12..3b8a818f 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -2034,8 +2034,11 @@ gendotquad: 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 @@ -2044,9 +2047,6 @@ gendotquad: inc di .lt100: - cmp al,10 - jb .lt10 - aam 10 ; Now AH = 10-digit; AL = remainder add ah,'0' @@ -2550,6 +2550,7 @@ initrd_ptr dw 0 ; Initial ramdisk pointer/flag 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 diff --git a/syslinux.doc b/syslinux.doc index 571d0785..e7f58985 100644 --- a/syslinux.doc +++ b/syslinux.doc @@ -211,6 +211,12 @@ IMPLICIT flag_val 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 @@ -215,6 +215,16 @@ clin_is_wsp: and al,al 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] |