Skip to content

Commit

Permalink
VirtualBox shared folders: expect exact match for automation folder name
Browse files Browse the repository at this point in the history
The shared folder for automation usage (`automation` by default) should
only be enabled if it matches exactly the expected name. A folder named
'automations' shouldn't trigger automation, so adjust egrep command
line.

This work was funded by Grml-Forensic.
  • Loading branch information
mika committed Jul 3, 2020
1 parent 289b3ef commit cc3ead1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoconfig.functions
Expand Up @@ -1882,7 +1882,7 @@ if $VIRTUALBOX ; then
vbautomation="$(getbootparam 'vbautomation' 2>>$DEBUG)"
fi

if ! VBoxControl sharedfolder list | egrep -q "^[0-9]+ - ${vbautomation}\s*" ; then
if ! VBoxControl sharedfolder list | egrep -q "^[0-9]+ - ${vbautomation}(\s+|$)" ; then
ewarn "No automount shared folder '$vbautomation' available"
eend 0
else
Expand Down

0 comments on commit cc3ead1

Please sign in to comment.