Add user and group options to DHCP server commands - #411
sherinjasper1506 wants to merge 1 commit into
Conversation
|
📋 PR Format Reminder
Expected: |
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
There was a problem hiding this comment.
🟡 Changes recommended
It introduces an unconditional unlimited core-dump setting and applies the stated user/group change inconsistently across startup paths, which can cause operational risk and unclear behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the DHCP server init script that launches dnsmasq, aiming to explicitly pass user/group settings when starting the service.
Changes:
- Adds
--user=root --group=rootto severaldnsmasqstart commands in the XDNS-enabled path. - Enables unlimited core dumps via
ulimit -c unlimitedin the service script.
File summaries
| File | Description |
|---|---|
| source/scripts/init/service.d/service_dhcp_server.sh | Adjusts dnsmasq startup arguments (user/group) and modifies process core-dump limits. |
Review details
Suppressed comments (1)
source/scripts/init/service.d/service_dhcp_server.sh:143
- The PR title suggests adding
--user/--groupto the DHCP server commands, but the non-XDNS path (XDNS_ENABLE != true) still starts dnsmasq without these options. This makes behavior inconsistent depending on XDNS and may not satisfy the stated change.
$SERVER -q --user=root --group=root --clear-on-reload --bind-dynamic --add-mac --add-cpe-id=abcdefgh -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION --stop-dns-rebind --log-facility=/rdklogs/logs/dnsmasq.log #--enable-dbus
fi
fi
else
$SERVER -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION #--enable-dbus
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| UTOPIA_PATH="/etc/utopia/service.d" | ||
|
|
||
| SERVICE_NAME="dhcp_server" | ||
| ulimit -c unlimited |
| $SERVER -q --user=root --group=root --clear-on-reload --bind-dynamic --add-mac --add-cpe-id=abcdefgh -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION --proxy-dnssec --cache-size=0 --xdns-refac-code #--enable-dbus | ||
| else | ||
| $SERVER -q --clear-on-reload --bind-dynamic --add-mac --add-cpe-id=abcdefgh -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION --proxy-dnssec --cache-size=0 --stop-dns-rebind --log-facility=/rdklogs/logs/dnsmasq.log #--enable-dbus | ||
| $SERVER -q --user=root --group=root --clear-on-reload --bind-dynamic --add-mac --add-cpe-id=abcdefgh -P 4096 -C $DHCP_CONF $DNS_ADDITIONAL_OPTION --proxy-dnssec --cache-size=0 --stop-dns-rebind --log-facility=/rdklogs/logs/dnsmasq.log #--enable-dbus |
No description provided.