github.com/rigado/snapd@v2.42.5-go-mod+incompatible/interfaces/builtin/intel_mei.go (about)

     1  // -*- Mode: Go; indent-tabs-mode: t -*-
     2  
     3  /*
     4   * Copyright (C) 2019 Canonical Ltd
     5   *
     6   * This program is free software: you can redistribute it and/or modify
     7   * it under the terms of the GNU General Public License version 3 as
     8   * published by the Free Software Foundation.
     9   *
    10   * This program is distributed in the hope that it will be useful,
    11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
    12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13   * GNU General Public License for more details.
    14   *
    15   * You should have received a copy of the GNU General Public License
    16   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17   *
    18   */
    19  
    20  package builtin
    21  
    22  // Details about Intel MEI can be found here:
    23  // https://www.kernel.org/doc/Documentation/misc-devices/mei/mei.txt
    24  
    25  const intelMEISummary = `allows access to the Intel MEI management interface`
    26  
    27  const intelMEIBaseDeclarationSlots = `
    28    intel-mei:
    29      allow-installation:
    30        slot-snap-type:
    31          - core
    32      deny-auto-connection: true
    33  `
    34  
    35  const intelMEIConnectedPlugAppArmor = `
    36  # Description: Allow access to the Intel MEI management interface.
    37  /dev/mei[0-9]* rw,
    38  `
    39  
    40  var intelMEIConnectedPlugUDev = []string{`SUBSYSTEM=="mei"`}
    41  
    42  func init() {
    43  	registerIface(&commonInterface{
    44  		name:                  "intel-mei",
    45  		summary:               intelMEISummary,
    46  		implicitOnCore:        true,
    47  		implicitOnClassic:     true,
    48  		baseDeclarationSlots:  intelMEIBaseDeclarationSlots,
    49  		connectedPlugAppArmor: intelMEIConnectedPlugAppArmor,
    50  		connectedPlugUDev:     intelMEIConnectedPlugUDev,
    51  		reservedForOS:         true,
    52  	})
    53  }