mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 01:55:20 +00:00
bab228b8fa
Summary: This adds support for the `#includedir` and `#include` directives to the `sudoers` table, making `sudoers` behave more like the actual `sudo` rule parser: * When an `includefile` directive is encountered, the referenced file will be parsed using the same rules as the top-level sudoers file. * When an `includedir` directive is encountered, the referenced directory will be listed and each valid file within (i.e., each file *not* containing a `.` and *not* ending with `~`) will be parsed using the same rules as the top-level sudoers file. * An additional `source` column tracks the file that provides the row's rule. * Like `sudoers(5)`, nesting is limited to 128 individual files, with directory inclusions being counted once for each file they contain. Pull Request resolved: https://github.com/facebook/osquery/pull/5350 Differential Revision: D13717394 Pulled By: akindyakov fbshipit-source-id: 9659526f21e82c712c495caa80775b15d7e47e37
9 lines
312 B
Plaintext
9 lines
312 B
Plaintext
table_name("sudoers")
|
|
description("Rules for running commands as other users via sudo.")
|
|
schema([
|
|
Column("source", TEXT, "Source file containing the given rule"),
|
|
Column("header", TEXT, "Symbol for given rule"),
|
|
Column("rule_details", TEXT, "Rule definition")
|
|
])
|
|
implementation("sudoers@genSudoers")
|