Merge pull request #699 from dylanmtaylor/patch-2
Fix luks import so that encryption works correctly
This commit is contained in:
commit
68a1e42cfe
|
|
@ -173,7 +173,7 @@ class Partition:
|
||||||
|
|
||||||
def detect_inner_filesystem(self, password):
|
def detect_inner_filesystem(self, password):
|
||||||
log(f'Trying to detect inner filesystem format on {self} (This might take a while)', level=logging.INFO)
|
log(f'Trying to detect inner filesystem format on {self} (This might take a while)', level=logging.INFO)
|
||||||
from .luks import luks2
|
from ..luks import luks2
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with luks2(self, storage.get('ENC_IDENTIFIER', 'ai') + 'loop', password, auto_unmount=True) as unlocked_device:
|
with luks2(self, storage.get('ENC_IDENTIFIER', 'ai') + 'loop', password, auto_unmount=True) as unlocked_device:
|
||||||
|
|
@ -206,7 +206,7 @@ class Partition:
|
||||||
"""
|
"""
|
||||||
A wrapper function for luks2() instances and the .encrypt() method of that instance.
|
A wrapper function for luks2() instances and the .encrypt() method of that instance.
|
||||||
"""
|
"""
|
||||||
from .luks import luks2
|
from ..luks import luks2
|
||||||
|
|
||||||
handle = luks2(self, None, None)
|
handle = luks2(self, None, None)
|
||||||
return handle.encrypt(self, *args, **kwargs)
|
return handle.encrypt(self, *args, **kwargs)
|
||||||
|
|
@ -274,7 +274,7 @@ class Partition:
|
||||||
self.filesystem = filesystem
|
self.filesystem = filesystem
|
||||||
|
|
||||||
elif filesystem == 'crypto_LUKS':
|
elif filesystem == 'crypto_LUKS':
|
||||||
# from .luks import luks2
|
# from ..luks import luks2
|
||||||
# encrypted_partition = luks2(self, None, None)
|
# encrypted_partition = luks2(self, None, None)
|
||||||
# encrypted_partition.format(path)
|
# encrypted_partition.format(path)
|
||||||
self.filesystem = filesystem
|
self.filesystem = filesystem
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue