home start up prev next

9.4. Secure labeling with VBoxSDL

Когда гостевая операционная система работает в полноэкранном режиме, то гостевая система получает контроль всей рабочей зоной монитора. Это может приводить к некоторому риску, поскольку пользователь может спутать экраны гостевой и хост системы или поверх окна гостевой системы могут выводится диалоговые сообщения операционной системы хоста.

Для защиты пользователя от этих рисков, была разработана функция маркеров безопасности. Данный функционал доступен в настоящее время только для VBoxSDL. При ее включении, часть области экрана выделяется для показа определяемых пользователем сообщений (меток). В VBoxSDL высота метки установлена в 20 пикселей . Цвет шрифта и фона могут быть произвольно установлены как шестнадцатеричные значения цвета RGB. Используется следующий синтаксис команды для включения маркеров безопасности:

VBoxSDL --startvm VMNAME
      --securelabel --seclabelfnt ~/fonts/arial.ttf
      --seclabelsiz 14 --seclabelfgcol 00FF00 --seclabelbgcol 00FFFF

Здесь дополнительно устанавливается также шрифт меток. Для указания другого размера шрифта, используется параметр --seclabelsiz .

Текст маркера может быть установлен командой

VBoxManage setextradata VMNAME "VBoxSDL/SecureLabel" "The Label"

Эта команда приводит к немедленному изменению маркера.

Как правило, разрешение полноэкранного режима ограничено "стандартным" размером 1024 x 768. Increasing this by twenty lines is not usually feasible, so in most cases, VBoxSDL will chose the next higher resolution, e.g. 1280 x 1024 and the guest's screen will not cover the whole display surface. If VBoxSDL is unable to choose a higher resolution, the secure label will be painted on top of the guest's screen surface. In order to address the problem of the bottom part of the guest screen being hidden, VBoxSDL can provide custom video modes to the guest that are reduced by the height of the label. For Windows guests and recent Solaris and Linux guests, the VirtualBox Guest Additions automatically provide the reduced video modes. Additionally, the VESA BIOS has been adjusted to duplicate its standard mode table with adjusted resolutions. The adjusted mode IDs can be calculated using the following formula:

reduced_modeid = modeid + 0x30

For example, in order to start Linux with 1024 x 748 x 16, the standard mode 0x117 (1024 x 768 x 16) is used as a base. The Linux video mode kernel parameter can then be calculated using:

vga = 0x200 | 0x117 + 0x30
vga = 839

The reason for duplicating the standard modes instead of only supplying the adjusted modes is that most guest operating systems require the standard VESA modes to be fixed and refuse to start with different modes.

When using the X.org VESA driver, custom modelines have to be calculated and added to the configuration (usually in /etc/X11/xorg.conf . A handy tool to determine modeline entries can be found at http://www.tkk.fi/Misc/Electronics/faq/vga2rgb/calc.html .)

home start up prev next
Сайт создан в системе uCoz