Skip to content

python3/usb_scan: Read policy rules from drop-in directory - #7253

Open
gthvn1 wants to merge 1 commit into
xapi-project:masterfrom
xcp-ng:gtn-usb-policy-dropin
Open

python3/usb_scan: Read policy rules from drop-in directory#7253
gthvn1 wants to merge 1 commit into
xapi-project:masterfrom
xcp-ng:gtn-usb-policy-dropin

Conversation

@gthvn1

@gthvn1 gthvn1 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

/etc/xensource/usb-policy.conf is owned by the RPM manager. A customer who edits it to allow/deny some USB devices loses their changes on the next RPM uprade.

usb_scan.py now also reads any *.conf files found in /etc/xensource/usb-policy.conf.d, in alphabetical order before it reads the main policy file. Since the first match wins the user rule always override the main file rule. If the drop-in dir doesn't exist, behaviour is unchanged.

Tracking-reference: XCPNG-2952

@gthvn1
gthvn1 force-pushed the gtn-usb-policy-dropin branch from 0316747 to d9aa4ef Compare September 4, 2026 14:54
/etc/xensource/usb-policy.conf is owned by the RPM manager. A customer who
edits it to allow/deny some USB devices loses their changes on the next RPM
uprade.

usb_scan.py now also reads any *.conf files found in
/etc/xensource/usb-policy.conf.d, in alphabetical order before it reads the
main policy file. Since the first match wins the user rule always override the
main file rule. If the drop-in dir doesn't exist, behaviour is unchanged.

Tracking-reference: XCPNG-2952
Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@vates.tech>
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