Commit Graph

276 Commits

Author SHA1 Message Date
Todd C. Miller
1fe582a0e3 Add support for negated sudoRunAsUser and sudoRunAsGroup entries. 2018-10-28 15:46:27 -06:00
Todd C. Miller
0398996b39 Use a testsudoers group file with known contents instead of the system one. 2018-10-27 10:57:37 -06:00
Todd C. Miller
5eb0fbd076 add getgrouplist_test.c 2018-10-26 10:26:27 -06:00
Todd C. Miller
1b035b5426 Add padding option to cvtsudoers.
Bug #856
2018-10-25 08:40:25 -06:00
Todd C. Miller
56cff772eb Asturian translation for sudo from translationproject.org 2018-10-22 06:21:59 -06:00
Todd C. Miller
cf07dc0757 Add a suspend event type to the I/O log to log suspend/resume of
the command so we can skip that delay during replay.
2018-10-05 14:16:08 -06:00
Todd C. Miller
8bf279b11e Add regress test for bug #853 2018-09-20 15:10:15 -06:00
Todd C. Miller
2221fbe2f1 Add some more ldif -> sudoers tests to verify sudoOrder. 2018-08-30 07:49:59 -06:00
Todd C. Miller
e318f27fba When parsing an I/O log timing line, store the result in a timespec,
not a double.  The speed factor (for scaling the delay) in sudoreplay
is still a double but we only need to adjust the delay if the factor
is something other than 1.0.
2018-08-29 09:57:12 -06:00
Todd C. Miller
4782b22a47 Move ldif -> sudoers conversion code into parse_ldif.c 2018-08-26 20:02:49 -06:00
Todd C. Miller
52d54997ee Move string list functions to their own file. 2018-08-26 19:48:14 -06:00
Todd C. Miller
aaad554cda Add regress test for I/O log plugin endpoints 2018-08-23 15:35:02 -06:00
Todd C. Miller
ddd663a5f2 Import arc4random() from libressl. This takes an all-in-one approach
instead of the one-file-per-OS approach that libressl takes.
The fallback code does not have as many OS-specific bits as libressl.
2018-05-24 21:04:23 -06:00
Todd C. Miller
154a5f59a9 Move digest code into libutil 2018-05-24 21:04:07 -06:00
Todd C. Miller
1cd472c051 Check for invalid bas64 attributes. 2018-05-20 08:09:25 -06:00
Todd C. Miller
1bc8e9abfd Add support for base64-encoding non-safe strings in LDIF output. 2018-05-20 07:01:26 -06:00
Todd C. Miller
1ab3606019 Add support for parsing base64-encoded attributes 2018-05-18 10:11:51 -06:00
Todd C. Miller
f9be3a48a2 Simplify the nss interface such that each sudoers provider fills
in a per-nss list of userspecs and defaults instead of using separate
lookup and list functions.  This makes it possible to have a single
implementation of the code for sudoers lookup and listing.
2018-05-14 09:05:03 -06:00
Todd C. Miller
f23d73dfe1 Add Chinese(Taiwan) translation for sudo. 2018-04-24 10:45:30 -06:00
Todd C. Miller
c64e57dad5 Add tests for round-tripping cvtsudoers, sudoers -> LDIF -> sudoers
and LDIF -> sudoers -> LDIF.
2018-04-21 06:23:02 -06:00
Todd C. Miller
48f74db604 Test the -b option when converting from LDIF. 2018-04-19 09:24:08 -06:00
Todd C. Miller
523f0eeeab Monty Python insults from Philip Hudson 2018-04-17 07:10:43 -06:00
Todd C. Miller
4be8aba9f8 cvtsudoers regress tests 2018-04-15 08:14:46 -06:00
Todd C. Miller
22c9ed8e77 sync 2018-03-23 06:56:49 -06:00
Todd C. Miller
81a373677a Add test for empty runas user list. 2018-03-06 14:39:11 -07:00
Todd C. Miller
4874068070 Add tests for round-tripping sudoers -> ldif -> sudoers 2018-03-02 11:30:19 -07:00
Todd C. Miller
120bb6de7f rename ldap_common.c -> ldap_util.c 2018-02-28 14:24:33 -07:00
Todd C. Miller
5999cfb906 Add support for setting default options in a config file. In
addition to expand_aliases, input_format and output_format, both
the initial sudoOrder and the increment when updating sudoOrder for
subsequent sudoRole objects can be specified.  Command line options
have also been added for the start order and increment.
2018-02-24 09:23:14 -07:00
Todd C. Miller
43a3a23fed Move LDAP configuration bits into ldap_conf.c 2018-02-11 07:36:08 -07:00
Todd C. Miller
64e99328e3 Move sudoers formatting code into fmtsudoers. 2018-02-09 18:22:04 -07:00
Todd C. Miller
3226f7e28b Move common bits of ldap to sudoers conversion into ldap_common.c
and use it in sssd.c.
2018-02-09 18:21:40 -07:00
Todd C. Miller
7f310d7386 Remove sudoers2ldif, it has been replaced by cvtsudoers. 2018-01-29 09:18:48 -07:00
Todd C. Miller
6272829dcc Add LDIF conversion to sudoers tests 2018-01-28 10:07:15 -07:00
Todd C. Miller
681fb2e76e Add ldif backend to cvtsudoers, to replace sudoers2ldif 2018-01-27 20:08:02 -07:00
Todd C. Miller
0f3030d502 Move common stub functions required by the parser out of visudo.c
and cvtsudoers.c and into stubs.c.
2018-01-26 12:51:24 -07:00
Todd C. Miller
80cb1b5da9 Move sudoers JSON conversion to cvtsudoers which will eventually
output to other formats too.
2018-01-26 11:20:37 -07:00
Todd C. Miller
aa516b0a51 Add missing plugins/sudoers/po/fur.mo file to repo. 2018-01-15 10:24:13 -07:00
Todd C. Miller
ff5ac3ef0e Add tsdump, a simple utility to dump a timestamp file. To build,
run "make tsdump" in the plugins/sudoers directory (it is not built
by default).  In order to map the tty device number to a name,
sudo_ttyname_dev() has been moved into libsudo_util.
2018-01-11 10:49:20 -07:00
Todd C. Miller
5f3797c754 Document the sudoers time stamp file format. 2017-12-20 13:01:06 -07:00
Todd C. Miller
6ce85b1746 Trivial test for process start time. We don't try to check the
resulting timespec as it differs by platform.  On most it is wallclock
time, on others it is relative to boot time (Linux).
2017-12-18 10:35:37 -07:00
Todd C. Miller
1709dc7f77 In the timestamp record, include the start time of the terminal
session leader for tty-based timestamps or the start time of the
parent process for ppid-based timestamps.  Idea from Duncan Overbruck.
2017-12-16 05:53:05 -07:00
Todd C. Miller
5f5a60f822 Add script to generate ChangeLog from git log output. 2017-12-09 20:40:28 -07:00
Todd C. Miller
9ab1c9935d sync with translationproject.org
* * *
sync with translationproject.org
2017-09-07 15:47:09 -06:00
Todd C. Miller
a01bbfacf4 Add Friulian translation for sudo from Fabio Tomat via translationproject.org 2017-08-10 10:14:57 -06:00
Todd C. Miller
17514b55ea Add support for multiple '*' in env_keep, env_check and env_delete
entries.
2017-05-12 10:02:17 -06:00
Todd C. Miller
c379665556 Add tests for parsing tuples and syslog options. 2017-05-03 09:54:30 -06:00
Todd C. Miller
7aa89c49b5 Emulate pipe2() on systems without it. 2017-03-13 12:11:51 -06:00
Todd C. Miller
af1482f487 Add tcsetpgrp_nobg() which acts like tcsetpgrp() but returns -1
for a background process.  This is safer than blocking SIGTTOU
which would cause tcsetpgrp() to succeed in the background.
2017-03-07 12:29:21 -07:00
Todd C. Miller
6dba84dca9 Reorganize the command execution code to separate out the pty and
non-pty code paths into their own event loops.  The non-pty exec
code is now contained in exec_nopty.c and the pty exec code is split
between exec_pty.c (parent process) and exec_monitor.c (session leader).
This results in a small bit of duplicated code but improves readability.
Some of the duplicated code will fall out in future changes to the
event subsystem (the signal pipe).
2017-03-03 10:35:11 -07:00
Todd C. Miller
b9954fb9b9 Add support for using the message digest functions in libgcrypt
instead of sudo's own SHA2 implementation.
2017-02-20 16:44:12 -07:00