blob: 712a6ca06958ef353b176f9dc7f2776c11a47317 [file] [log] [blame]
// 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_TTY_DEVICE_RULE_H_
#define PERMISSION_BROKER_ALLOW_TTY_DEVICE_RULE_H_
#include "permission_broker/tty_subsystem_udev_rule.h"
namespace permission_broker {
// AllowTtyDeviceRule encapsulates the policy that TTY devices are allowed to be
// accessed. Any path passed to it that is owned by a device on the TTY
// subsystem is |ALLOW|'ed. All other paths are ignored.
class AllowTtyDeviceRule : public TtySubsystemUdevRule {
public:
AllowTtyDeviceRule();
~AllowTtyDeviceRule() override = default;
Result ProcessTtyDevice(udev_device* device) override;
private:
DISALLOW_COPY_AND_ASSIGN(AllowTtyDeviceRule);
};
} // namespace permission_broker
#endif // PERMISSION_BROKER_ALLOW_TTY_DEVICE_RULE_H_