Skip to content

Commit e861a98

Browse files
committed
Do not mount volatile paths for local Linux targets
These are now mounted when the local Linux target is loaded. (DIS-1965)
1 parent 12b54de commit e861a98

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

acquire/acquire.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from dissect.target import Target, exceptions
2020
from dissect.target.filesystem import Filesystem
21-
from dissect.target.filesystems import dir, ntfs
21+
from dissect.target.filesystems import ntfs
2222
from dissect.target.helpers import fsutil
2323
from dissect.target.loaders.remote import RemoteStreamConnection
2424
from dissect.target.loaders.targetd import TargetdLoader
@@ -281,17 +281,7 @@ class Sys(Module):
281281

282282
@classmethod
283283
def _run(cls, target: Target, cli_args: argparse.Namespace, collector: Collector) -> None:
284-
if not Path("/sys").exists():
285-
log.error("/sys is unavailable! Skipping...")
286-
return
287-
288284
spec = [("dir", "/sys")]
289-
290-
sysfs = dir.DirectoryFilesystem(Path("/sys"))
291-
292-
target.filesystems.add(sysfs)
293-
target.fs.mount("/sys", sysfs)
294-
295285
collector.collect(spec, follow=False, volatile=True)
296286

297287

@@ -303,16 +293,7 @@ class Proc(Module):
303293

304294
@classmethod
305295
def _run(cls, target: Target, cli_args: argparse.Namespace, collector: Collector) -> None:
306-
if not Path("/proc").exists():
307-
log.error("/proc is unavailable! Skipping...")
308-
return
309-
310296
spec = [("dir", "/proc")]
311-
procfs = dir.DirectoryFilesystem(Path("/proc"))
312-
313-
target.filesystems.add(procfs)
314-
target.fs.mount("/proc", procfs)
315-
316297
collector.collect(spec, follow=False, volatile=True)
317298

318299

0 commit comments

Comments
 (0)