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

FS#1052 - dnsmasq hotplug script does not work inside ujail #5993

Open
openwrt-bot opened this issue Oct 9, 2017 · 1 comment
Open

FS#1052 - dnsmasq hotplug script does not work inside ujail #5993

openwrt-bot opened this issue Oct 9, 2017 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Oct 9, 2017

nwf:

Testing b73986a on ipq806x (C2600, specifically), using dnsmasq inside ujail fails to run hotplug events because /lib/functions.sh is unavailable inside the jail:

Mon Oct 9 20:13:53 2017 daemon.debug dnsmasq-script[1]: /sbin/hotplug-call: .: line 6: can't open '/lib/functions.sh'
Mon Oct 9 20:13:53 2017 daemon.warn dnsmasq[1]: script process exited with status 2

Unfortunately, the fix is not as simple as adding /lib/functions.sh to the jail mount, as that results in the uninformative

Mon Oct 9 20:15:35 2017 daemon.warn dnsmasq[1]: script process exited with status 1

Suggestions?

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Dec 4, 2017

nwf:

Having spent some quality time with strace, the answer seems to be that all of these must be bound into the jail as well:

/lib/functions.sh
/bin/ls
/etc/hotplug.d/dhcp
/etc/hotplug.d/tftp
/etc/hotplug.d/neigh

as well as anything actually used by the scripts in /etc/hotplug.d/{dhcp,tftp,neigh}. The first two are requisite for /sbin/hotplug-call's operation; the next three are requisite for this use thereof.

However, the "anything used by" constraint is going to be somewhat trickier to fix in a general manner. Perhaps making the /bin/busybox dispatcher available would be sufficient.

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

No branches or pull requests

1 participant