Skip to content
Snippets Groups Projects
Commit bf1cd6bd authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

mount with nosymfollow

Fixing security bug when operating untrusted vms
parent e14e889d
No related branches found
No related tags found
No related merge requests found
......@@ -317,7 +317,7 @@ def create_from_img(ucred: Ucred, target: str, new_ssh: bool = True, target_name
mount_dir = target_dir+"mount/"
os.mkdir(mount_dir)
r('mount', '-o', 'loop,offset=210763776', '--type', 'ext4', target_dir+'img', mount_dir)
r('mount', '-o', 'nosymfollow,loop,offset=210763776', '--type', 'ext4', target_dir+'img', mount_dir)
try:
with open(mount_dir+"/etc/hostname", "w") as f: f.write(target_name+"\n")
if new_ssh:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment