Commit Graph

280 Commits

Author SHA1 Message Date
Todd C. Miller
d15e117c2e find_editor: remove the env_error argument
There is no case where we should fail to find an editor just because
the values of EDITOR, VISUAL and SUDO_EDITOR are unavailable.  Both
sudoedit and the "env_editor" sudoers setting are documented as
falling back on the hard-coded list of editors in the "editors"
sudoers setting.  Bug #1000
2021-09-29 10:25:19 -06:00
Todd C. Miller
698481492c Standardize on "front-end" not "front end" in the man pages. 2021-09-17 10:55:06 -06:00
Todd C. Miller
7ae62866e4 Add support for execl, execle, execlp, execvp, and execvpe.
Currently, PATH traversal is handled by sudoers which uses
the original PATH, not the one updated by the shell.
2021-09-07 19:55:45 -06:00
Todd C. Miller
aac09cf7be Define RBAC and mention incompatibility with intercept/log_subcmds. 2021-09-03 14:19:32 -06:00
Todd C. Miller
f40afd73fe Can't use intercept or log_subcmds with SELinux RBAC.
SELinux policy will prevent the inherited socket from sudo from
being used and may also restrict the ability to connect back to the
sudo process.
2021-09-01 11:09:17 -06:00
Todd C. Miller
ba171724f7 Rename log_children -> log_subcmds 2021-08-26 16:36:41 -06:00
Todd C. Miller
98401c0588 Add execv(3) support to sudo_intercept.so.
This allows intercept to work with csh which uses execv(3) not execve(2).
2021-08-21 08:44:16 -06:00
Todd C. Miller
02b78c38ed Sync the list of functions trapped by sudo_noexec.so. 2021-08-20 18:41:32 -06:00
Todd C. Miller
bb40491c99 Update sudoers Debug example to match the debug changes from sudo 1.8.12. 2021-08-20 15:50:02 -06:00
Todd C. Miller
52e7594ae5 set-user-ID and set-group-ID not set user-ID and set group-ID. 2021-08-19 09:59:32 -06:00
Todd C. Miller
1c52c24a93 log_server_peer_cert and log_server_peer_key are not required by default.
They are only required if sudo_logsrvd has tls_checkpeer enabled.
2021-08-19 09:15:12 -06:00
Todd C. Miller
f9d3f46fa7 Add intercept_allow_setid sudoers option, disabled by default.
With this change, a shell in intercept mode cannot run a setuid or
setgid binary by default.  On most systems, the dynamic loader will
ignore LD_PRELOAD for setuid/setgid binaries such as sudo which
would effectively disable intercept mode.
2021-08-18 15:43:26 -06:00
Todd C. Miller
fc9a01936c Better document the limitations of intercept mode.
Also mention log_children under "Preventing shell escapes"
2021-08-16 12:44:49 -06:00
Todd C. Miller
a85cf1f3fd Try to clarify log_server_peer_key and log_server_peer_cert.
These are client-side not server-side.
2021-08-16 10:45:51 -06:00
Todd C. Miller
788708c9ff Add intercept_authenticate sudoers option, defaults to false.
By default, sudoers will not require authentication of commands run
via an intercepted session.  To require authenticaton of subsequent
commands, enable intercept_authenticate in sudoers.
2021-08-09 15:50:26 -06:00
Todd C. Miller
786e5865cb Add "intercept" Defaults setting to allow interception of sub-commands.
This causes "intercept" to be set to true in command_info[] which
the sudo front-end will use to determine whether or not to intercept
attempts to run further commands, such as from a shell.  Also add
"log_children" which will use the same mechanism but only log (audit)
further commands.
2021-08-09 15:50:25 -06:00
Todd C. Miller
17a415ae77 Add log_exit_status sudoers option to log when a command exits.
This option defaults to off.
2021-07-09 11:08:44 -06:00
Todd C. Miller
7033f1c1d8 The -g option may also be used with any group the target user belongs to.
The description in the Runas_Spec section incorrectly stated that
the -g option could not be used if no runas group was set.  Bug #975.
2021-05-07 13:42:40 -06:00
Todd C. Miller
2759920b86 Document double escaping of backslashes. Bug #961. 2021-03-03 15:49:18 -07:00
Todd C. Miller
a5504148a5 Add admin_flag sudoers option and make --enable-admin-flag take a path.
It is now possible to disable the Ubuntu admin flag in sudoers
or change its location.
GitHub issue #56
2021-02-16 13:20:02 -07:00
Todd C. Miller
1b72d6a5cc Allow SELinux support to be disabled via the sudoers file.
Defaults to true if sudo is built with SELinux support and SELinux
is not disabled on the system.
2021-01-08 19:29:17 -07:00
Todd C. Miller
f41b2c1f59 Direct execution of a command is incompatible with using a log server. 2020-12-11 09:45:14 -07:00
Todd C. Miller
38dd0f63b6 Event log data is sent to sudo_logsrvd even when not I/O logging. 2020-11-16 06:30:52 -07:00
Todd C. Miller
e0c2635fb3 Apply Google inclusive language guidelines.
Also replace backwards with backward.
2020-10-30 10:15:30 -06:00
Todd C. Miller
8dee1b1ecf regen 2020-10-29 06:31:45 -06:00
Todd C. Miller
28d6771d24 Add log_format sudoers setting to select sudo or json format logs.
Defaults to sudo-format logs.
2020-10-27 15:26:02 -06:00
Todd C. Miller
e826705b62 Fix pasto, TIMEOUT not CMND_TIMEOUT. 2020-09-25 15:07:25 -06:00
Todd C. Miller
b1a59accf7 Document reserved words that cannot be used as alias names.
Bug #941
2020-09-25 13:50:32 -06:00
Todd C. Miller
5ca6056a32 Add simple runchroot and runcwd examples.
Also document the limitation of command-based Defaults settings.
2020-09-09 21:16:38 -06:00
Todd C. Miller
1676f0ceeb Support "*" for CWD/CHROOT to allow user to specify cwd or chroot.
Adds two new command line options, -D (--chdir) and -R (--chroot)
that can only be used when sudoers sets runcwd or runchroot to "*".
2020-09-01 14:10:02 -06:00
Todd C. Miller
6bdfd010d2 Add CHROOT and CWD sudoers options.
Also matching runchroot and runcwd Defaults settings.
2020-09-01 06:26:00 -06:00
Todd C. Miller
47ed1721be Refer to "syntax error" instead of "parse error".
This is the term the parser uses when there is an actual error.
2020-08-27 16:12:09 -06:00
Todd C. Miller
a3364c1e95 Fix sudoers_policy plugin options when sudoers_audit is not listed.
As of sudo 1.9.1 the sudoers file is opened by the audit plugin,
not the policy plugin.  As a result, plugin options set for
sudoers_policy have no effect.  If sudoers_policy has plugin options
in sudo.conf and sudoers_audit is not listed, move the options to
sudoers_audit so they will have an effect.
2020-08-17 13:45:16 -06:00
Todd C. Miller
609910cc21 sudoers error recovery can be configured via an "error_recovery" setting.
This setting is an argument to the sudoers plugin, similar to how
sudoers_file, sudoers_mode, sudoers_uid, etc. are implemented.
The default value is true.
2020-08-17 13:14:30 -06:00
Todd C. Miller
71a879d905 Mention visudo in sudo(8) and document sudoers error recovery. 2020-08-11 14:07:31 -06:00
Todd C. Miller
d6bc75e1e0 Document the contents of the log.json file. 2020-07-06 12:35:41 -06:00
Todd C. Miller
f093cb2e52 Replace terms master and blacklist in docs and examples. 2020-06-15 14:38:46 -06:00
Todd C. Miller
741c6f274e Add support for @include and @includedir
These are less confusing than #include and #includedir when the
hash character is also the comment character.

This commit also adds real parsing of include directives as opposed
to the pure lexer approach used previously.  As a result, it is now
possible to include files with spaces by either using a double-quoted
string or escaping the space characters with a backslash.
2020-05-20 13:10:53 -06:00
Todd C. Miller
deb9ce7d12 Quiet some warnings from igor. 2020-05-07 08:02:49 -06:00
Todd C. Miller
e5f8214c0a Remove the tls parameter from the ServerHello message.
The TLS connection is now initiated before ServerHello is received.
2020-05-05 13:23:26 -06:00
Todd C. Miller
8186b98208 Adapt sudoers iolog client to log server dual port changes.
The TLS handshake now occurs before the ServerHello message is read.
This fixes potential man-in-the-middle attacks and works better with
TLS 1.3.
2020-05-05 13:23:26 -06:00
Todd C. Miller
66c8f69f8d Make it clear in the sudoers grammar that sudoedit needs file args.
Debian bug #571621
2020-04-03 10:17:19 -06:00
Todd C. Miller
ea8445e364 Allow the ALL keyword to be specified with a digest list. 2020-03-11 11:19:37 -06:00
Todd C. Miller
4eca443246 Allow a list of digests to be specified for a command. 2020-03-11 11:17:52 -06:00
Todd C. Miller
8c08f5ef03 Allow Cmd_Alias in addition to Cmnd_Alias.
Some people find using Cmd_Alias more natural.
2020-03-11 11:17:38 -06:00
Todd C. Miller
e1df9d1dc3 Add pam_ruser and pam_rhost sudoers flags. 2020-03-01 13:37:00 -07:00
Todd C. Miller
07a2965bab Document TCP keepalive options in the manual pages. 2020-01-22 11:07:01 -07:00
Todd C. Miller
b14d633ec6 Add runas_check_shell flag to require a runas user to have a valid shell.
Not enabled by default.
2019-12-09 19:29:45 -07:00
Todd C. Miller
df8f06609c Add a new flag "allow_unknown_runas_id" to control matching of unknown IDs.
Previous, sudo would always allow unknown user or group IDs if the
sudoers entry permitted it.  This included the "ALL" alias.
With this change, the admin must explicitly enable support for unknown IDs.
2019-12-09 17:14:06 -07:00
Todd C. Miller
d98022177e Document log_server_cabundle, log_server_peer_cert and log_server_peer_key 2019-12-06 13:23:51 -07:00