Closed efecanicoz-atlas closed 7 months ago
True, also highly untested territory. Most of the mount/fsck functions in finit.c require fstab to be != NULL, so even if we fix that instance you'd run into others a while later.
Are you trying to run Finit without it handling any fstab/mount/fsck, or is this just a general observation? It's easier for me to understand if you explain a bit about the background, where you're coming from or want to achieve.
It was just an observation, i was having a look about what options we have related to fs mounting. If i understand correctly finit going to try to fetch fstab directory from kernel parameters, right ? Maybe existence checks in fs_mount_all
protects the rest of the finit from having a null.
It was just an observation, i was having a look about what options we have related to fs mounting.
OK, thanks! I'm preparing for a new release so was curious if there was something else to it.
If i understand correctly finit going to try to fetch fstab directory from kernel parameters, right ? Maybe existence checks in
fs_mount_all
protects the rest of the finit from having a null.
Yup, that's right. I'll have a look at the entire chain from configure to all uses in finit.c with your input. Thanks for checking back!
When i set --with-fstab=no configure setting
FINIT_FSTAB
to NULL and atconf_parse_cmdline
in conf.c we pass it tostrdup
. Looks like null strdup is expecting valid string and doesn't handle null as an argument properly.