osquery-1/specs/posix/sudoers.table
William Woodruff bab228b8fa sudoers table: Support file and directory includes (#5350)
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
2019-01-18 05:49:07 -08:00

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")