Skip to content

Add user and group options to DHCP server commands - #411

Open
sherinjasper1506 wants to merge 1 commit into
developfrom
topic/RDKB-66523
Open

sherinjasper1506 wants to merge 1 commit into
developfrom
topic/RDKB-66523

Conversation

@sherinjasper1506

Copy link
Copy Markdown

No description provided.

Copilot AI lite review requested due to automatic review settings September 3, 2026 08:02
@sherinjasper1506
sherinjasper1506 requested review from a team as code owners September 3, 2026 08:02
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

📋 PR Format Reminder

  • Title: Add user and group options to DHCP server commands — expected TICKET-123 : description
    (Multiple tickets OK: RDKCOM-5492 RDKBDEV-3336 : ... | Include US ticket + subtask for user-stories)
  • Description missing:
    • Reason for change
    • Test Procedure
    • Risks (Low / Medium / High)
    • Priority (P0 / P1 / P2)

Expected:

TICKET-123 : brief description

Reason for change: why
Test Procedure: how to verify
Risks: Low / Medium / High
Priority: P0 / P1 / P2

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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=root to several dnsmasq start commands in the XDNS-enabled path.
  • Enables unlimited core dumps via ulimit -c unlimited in 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/--group to 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
Comment on lines +130 to +132
$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
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 this pull request may close these issues.

2 participants