Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stubby: appdata_dir not created by init script #25431

Closed
totkeks opened this issue Nov 22, 2024 · 0 comments · Fixed by #25432
Closed

stubby: appdata_dir not created by init script #25431

totkeks opened this issue Nov 22, 2024 · 0 comments · Fixed by #25432

Comments

@totkeks
Copy link
Contributor

totkeks commented Nov 22, 2024

Maintainer: unknown

Environment: aarch64_cortex-a53, SNAPSHOT r28091-77cfe8fd15, BananaPi R4

Description:
Stubby uses /var/lib/stubby as it's default appdata_dir in the configuration to store the trust anchors or keys or something.

Unfortunately, on my device and probably many others /var/ is located in memory and will be gone after a reboot.

I don't know if there is a common way in OpenWrt to handle this use case, so I just came up with this workaround in /etc/init.d/stubby in start_service():

local appdata_dir
config_get appdata_dir "global" appdata_dir ""

mkdir -p "$appdata_dir"
chown stubby:stubby "$appdata_dir"
chmod 0700 "$appdata_dir"

If there are no other ideas, I would create a pull request for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant