Skip to content

labgrid-raw-interface: Add permissions#1808

Open
JoshuaWatt wants to merge 1 commit intolabgrid-project:masterfrom
JoshuaWatt:raw-interface-permissions
Open

labgrid-raw-interface: Add permissions#1808
JoshuaWatt wants to merge 1 commit intolabgrid-project:masterfrom
JoshuaWatt:raw-interface-permissions

Conversation

@JoshuaWatt
Copy link
Copy Markdown
Contributor

Adds support for the helper.yaml file to specify which subcommands users are allowed to execute using labgrid-raw-interface. Denied commands will fail with an error.

The RawNetworkInterfaceDriver is updated to query if the ip command is allowed before attemping to bring the interface up and down on activate/deactivate. This prevents it from erroring out if this behavior is not allowed

Description

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.7%. Comparing base (bfb6ff2) to head (5316793).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/driver/rawnetworkinterfacedriver.py 0.0% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1808     +/-   ##
========================================
- Coverage    46.7%   46.7%   -0.1%     
========================================
  Files         179     179             
  Lines       14202   14204      +2     
========================================
  Hits         6645    6645             
- Misses       7557    7559      +2     
Flag Coverage Δ
3.10 46.7% <0.0%> (-0.1%) ⬇️
3.11 46.7% <0.0%> (-0.1%) ⬇️
3.12 46.7% <0.0%> (-0.1%) ⬇️
3.13 46.7% <0.0%> (-0.1%) ⬇️
3.14 46.7% <0.0%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Adds support for the helper.yaml file to specify which subcommands
users are allowed to execute using labgrid-raw-interface. Denied
commands will fail with an error.

The RawNetworkInterfaceDriver is updated to query if the `ip` command is
allowed before attemping to bring the interface up and down on
activate/deactivate. This prevents it from erroring out if this behavior
is not allowed

Signed-off-by: Joshua Watt <Joshua.Watt@garmin.com>
@Emantor Emantor force-pushed the raw-interface-permissions branch from 3b71b31 to 5316793 Compare March 28, 2026 13:36
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.

1 participant