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

Include error string when formatting a SLOG_PARSE_ERROR message if present.

6c52056d366dfa62e69315de3135ad42cf222a12 authored over 1 year ago by Todd C. Miller <[email protected]>
Add missing include of errno.h.

0be5a5191852ec50f96b6a759ce5b2e17ed0aab5 authored over 1 year ago by Todd C. Miller <[email protected]>
sudo_lbuf_expand: check for overflow when rounding to the nearest power of 2.

Problem deteced by oss-fuzz using the fuzz_sudoers fuzzer.

3281d0eec481c5a32c1127b4b5e921989ad01857 authored over 1 year ago by Todd C. Miller <[email protected]>
Fix --enable-static-sudoers, broken in sudo 1.9.13.

sudo_qualify_plugin() should not try to fully-qualify the path to
a statically-compiled plugin. ...

91814990aa9e200bdd85a64524baab42f54d74a4 authored over 1 year ago by Todd C. Miller <[email protected]>
Add sudoers open errors to the list of parse errors sent via mail.

Previously there would be one email for the open failure and a
separate one describing the parse ...

fb6740fa2e5786cbd2b93c46697c7e641076b9be authored over 1 year ago by Todd C. Miller <[email protected]>
visudo: quiet a compiler warning on Solaris 10.

Also explicitly close /dev/tty fd instead of relying on closefrom()
in case the fd ends up being ...

1641c30ed63b5f73dba049b6527c89a11667293d authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #244 from ffontaine/main

configure.ac: fix openssl static build

05c866b6e109b1ece6d68246f251786a275fc6df authored over 1 year ago by Todd C. Miller <[email protected]>
Replace LIBMD with LIBCRYPTO display crypto/tls libs in summary.

We can only have one of either -lmd, -lgcrypt or -lcrypto so there
is no need to have more than o...

8bb116062449c587bcb3328843bfd99f57eba602 authored over 1 year ago by Todd C. Miller <[email protected]>
configure.ac: fix openssl static build

Do not use AX_APPEND_FLAG as it will break static builds by removing
duplicates such as -lz or -...

1fed5adc166d5f2190a6b6ad048ec2d803316327 authored over 1 year ago by Fabrice Fontaine <[email protected]>
Fix potential double free for rules that include a CHROOT= option.

If a rule with a CHROOT= option matches the user, host and runas,
the user_cmnd variable could be...

87ce69246869d9b9d69be278e29e0fc6a3cabdb9 authored over 1 year ago by Todd C. Miller <[email protected]>
Check tcsetpgrp() return value.

ba7b12645195608a2e5f04f437872435f502f887 authored over 1 year ago by Todd C. Miller <[email protected]>
Run the editor in its own process group.

This fixes suspending the editor on GNU Hurd which doesn't seem to
have proper process group sign...

03393371037e5391a53e38e639b8fd17126e440a authored over 1 year ago by Todd C. Miller <[email protected]>
Stub out pivot_root() and unpivot_root() for all but the sudoers module.

1bcddb9602eeac0ff5543c5e85da5401cd94e24d authored over 1 year ago by Todd C. Miller <[email protected]>
Fix build when SUDOERS_NAME_MATCH is defined.

8b9c1b962fa1b511fdd134fb7874143227198449 authored over 1 year ago by Todd C. Miller <[email protected]>
Add canon_path(), a realpath() wrapper that performs caching.

This also adds a new user_cmnd_dir variable that stores the
canonicalized parent directory of the...

0ef537367884d657ed7f9433eebf01a02130a1b4 authored over 1 year ago by Todd C. Miller <[email protected]>
set_cmnd_path: apply runchroot if set when finding the command path

Previously we would prepend runchroot to the path we were checking
but that does not properly han...

bff4e3ce16f287f18ad23e290c22820e1de9dd03 authored over 1 year ago by Todd C. Miller <[email protected]>
Add pivot_root() and unpivot_root() to switch the root dir and restore it.

This will be used to more accurately handling command resolution and
path matching when a new roo...

13a311bc712367814eec5590a8bdb5e17a948e2e authored over 1 year ago by Todd C. Miller <[email protected]>
match_command: apply runchroot if set when matching the command

Previously we would prepend runchroot to the path we were checking
but that does not properly han...

78ff514358ea9f5cc614599e7b26e8d7cad6c05f authored over 1 year ago by Todd C. Miller <[email protected]>
Match using canonicalized directories where possible.

b52631e8777ae9334e403259d211fb980aebc848 authored over 1 year ago by Todd C. Miller <[email protected]>
ptrace_intercept_execve: preserve old argv[0] after policy check.

We have to replace argv[0] with the pathname for the policy check
but want to restore it afterwar...

8d95992c1a1be8b89c6f560565e7c0a2169b29d6 authored over 1 year ago by Todd C. Miller <[email protected]>
Move initial values into AC_SUBST() where possible.

440d9649a8412c7be5746a8384767c50a6fe619b authored over 1 year ago by Todd C. Miller <[email protected]>
No need to AC_SUBST() standard autoconf variables.

7c6f3735879ba079f0be03fd6bf6726a4d876673 authored over 1 year ago by Todd C. Miller <[email protected]>
Document --disable-largefile and --disable-year2038.

ceee445e8cfebdb7c0ade6aca678b76e2d778ff3 authored over 1 year ago by Todd C. Miller <[email protected]>
Fix indentation of intercept file in summary output.

b8c13bbe8953d2e2cc1e962dc5cdd8d27e8181fb authored over 1 year ago by Todd C. Miller <[email protected]>
get_starttime: add support for GNU Hurd using the mach task_info call.

This is currently Hurd-specific but could be made Mach-generic as
long as the equivalent of pid2t...

a72bc5e6bf45cea7fbb349e53e05dc7a580be4de authored over 1 year ago by Todd C. Miller <[email protected]>
Only test get_starttime() on platforms where we support it.

Fixes a test failure on systems where we have no way to determine
a process's start time.

0b000aab8689cbe1e919152a1306e0149d36cc60 authored over 1 year ago by Todd C. Miller <[email protected]>
Sudo 1.9.13p1

58382028aabb3087fe490f76421d0c81d3e83171 authored over 1 year ago by Todd C. Miller <[email protected]>
Use m4_bmatch, m4_case does not support shell-style globbing.

42163ac0a950e050acd9a57a3edfc960121af380 authored over 1 year ago by Todd C. Miller <[email protected]>
Allow configure.ac to be processed by autoconf 2.69.

AC_PROG_CC_STDC is deprecated in autoconf 2.70 and above but it is
necessary for autoconf 2.69.

2feea9b2f6589744d30ae103a95672da09bb1ec2 authored over 1 year ago by Todd C. Miller <[email protected]>
Only use AC_SYS_YEAR2038 if it is defined.

Otherwise, use the method from 1.9.12.
GitHub issue #242

d7080afe0e2545cfad18ce7e66276d03a1795cf4 authored over 1 year ago by Todd C. Miller <[email protected]>
Sudo-specific executables moved to /usr/libexec/sudo starting in

Debian 12 (Bookworm) and Ubuntu 22.04 (Jammy Jellyfish).
Previously, they were stored in /usr/lib...

439f0734f5a882a853657bb2636ac04de5d96b13 authored over 1 year ago by Todd C. Miller <[email protected]>
Handle "locale -a" returning both C.UTF-8 and C.utf8.

It is possible to have mutiple matches from the output of "locale
-a". Just take the first one. ...

2845ceafb06d728b60a9d79d9d51a966e5ef66c2 authored over 1 year ago by Todd C. Miller <[email protected]>
Add some missing files to the clean and distclean targets.

4f50692accc54c6bfdddc933324be3b1d11bcb14 authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #240 from thesamesam/c23

sudo_fatal: Fix build where compiler recognises [[noreturn]] attribut…

a845039de5f580cc52f0a67f0565b01598f52c5d authored over 1 year ago by Todd C. Miller <[email protected]>
sudo_fatal: Fix build where compiler recognises [[noreturn]] attribute (C23)

If the compiler supports [[noreturn]] as a attribute as in C23,
then we define sudo_noreturn to ...

66359c2bc9b314bd2754e36c2d3e8ade76969fbc authored over 1 year ago by Sam James <[email protected]>
Add missing '[' to AS_IF() call.

Fixes GitHub issue #238.

defec5d46eec7345b62060049f72215ffd7f3e7e authored over 1 year ago by Todd C. Miller <[email protected]>
Add compiled version of the sudoers Georgian translation.

a80dcc6aca20e4d50569d4f7b2559eb92106da2e authored over 1 year ago by Todd C. Miller <[email protected]>
Do not ignore .mo files.

Otherwise we are likely to miss uncommitted changes in them.

5eed6adb6f0e1b7a88cc22e8359bcf097f4ec70d authored over 1 year ago by Todd C. Miller <[email protected]>
Regenerate .mo files.

f1b07aed478b05f1f53c41df210c2880870fa389 authored over 1 year ago by Todd C. Miller <[email protected]>
Add checks for realpath(3) and a version from NetBSD for those without it.

0443d1457866becb554072237bd883723fd3b425 authored over 1 year ago by Todd C. Miller <[email protected]>
No longer need to define sudoers_recovery here.

bdef2ad6d2887ea864b884ab5a179e15a5090d7d authored over 1 year ago by Todd C. Miller <[email protected]>
Mention that a missing include file is no longer fatal.

0008d1f719947f4838318f7b754d5e6a58d449be authored over 1 year ago by Todd C. Miller <[email protected]>
Recover from missing include file unless error_recovery is disabled.

It is still treated as an error from a logging perspective, and
mail is still sent.

26385b45cfe6910f4020d2305ae81d1ee2ea7a09 authored over 1 year ago by Todd C. Miller <[email protected]>
Add eventlog_mail() to send a log message via mail.

This is used by mail_parse_errors() to send multi-line messages.
Previously, the newlines would b...

b333d16878ef5328b5637731aea50a37c24eb840 authored over 1 year ago by Todd C. Miller <[email protected]>
send_mail: pass a single string instead of using varargs

These days we only ever pass in a const string.

b6caacfe4e03c171fe73eef2e7180a16b1f9d96c authored over 1 year ago by Todd C. Miller <[email protected]>
Substitute for _PATH_SUDO* variables in pathnames.h.

Previously these were hard-coded with Makefile overrides.

9ad6dfa371073352e183d56c6e68bbae12998129 authored over 1 year ago by Todd C. Miller <[email protected]>
Use AS_IF instead of if; then where possible.

2e1a73502e39e2c7d9c0a40f2355011f75b2d102 authored over 1 year ago by Todd C. Miller <[email protected]>
Mention the fix for GitHub #237.

cfa1fee6225a39fc638a8245f3b43cbf7466a275 authored over 1 year ago by Todd C. Miller <[email protected]>
Updated translations from translationproject.org

8960f509614724366f81dfa58522e710bb50e7e0 authored over 1 year ago by Todd C. Miller <[email protected]>
Display error in error message if we can't restore the terminal.

f160e5e6c651847570c43b4f013942b5b3cef537 authored over 1 year ago by Todd C. Miller <[email protected]>
Display an error message if unable to restore terminal settings.

15b4cde6921b1fa0fe32aa76a1e861d8bf1fe1a1 authored over 1 year ago by Todd C. Miller <[email protected]>
Get rid of sudoersdir and just use sysconfdir.

There is no need for sudoersdir when it is always just set to sysconfdir.

1758c49d3e21621189c86c4c57f4ec5e43348dc9 authored over 1 year ago by Todd C. Miller <[email protected]>
pty_finish: only restore the terminal if sudo is the foreground process

678d6664a92c61fd8362a5c141639f6703e1b4d2 authored over 1 year ago by Todd C. Miller <[email protected]>
Better background job detection when running a command in a pty.

If sudo is not the process group leader and stdin is not a tty, we
may be running as a background...

7cb23c85a1257a0ff7a2056703bb933fc32eac52 authored over 1 year ago by Todd C. Miller <[email protected]>
suspend_sudo_pty: stop the process group even if sudo is not the leader.

When sudo is not the process group leader, we still need to stop
sudo's process group and not jus...

4fb98556349e330ac8ea06afe144280f58369418 authored over 1 year ago by Todd C. Miller <[email protected]>
Add debug tracing to tcsetattr_nobg().

e63eeee7b44bf1d8394ff4abacef85f2b69b0f65 authored over 1 year ago by Todd C. Miller <[email protected]>
Avoid compilation errors if getaddrinfo() or freeaddrinfo() are macros.

If this is the case we probably can't stub out the functions but
at least the fuzzer will compile.

3c9c8668c10e1f9b42ef25bed7777c20cbb9428b authored over 1 year ago by Todd C. Miller <[email protected]>
Initialize the integer result parameter passed to SIOCGIFANUM.

It appears that passing in a non-zero value causes the ioctl() to
fail. From Tim Rice.

7c5f0d3052bba65ea7cabeaa1a29dc7405678eb6 authored over 1 year ago by Todd C. Miller <[email protected]>
Protect use of AF_INET6 with HAVE_STRUCT_IN6_ADDR guards.

From Tim Rice.

0b2e662b2e125ee17413c7f2faad09c01736fa3b authored over 1 year ago by Todd C. Miller <[email protected]>
Add configure test for NSIG, _NSIG or __NSIG.

This is better than just defining NSIG in sudo_compat.h if it is
not defined since signal.h may n...

ffb09be49d5fd315a2cb25b2039f766ab5cce491 authored over 1 year ago by Todd C. Miller <[email protected]>
Avoid DNS lookups when fuzzing.

49df977c2f583b20547eb4c2b1d7ca605029ee2b authored over 1 year ago by Todd C. Miller <[email protected]>
No longer need to treat Rocky or Alma Linux specially.

We now treat them the same as RHEL.

23237bb0067371c675552797aad91b1761778f67 authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #230 from trackers-lover/main

Return value does not match

6d945448ef7d3ad513b43e90f0f4f3dda81b57ee authored over 1 year ago by Todd C. Miller <[email protected]>
Modify return value parameter

8797f0ceb97a6edae244814b0cacd2d95e6157f4 authored over 1 year ago by [email protected] <[email protected]>
Store conf hash in vm_servers instead of vmid.

Add a shutdown command fallback to the conf file.

b257df55daf3f421a744b9e3c004668eaf574515 authored over 1 year ago by Todd C. Miller <[email protected]>
Updated translations from translationproject.org

179ad08c86b845e6b9a47ee179a5ee6c14b32678 authored over 1 year ago by Todd C. Miller <[email protected]>
Fix a typo.

1977f98d213320b5fbe2335cc67aabda395afba4 authored over 1 year ago by Todd C. Miller <[email protected]>
Regen with latest autoconf git.

fd0021ee5c60ffbe8d2eb0dd31e3d04652dac606 authored over 1 year ago by Todd C. Miller <[email protected]>
Recognize Alma Linux and Rocky Linux (Open Source RHEL clones)

53389b574397b32d8343319b8bb94fc93c4c8c05 authored over 1 year ago by Todd C. Miller <[email protected]>
Mention the recent intercept/log_subcmds fix.

b4325e64c88670856e7fb14baf456c41ba145edb authored over 1 year ago by Todd C. Miller <[email protected]>
Fix determination of the number of CPU cores on Linux.

94eafd2f08fbc0bf04bdf84c8a8717200220a1a4 authored over 1 year ago by Todd C. Miller <[email protected]>
New Georgian translation from translationproject.org

ab9b20be9eef7468228ad97ea87ec1c70e34c62d authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #235 from kernelmethod/apparmor_dependencies

Replace the Debian libselinux1 dependency with libapparmor1

3b3089e4f53b3ac946e50b6fd8a496a298ef7c05 authored over 1 year ago by Todd C. Miller <[email protected]>
Replace the Debian libselinux1 dependency with libapparmor1

Debian >= 10 uses AppArmor by default instead of SELinux, so
SELinux-related sudo features are t...

8c9a8933b25bc1b69b59ed9bb21288250c73d338 authored over 1 year ago by kernelmethod <[email protected]>
get_execve_info: defer setting pathname until argbuf is finalized

If we reallocate the buffer (via growbuf()) in ptrace_read_vec(),
the address of argbuf may chang...

fe001b6ffedb783f92fce34042de8a482897b342 authored over 1 year ago by Todd C. Miller <[email protected]>
Correct error message when command doesn't exist in intercept mode.

Previously, we would always use EACCES, even when ENOENT was
appropriate. This also affected log...

a32a54dced422b9b40970b182646c16e40c82fa9 authored over 1 year ago by Todd C. Miller <[email protected]>
Update .pot files for 1.9.13

de021b60db7a7d5599e12899e5cdcf77a10ec2ae authored over 1 year ago by Todd C. Miller <[email protected]>
Update for 1.9.13.

b9dc472bba7c9209aca7aa50ca06c555059bc6ed authored over 1 year ago by Todd C. Miller <[email protected]>
Include elf.h, not linux/elf.h but define NT_ARM_SYSTEM_CALL if missing.

Older kernel headers are missing the definition of EM_ARM in linux/elf.h.
GitHub issue #232

d3afffec757b6903c5ae0143978714cf511fc7d7 authored over 1 year ago by Todd C. Miller <[email protected]>
Add tests for escaped digits.

e11bb93e2655dc5840494b1c88a656c205f05e99 authored over 1 year ago by Todd C. Miller <[email protected]>
check_pattern: handle escaped digits since GNU libc accepts them.

f6340068d1b2e0f2c9d6a234a639c37c90f712a2 authored over 1 year ago by Todd C. Miller <[email protected]>
Add eventlog_store_sudo() and use it in sudoreplay.

This replaces the custom log formatting used by "sudoreplay -l".

2d9c0d9034e254a12c298d2c1a8eb4c625492116 authored over 1 year ago by Todd C. Miller <[email protected]>
Add --build-only flag to skip building packages.

733303ed968e11ccad992c570936cfdcf32b090d authored over 1 year ago by Todd C. Miller <[email protected]>
Suport building packages on DragonFly BSD.

ec79bbc8e0de4bd83e2f7cb9c2bbf94f85ff5977 authored over 1 year ago by Todd C. Miller <[email protected]>
Try to link a simple shared object with -Wl,--no-undefined.

This only works for gcc-style compilers, which should not be a
problem. The source uses environ ...

f65a51afdffeb66298de2eddd661520baa1b1a6a authored over 1 year ago by Todd C. Miller <[email protected]>
Pass the name to the config.cache file to the build script.

If --cache-file is not specified, no config.cache file will be used.
Add an "omit_artifacts" sett...

0010c9861343a23fa1dbbe06872577cf3351747c authored over 1 year ago by Todd C. Miller <[email protected]>
check_pattern: accept a backslash before the numeric bound like glibc.

This helps avoid out-of-memory conditions when fuzzing on Linux.

ee2f2287a69d754b6ca0c5d864b5afd9e206fbc5 authored over 1 year ago by Todd C. Miller <[email protected]>
Don't use -Wl,--no-undefined with the sanitizers/fuzzers.

It breaks linking when using -fsanitize with clang at least.

7a64275a3d511fc44befd370c7da457317f03ed7 authored over 1 year ago by Todd C. Miller <[email protected]>
Add a link to the sudo security advisories archive.

c6cc6800693505a07e5818fc74dc4fde5b218a0e authored over 1 year ago by Todd C. Miller <[email protected]>
Eliminate usage of obsolete 2-argument AC_CHECK_TYPE macro.

f7265f5de290adf4442853f9499f4a6c7084046c authored over 1 year ago by Todd C. Miller <[email protected]>
Add support for the struct kinfo_proc on Dragonfly BSD.

9ddae66818e80c85c94201eb9166fcaad79ed1d3 authored over 1 year ago by Todd C. Miller <[email protected]>
Need to link sudo and sudoers with -lutil on Dragonfly BSD.

It is safer to just search for setusercontext() in libc and libutil
instead of matching on the op...

cb56fd2edb1fec18b5c7bfed804ac53115023b65 authored over 1 year ago by Todd C. Miller <[email protected]>
Elminate the $OS variable, we can just use $host_os instead.

d409ba67c694a3b66d6d2cc8b25d86a6dcf4215c authored over 1 year ago by Todd C. Miller <[email protected]>
Restore the line that set errno to ENOENT when find_path() fails.

This was inadvertently removed when the "goto bad" was added.

1e0bb704c2173f7f7f9a0e97c03b37bfec7100bd authored over 1 year ago by Todd C. Miller <[email protected]>
Add -Wl,--no-undefined to LDFLAGS if it is supported.

This will find missing symbols at build-time instead of run-time.
Don't use it on FreeBSD where e...

83b4cee98a77768eb2693fc39db86a4ed7910c04 authored over 1 year ago by Todd C. Miller <[email protected]>
The sample plugin is now built by default to avoid bit rot.

GitHub issue #234.

e3583e01b84ea65b9cda60a87e9d1c40b90b2a21 authored over 1 year ago by Todd C. Miller <[email protected]>
The change from sudo_printf -> sudo_plugin_printf was incomplete.

Fixes GitHub issue #234.

4f9da47e55192a7a129cb7b960e4263953572d32 authored over 1 year ago by Todd C. Miller <[email protected]>
Solaris: use lt_prog_compiler_pic instead of assuming -KPIC

544c978217c6ba6c7b6b6014246ae24852ca894a authored over 1 year ago by Todd C. Miller <[email protected]>
Solaris: the aslr, nxheap and nxstack link options are only for executables.

Move them back to PIE_LDFLAGS, which is only used when linking a binary.

e72d75d38e518728e5a90f1e37080de1d5947674 authored over 1 year ago by Todd C. Miller <[email protected]>
Solaris: move aslr linker option to hardening and try to build real PIEs

These flags are specific to the Solaris linker.

7d4666656e3314fd65c01fac47a38ef7b9d6761e authored over 1 year ago by Todd C. Miller <[email protected]>