Page MenuHomeFreeBSD

geom: Check file flags before handling control request
AcceptedPublic

Authored by des on Fri, Sep 11, 2:51 PM.

Details

Summary

Pass fflag down to g_ctl_req() and:

  • Refuse all requests unless fflag has the FREAD bit set
  • Refuse all but getxml unless fflag also has the FWRITE bit set

This should allow us to restore read access to /dev/geom.ctl for group
operator; they will then be able to run gpart list or gpart backup
but not commands that actually modify the table.

MFC after: 1 week
Event: EuroBSDCon 2026 DevSummit

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76776
Build 73659: arc lint + arc unit