Segmentation fault if HOME not set
Version:
1.2.5-1 from debian bookworm
What is happening:
If HOME is not set I am getting a Segmentation fault.
I am using it in a bash script which I execute using salt-stack therefore the environmen does not contain what someone would expect to be always set.
My command looks like this:
httpdirfs --cache --cache-location /tmp/httpdirfs --single-file-mode https://webserver/file /mnt/file
What do I expect:
Write an error message to stderr and exit whit exit status != 0
Workaround:
Set HOME before running httpdirfs
For example:
HOME=/tmp httpdirfs --cache --cache-location /tmp/httpdirfs --single-file-mode https://webserver/file /mnt/file
That's understandable. I never expected people to use this without a home directory... I will fix this eventually. Feel free to submit a patch though!
I just want to add that the root cause of this problem is this: https://github.com/fangfufu/httpdirfs/blob/e3f8bc2ceb462926f247d8dd35d356b02ca727c6/src/cache.c#L43-L47