Skip to content

Commit

Permalink
testing idaholab#266, Malcolm ISO should format bigger drives for ind…
Browse files Browse the repository at this point in the history
…ex and artifact storage
  • Loading branch information
mmguero committed Mar 21, 2024
1 parent 3b94d3c commit 139957b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion shared/bin/os-disk-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,28 @@
OS_MODE_HEDGEHOG,
OS_MODE_MALCOLM,
HEDGEHOG_ZEEK_DIR,
HEDGEHOG_PCAP_DIR,
MALCOLM_DB_DIR,
MALCOLM_PCAP_DIR,
MALCOLM_LOGS_DIR,
)


MINIMUM_DEVICE_BYTES = 'minimum_device_bytes'
MOUNT_ROOT_PATH = 'mount_root_path'
MOUNT_DIRS = 'mount_dirs'
FSTAB_FILE = 'fstab_file'
CRYPTTAB_FILE = 'crypttab_file'
GROUP_OWNER = 'group_owner'
USER_UID = 'user_uid'
DIR_PERMS = 'dir_perms'
SUBDIR_PERMS = 'subdir_perms'
SYSTEM_CONFIG_FILE = 'system_config_file'
CRYPT_KEYFILE = 'crypt_keyfile'
CRYPT_KEYFILE_PERMS = 'crypt_keyfile_perms'
OTHER_FILE_PERMS = 'other_file_perms'
CRYPT_DEV_PREFIX = 'crypt_dev_prefix'

OS_PARAMS = defaultdict(lambda: None)
OS_PARAMS[OS_MODE_HEDGEHOG] = defaultdict(lambda: None)
OS_PARAMS[OS_MODE_MALCOLM] = defaultdict(lambda: None)
Expand Down Expand Up @@ -686,7 +702,7 @@ def main():
eprint(f'Created "{userDir}" for writing by unprivileged user')
for subdir in OS_PARAMS[osMode][MOUNT_DIRS]:
if f"{os.path.sep}{subdir}{os.path.sep}" in userDir:
createdUserDirs[subDir] = userDir
createdUserDirs[subdir] = userDir
break

if (osMode == OS_MODE_HEDGEHOG) and os.path.isfile(OS_PARAMS[osMode][SYSTEM_CONFIG_FILE]):
Expand Down

0 comments on commit 139957b

Please sign in to comment.