From b62f2325ba2bc4cfacf9d4ce1db6fd37cd966f9c Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 4 Mar 2008 18:16:30 +0000 Subject: [PXEXT] Add PXENV_FILE_EXEC call to PXE extensions API. This allows pxelinux to execute arbitrary gPXE commands. This is remarkably unsafe (not least because some of the commands will assume full ownership of memory and do nasty things like edit the e820 map underneath the calling pxelinux), but it does allow access to the "sanboot" command. --- src/arch/i386/interface/pxe/pxe_call.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/arch') diff --git a/src/arch/i386/interface/pxe/pxe_call.c b/src/arch/i386/interface/pxe/pxe_call.c index 8f1dd0a22..b9c21ce55 100644 --- a/src/arch/i386/interface/pxe/pxe_call.c +++ b/src/arch/i386/interface/pxe/pxe_call.c @@ -96,6 +96,7 @@ union pxenv_call { PXENV_EXIT_t ( * file_select ) ( struct s_PXENV_FILE_SELECT * ); PXENV_EXIT_t ( * file_read ) ( struct s_PXENV_FILE_READ * ); PXENV_EXIT_t ( * get_file_size ) ( struct s_PXENV_GET_FILE_SIZE * ); + PXENV_EXIT_t ( * file_exec ) ( struct s_PXENV_FILE_EXEC * ); }; /** @@ -294,6 +295,10 @@ __cdecl void pxe_api_call ( struct i386_all_regs *ix86 ) { pxenv_call.get_file_size = pxenv_get_file_size; param_len = sizeof ( pxenv_any.get_file_size ); break; + case PXENV_FILE_EXEC: + pxenv_call.file_exec = pxenv_file_exec; + param_len = sizeof ( pxenv_any.file_exec ); + break; default: DBG ( "PXENV_UNKNOWN_%hx", opcode ); pxenv_call.unknown = pxenv_unknown; -- cgit v1.2.3-55-g7522