Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/sudo-project/sudo

Utility to execute a command as another user
https://github.com/sudo-project/sudo

sudo_preload_dso: make the envp function argument const

This lets us fix an inappropriate cast in sudo_intercept_common.c.

424fa7f2b1c3d337383f01c1944294e8c94f821d authored over 2 years ago by Todd C. Miller <[email protected]>
intercept_write: remove unused CD_USE_PTRACE code.

It is not possible to end up in intercept_write when CD_USE_PTRACE
is set.

e9c2695268ef54ff2ef40956122ee57ed1853535 authored over 2 years ago by Todd C. Miller <[email protected]>
Sudo 1.9.11p3

01a9e5a157156db9b8d281892bed1569aab10ee5 authored over 2 years ago by Todd C. Miller <[email protected]>
Set TCP_NODELAY on the socket used for intercept IPC to reduce latency.

On some systems, Nagle's algorithm was delaying receipt of the data,
causing commands with interc...

332a6afe77b914220abee9be5c455ab4c5c015e9 authored over 2 years ago by Todd C. Miller <[email protected]>
Use blocking I/O when talking to the sudo process.

Also check for EAGAIN/EINTR when reading the message size.
Fixes a problem seen on AIX where recv...

b10201bdc4b0e4f14e88eac8abdd8fc92280e3a2 authored over 2 years ago by Todd C. Miller <[email protected]>
Add debug printfs when send/recv return EAGAIN or EINTR.

These are not actually errors but can help gain insight into what
is going on and, in the case of...

8829c028d357831238fac708204f868be97e526b authored over 2 years ago by Todd C. Miller <[email protected]>
log_exit_status: make local variables match struct evlog members.

49c27f5278315491dd70fadd5f164277e4d41eff authored over 2 years ago by Todd C. Miller <[email protected]>
Quiet a compiler warning on macOS.

The getgrouplist() groups array on macOS is int * instead of gid_t *.

5787da7b21ee187dd519658932dae1d9cf98601d authored over 2 years ago by Todd C. Miller <[email protected]>
Sudo 1.9.11p2

04746d0e65b120beaa802fb846a19df3c054f26e authored over 2 years ago by Todd C. Miller <[email protected]>
Fix compilation on Linux/x32; GitHub issue #158

dfee181d1579a24c679eff960c85bc659c56993f authored over 2 years ago by Todd C. Miller <[email protected]>
Fix pasto in comment after HAVE_PRIV_SET #endif

1c00c7c2382f30a4551429a164ab69d88c1b53c3 authored over 2 years ago by Todd C. Miller <[email protected]>
Fix typo, we should define SSIZE_MAX if it is not defined.

169e049821a68449b1c73918f13765ea1142b7f0 authored over 2 years ago by Todd C. Miller <[email protected]>
Change black list -> blocklist

This was missed in the previous conversion.

6525436db74da06242db65a7dd503f0e78cd347a authored over 2 years ago by Todd C. Miller <[email protected]>
Save a pointer to the event_alloc parameter in the plugin open function.

That way we don't need to pass event_alloc around to the log client
functions.

d04810c4f27db36115e8afa7b3a9b4e4720042f1 authored over 2 years ago by Todd C. Miller <[email protected]>
Fix regression with zero-length messages introduced in protobuf-c PR 500.

b6a6451482a3ff5e30f43ef888159d4b0d39143b authored over 2 years ago by Todd C. Miller <[email protected]>
Sudo 1.9.11p1

d2bf3aad0639843d971305ec1d60098534eaa2a1 authored over 2 years ago by Todd C. Miller <[email protected]>
Make read and write events persistent and disable as needed.

For the read callback, disable reader when the buffer is full.
For the write callback, disable wr...

964bcfa2dd72a9660d2766b22738aee6aecb6ad2 authored over 2 years ago by Todd C. Miller <[email protected]>
Check for SECCOMP_MODE_FILTER not SECCOMP_SET_MODE_FILTER.

This matches the actual prctl() call we use.

7689b8718ca22f98979a493e1b0bbda6e84af04b authored over 2 years ago by Todd C. Miller <[email protected]>
Merge pull request #157 from 0x2b3bfa0/improve-tag-spec-ebnf-docs

Improve Tag_Spec EBNF documentation

fedcb99ee8510a064108296245a2e437e6ef862e authored over 2 years ago by Todd C. Miller <[email protected]>
Treat EINTR in a callback like we do EAGAIN.

We shouldn't get EINTR in practice since we set SA_RESTART when
registering signal handlers but i...

161b01fccd31742e02e33150eb8dd23d6bc0b892 authored over 2 years ago by Todd C. Miller <[email protected]>
Improve Tag_Spec EBNF documentation

d60b6c618fef06412282b43dd60919aa7b829592 authored over 2 years ago by Helio Machado <[email protected]>
Merge pull request #156 from delroth/aarch64-build

exec_ptrace: fix missing sudo_pt_regs on aarch64

7f98ae7d23d881017a493ef886c000de1152585a authored over 2 years ago by Todd C. Miller <[email protected]>
exec_ptrace: fix missing sudo_pt_regs on aarch64

AArch64 already had an existing "user_pt_regs" struct and didn't need a
struct alias before the ...

d549adf04bfde7936306203e2e8886ffd93d00ea authored over 2 years ago by Pierre Bourdon <[email protected]>
Merge pull request #154 from 0x2b3bfa0/fix-tag-spec-docs

Add missing colon in Tag_Spec documentation

a4b2012c177e0d0ad12406d720e8cebae55653ab authored over 2 years ago by Todd C. Miller <[email protected]>
Merge pull request #152 from particleflux/fix-sudoers-typo

Fix typo in sudoers comment

ab00d29ecf4570540581d66a5f1844eb04962ba4 authored over 2 years ago by Todd C. Miller <[email protected]>
Add missing colon in Tag_Spec documentation

3405fac05ef4078a4c3f584ff93c4a06253b3737 authored over 2 years ago by Helio Machado <[email protected]>
Fix typo in sudoers comment

Fix a typo in the sudoers comment about `maxseq` param.

Introduced by 906eb19ece47023c659b4b3db...

a074d058ef226e1d7c1ca61a02855d32527daf53 authored over 2 years ago by Stefan Linke <[email protected]>
Only shift unsigned values to avoid implementation-specific behavior.

This converts the arithmetic shifts to logical shifts.

e4ea5ad8afeec173b978446c06b0fc009fb813a1 authored over 2 years ago by Todd C. Miller <[email protected]>
Fix issue protobuf-c#499: unsigned integer overflow

Signed-off-by: 10054172 <[email protected]>

263fdc6b067bd892df654377c0ea051289fce33f authored over 2 years ago by Todd C. Miller <[email protected]>
Fix building with select (not poll) when fd_set is not defined in sys/types.h.

We can use a void * for the fd_set arrays and just add a cast when
using the FD_SET macros.

b77cbb2e672ecdcadd8baed06bec35cd1cd48eb3 authored over 2 years ago by Todd C. Miller <[email protected]>
Reinstall the event handler if we get EAGAIN from read/write callback.

The read and write events do not set SUDO_EV_PERSIST so we need to
explicitly re-enable the event...

c2a131714a6b9eccba7779bde64ce79a0377b541 authored over 2 years ago by Todd C. Miller <[email protected]>
If write(2) returns EAGAIN just re-enter the event loop.

This is consistent with how we handle EAGAIN for read(2).

db6fc237c469d21b7722303cd5450fdf97226bf9 authored over 2 years ago by Todd C. Miller <[email protected]>
Document how setting ModulePath affects the Python search path.

Also advise the user to use a unique prefix to avoid name space
collisions with installed Python ...

fcb5867f1dec3b9c60159cb7220db25adbfce2e7 authored over 2 years ago by Todd C. Miller <[email protected]>
Add EXAMPLES variables for use in the man pages for the examples directory.

96c3c28194eb22b4beaa1cd5617c82df19f60ff3 authored over 2 years ago by Todd C. Miller <[email protected]>
Updated translations from translationproject.org

24522fb4e466fe4cb08bc535aed0833b561b959d authored over 2 years ago by Todd C. Miller <[email protected]>
Rebuild Croatian message catalog.

258b504be823ad2f4a919b1e1c34c52010917614 authored over 2 years ago by Todd C. Miller <[email protected]>
Add new test binaries to the ignore files.

4386be3d680716d91e648cdb318fb83d3f13b7f5 authored over 2 years ago by Todd C. Miller <[email protected]>
Updated translations from translationproject.org

5cb94eb2587a309ee8da07221dac54327366f79b authored over 2 years ago by Todd C. Miller <[email protected]>
Define WORDS_BIGENDIAN on big endian systems.

Instead of a configure check, we use endian.h (or a fallback).

ac06fb7f29e6c6305cf08a5cdac8fbd73a1f607a authored over 2 years ago by Todd C. Miller <[email protected]>
Update to protobuf-c 1.4.0

71c07579baa7d109e8b2e967e7911bff8d4edd70 authored over 2 years ago by Todd C. Miller <[email protected]>
Quiet two clang analyzer false positives.

aee276ea63a8ac1f023f830933ef67d03e6d69a1 authored over 2 years ago by Todd C. Miller <[email protected]>
Move a comment to the correct location.

f19a71a3db40774d76e8cc3e56a18341fc8bc22c authored over 2 years ago by Todd C. Miller <[email protected]>
union sockaddr_union: pass in sockaddr_union * instead of sockaddr *.

This eliminates the need for a few casts and is consistent with how
create_listener() is written.

5012c7f97899a39c2ff1cb3b418f10b7caf54d49 authored over 2 years ago by Todd C. Miller <[email protected]>
Eliminate some dead stores that clang-analyzer complains about.

898ca50545a1c2d7b9f8c64eec8610737d5285f4 authored over 2 years ago by Todd C. Miller <[email protected]>
ptrace_read_vec: don't try to free memory on the error path

This is leftover from when ptrace_read_string() allocated its own memory.

63e6973ad1952de40a240c07e6e4e307a3b19586 authored over 2 years ago by Todd C. Miller <[email protected]>
Avoid using vfork(2) in the DSO system(3) wrapper.

Traditional vfork(2) semantics make it unsafe for use for more than
just vfork(2) + execve(2).

25a26f504254dfabadbb695c26f58847c9714a65 authored over 2 years ago by Todd C. Miller <[email protected]>
Updated translations from translationproject.org

06bf1be67c7e9ff3d9c124f94e59b473ddc754e9 authored over 2 years ago by Todd C. Miller <[email protected]>
Mention sudo_logsrvd.conf "log_server" parsing fix.

66909a4831c4342d8c16425e30e0592ad5d3e61d authored over 2 years ago by Todd C. Miller <[email protected]>
For logsrvd_conf_test include both tls and non-tls configs.

2d6b9d22e11a17257753a7b8d4cd49fcec83db92 authored over 2 years ago by Todd C. Miller <[email protected]>
Add a simple regression test for logsrvd.conf parser.

Unlike the parser fuzzer, this includes sample certs and keys.
This test would have detected the ...

d7b2ff3214edec8e08845928768ffe56e8281e57 authored over 2 years ago by Todd C. Miller <[email protected]>
Fix inverted logic when setting server_log.

A value that starts with a '/' should be treated as a path.

0ca222aa887ee35e034e782b01e3df91e4386523 authored over 2 years ago by Todd C. Miller <[email protected]>
Use abs_top_builddir instead of `pwd`/$(top_builddir).

bec9603f3a83443183eaef3d619189767e57326b authored over 2 years ago by Todd C. Miller <[email protected]>
Plug a memory leak.

51b64780c0b7b61db6f602727f1454c1aebc2c6b authored over 2 years ago by Todd C. Miller <[email protected]>
Fix bug in last commit, need to reinitialize role to NULL.

89b80ea690fbb68e0940bf7c3517201dfb6a4a4d authored over 2 years ago by Todd C. Miller <[email protected]>
Simplify the check for when we can reuse the previous user and host specs.

This makes the code easier to read and quiets a cppcheck false positive.

eb0135a93adf28f9362932fcf5f7b1b30a450b40 authored over 2 years ago by Todd C. Miller <[email protected]>
Install the plugin man pages in section 5 (or 4 for System V).

The manual had the correct section in the text but was installed
in the wrong directory.

77a47affb4d6d40b329fd1f8f830ac4259bcd2db authored over 2 years ago by Todd C. Miller <[email protected]>
Updated translations from translationproject.org

3074f64bd104a091a1e925a4a293e34b42d357ae authored over 2 years ago by Todd C. Miller <[email protected]>
Sudo now supports intercepting system(3).

4b5ee47e0dbebe68ee9fdf88b99132f770a07155 authored over 2 years ago by Todd C. Miller <[email protected]>
Only display "unable to connect to log server" warning once.

Previously, in intercept mode, if the log server is unreachable the
message would be printed for ...

c20c3b56318d0530f369c9f52d95705af4232fcd authored over 2 years ago by Todd C. Miller <[email protected]>
When using ptrace(2), push the point where we suspend into exec_cmnd().

This should reduce the amount of time the child has to wait for
the parent to use PTRACE_SEIZE to...

de4d53e488ef0f66c0b522f6f7b75bd61ccc6c57 authored over 2 years ago by Todd C. Miller <[email protected]>
Add configure check for vfork(2) and fall back to fork(2) if missing.

cec83a05a382d575d99392f1b27d63ba1594f031 authored over 2 years ago by Todd C. Miller <[email protected]>
Add support for intercepting the system(3) function.

This also means we can log system(3) with log_subcmds.

f52342031d031fad8faf4a39067a6cd1b25467af authored over 2 years ago by Todd C. Miller <[email protected]>
Newer compilers define __BYTE_ORDER__ and __ORDER_{BIG,LITTLE}_ENDIAN__

Also add riscv the little endian list.

436deda08d973936fad834c7138c9bab427b5d98 authored over 2 years ago by Todd C. Miller <[email protected]>
On AIX, fmemopen(3) has a bug where feof() returns false at EOF.

See https://www.ibm.com/support/pages/apar/IJ11845

1c8316162237a319b9ee5b2fe5081f24a0c92f2d authored over 2 years ago by Todd C. Miller <[email protected]>
Fix potential signed integer overflow on 32-bit CPUs.

Converting fractional minutes to nanoseconds could overflow a 32-bit
integer, use long long instead.

dc8311dae99c2e6d60ecd3db6730fe84c6fe9d5b authored over 2 years ago by Todd C. Miller <[email protected]>
Fix path to example sudoers file, it is now in the build dir.

93916fde4f713e6b1395bdb1d66f6577c6c80221 authored over 2 years ago by Todd C. Miller <[email protected]>
init_options: initialize apparmor_profile to NULL

b497d7454459199913bbc64188f4b780f6b9e124 authored over 2 years ago by Todd C. Miller <[email protected]>
Update with latest 1.9.11 changes.

c1934a63661ccec930b8fcbbb895a32c5e65f715 authored over 2 years ago by Todd C. Miller <[email protected]>
Fix typo

6eda28ef514b07d3e5c11ddd3b048d4a249be042 authored over 2 years ago by Todd C. Miller <[email protected]>
Update contributors.

789bc6ec8e6fef6f98796c57b3aaa53e87abe54b authored over 2 years ago by Todd C. Miller <[email protected]>
Fix uninitialized use of ca_store when building with wolfSSL.

15f167c3a02932b1233aa5607da463c57c287999 authored over 2 years ago by Todd C. Miller <[email protected]>
Newer Debian/Ubuntu uses libsepol-dev not libsepol1-dev.

7125a9cc237b74e73c0725913a7314e42d1cae7e authored over 2 years ago by Todd C. Miller <[email protected]>
Regenerate files after merging AppArmor integration.

9bb288d10e87d6d9fcafd279d9207924a35dd84c authored over 2 years ago by Todd C. Miller <[email protected]>
Merge pull request #148 from kernelmethod/apparmor_support

Add AppArmor support to sudo

402fc832fa3d77e34fdb3d9a199b67037c58476e authored over 2 years ago by Todd C. Miller <[email protected]>
Merge branch 'main' into apparmor_support

f16754a1ddfbc4d61e56dd63722dd917cdfe72bb authored over 2 years ago by Todd C. Miller <[email protected]>
Pass envp, not environ, to real execve() from exec_wrapper() if possible.

The replacement execve() function was passing the global environ
to exec_wrapper() instead of the...

dc2b28d3e0c323fa7cd9a4ac41c59da1af2abc50 authored over 2 years ago by Todd C. Miller <[email protected]>
Update .pot files for 1.9.11

346e63cd7c40a9db368b4bf078bf727f1f0f41ec authored over 2 years ago by Todd C. Miller <[email protected]>
Consolidate some translatable strings.

b6ddf3db6df314e0c415c46b32c4cb215f10760a authored over 2 years ago by Todd C. Miller <[email protected]>
Standardize protobuf "unable to unpack" warning messages.

38c6e1bffb009ed537637b46259fcfa0e7174370 authored over 2 years ago by Todd C. Miller <[email protected]>
Bump plugin minor version and document new intercept-related settings.

There should have been a minor version bump for sudo 1.9.8 when
intercept was originally implemen...

9ac42292d1f0d8e9872e47baa8333e28061a65f3 authored over 2 years ago by Todd C. Miller <[email protected]>
Reset intercept_allow_setid if intercept_type changes from trace to dso.

But only reset intercept_allow_setid if the user didn't explicitly set it.

6ced49a34dda7409445810ad454b636ddaea4ec1 authored over 2 years ago by Todd C. Miller <[email protected]>
CentOS Stream only uses a major version number, no minor version.

This prevents the packages from being created as foo.el.arch.rpm
since we were assuming that the ...

deef5e57fb37764b75d0a552f4903c6b51df73dc authored over 2 years ago by Todd C. Miller <[email protected]>
Add support for running o32 and n32 binaries on mips64.

d6be44db00c9efe9d63d00fae853036a18dd2531 authored over 2 years ago by Todd C. Miller <[email protected]>
Enable ptrace support for MIPS but only for log_subcmds.

It is not possible to change the syscall return value on MIPS
so we cannot support full intercept...

bc6a0e1a16baeaff6a50d3f6a5d9d5eb6a8537f3 authored over 2 years ago by Todd C. Miller <[email protected]>
Add intercept_type sudoers option to set intercept/log_subcmds mechanism.

f053f174bc63c36158ce37dde505ac668cac598c authored over 2 years ago by Todd C. Miller <[email protected]>
Add an APPARMOR_PROFILE user spec option to sudoers

sudoers now supports an APPARMOR_PROFILE option, which can be specified
as e.g.

alice ...

c20859d55b1edfbc64c705d34165645a7942d161 authored over 2 years ago by kernelmethod <[email protected]>
Add documentation for AppArmor support

- Document the AppArmor userspec option in the sudoers man pages.
- Add information about the --...

d8184fdb6f5299d5a27593bcf4953661dcb6b726 authored over 2 years ago by kernelmethod <[email protected]>
Add libapparmor-dev to the Debian and Ubuntu Dockerfiles

Install libapparmor-dev on Debian- and Ubuntu-based Docker images so
that they can build sudo wi...

58ce33abab12b5bf276d1bdf069f2df69be50816 authored over 2 years ago by kernelmethod <[email protected]>
Add an apparmor_profile sudo setting

Define a new sudo setting, `apparmor_profile`, that can be used to pass
in an AppArmor profile t...

bd25b85a668a2c37d217afe6c86b74fb6ea20604 authored over 2 years ago by kernelmethod <[email protected]>
Add a --with-apparmor build flag

Add a new build flag, --with-apparmor, that builds sudo with AppArmor
support. Modify the build ...

0b541c2029c58e7bd7f6e7bdfbf206fe84fb4cc6 authored over 2 years ago by kernelmethod <[email protected]>
Pass the WUNTRACED flag to waitpid() even if __WALL is present.

Otherwise, we won't get the wait status of a suspended command
that is not being traced.

b2037530135853581aa4637990ab3dbe9e6de534 authored over 2 years ago by Todd C. Miller <[email protected]>
Use explicit library dependencies instead of implicit.

We now include all the dependent libraries when linking.
Fixes a linking problem on CentOS Stream 9.

583e8bf538b21c0b96fe0e642f10b861acd2ff73 authored over 2 years ago by Todd C. Miller <[email protected]>
mail_parse_errors: allocate the correct amount of space for mail body.

Use strlen(), not sizeof(), on "problem parsing sudoers" since it
is a tranlated string and not a...

0b63af91bb5bf8daea828c2265ffa403c726616f authored over 2 years ago by Todd C. Miller <[email protected]>
Move code to suspend sudo when no pty is in use to separate file.

Use this in test_ptrace.c to be able to suspend just like sudo does.

0ea431e3929705ce6c17beb5c1337d2cce565bf9 authored over 2 years ago by Todd C. Miller <[email protected]>
Fix suspending a sudo-run shell in ptrace intercept mode with no pty.

When ptracing a process, we receive the signal-delivery-stop signal
before the group-stop signal....

a52e3776f04ef103da34d44df9013cc5a877dbe1 authored over 2 years ago by Todd C. Miller <[email protected]>
OpenSSL 3.x requires the key usage extension be present in CA and certs.

Certificates generated with a CA that doesn't set the key usage
extension will fail to validate i...

0bcfe6184f56d3fb51929d32af8f5a12155355c3 authored over 2 years ago by Todd C. Miller <[email protected]>
Include the cert or ca file in error messages where applicable.

69fa04f069a85e3744079a37795248afc532ceb0 authored over 2 years ago by Todd C. Miller <[email protected]>
Add missing include of string.h for strerror(3).

a82fe9aa06644983da8054aa111b63fffd7010d7 authored over 2 years ago by Todd C. Miller <[email protected]>
If ERR_reason_error_string() returns NULL, fall back on strerror(errno).

That way we get reasonable error messages for missing files, etc.

d7df7abf875b1427c77f609e4a809032324ede2a authored over 2 years ago by Todd C. Miller <[email protected]>
set_dhparams: pass BIO_new_file() "r" for the file mode, not O_RDONLY.

Unlike BIO_new_fp(), BIO_new_file() takes an fopen-style mode string.

3ba807b70fdf6d2f1ae986b4b6e847287cb535d6 authored over 2 years ago by Todd C. Miller <[email protected]>