[GH-ISSUE #703] Unconditional use of getifaddrs #8101

Closed
opened 2026-06-02 00:35:07 +03:00 by zhus · 1 comment
Owner

Originally created by @myzhang1029 on GitHub (May 11, 2026).
Original GitHub issue: https://github.com/sigoden/dufs/issues/703

Issue: src/main.rs:214 uses getifaddrs unconditionally, even when the input is a fully resolved local address, or a unix domain socket path.

This is a bit inconvenient when trying to secure dufs with things like systemd and seccomp because getifaddrs requires AF_NETLINK.

Solution if possible: can we move the call to inside the ip.is_unspecified branch? I can work on this and make a PR if it sounds good.

Originally created by @myzhang1029 on GitHub (May 11, 2026). Original GitHub issue: https://github.com/sigoden/dufs/issues/703 Issue: [`src/main.rs:214`](https://github.com/sigoden/dufs/blob/b69946df232ceca5d24d0067f2beb6b5ed1c292c/src/main.rs#L214) uses `getifaddrs` unconditionally, even when the input is a fully resolved local address, or a unix domain socket path. This is a bit inconvenient when trying to secure `dufs` with things like systemd and seccomp because `getifaddrs` requires `AF_NETLINK`. Solution if possible: can we move the call to inside the `ip.is_unspecified` branch? I can work on this and make a PR if it sounds good.
zhus closed this issue 2026-06-02 00:35:07 +03:00
Author
Owner

@sigoden commented on GitHub (May 15, 2026):

Sorry for the late response, I welcome you to submit a PR.

<!-- gh-comment-id:4455762235 --> @sigoden commented on GitHub (May 15, 2026): Sorry for the late response, I welcome you to submit a PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#8101