-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathallow_hidraw_device_rule.h
More file actions
28 lines (20 loc) · 958 Bytes
/
allow_hidraw_device_rule.h
File metadata and controls
28 lines (20 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2014 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef PERMISSION_BROKER_ALLOW_HIDRAW_DEVICE_RULE_H_
#define PERMISSION_BROKER_ALLOW_HIDRAW_DEVICE_RULE_H_
#include "permission_broker/hidraw_subsystem_udev_rule.h"
namespace permission_broker {
// AllowHidrawDeviceRule encapsulates the policy that hidraw devices are allowed
// to be accessed. Any path passed to it that is owned by a device on the hidraw
// subsystem is |ALLOW|ed. All other paths are ignored.
class AllowHidrawDeviceRule : public HidrawSubsystemUdevRule {
public:
AllowHidrawDeviceRule();
~AllowHidrawDeviceRule() override = default;
Result ProcessHidrawDevice(struct udev_device *device) override;
private:
DISALLOW_COPY_AND_ASSIGN(AllowHidrawDeviceRule);
};
} // namespace permission_broker
#endif // PERMISSION_BROKER_ALLOW_HIDRAW_DEVICE_RULE_H_