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

check_user_runcwd: only allow sudo's -D option if sudoers specifies a runcwd.

Previously, the user could specify the runas user's home dir for
"sudo -i" or the user's existin...

1c7a20d7447937cd2e29b61c9c013f5b1df76fd6 authored over 1 year ago by Todd C. Miller <[email protected]>
testsudoers: add support for NOTBEFORE and NOTAFTER

Also adds -T option to set the value of "now".

2c1a473ddc95652ae2589f8a3c18c3e2c54dc076 authored over 1 year ago by Todd C. Miller <[email protected]>
Avoid compiler casting warnings Part 2

This saves instructions that are related to casting as well as compiler warnings.

22079c3072d3548d44b32d805cc12329727a3c8c authored over 1 year ago by Rose <[email protected]>
Rename parse.c -> lookup.c now that it only contains sudoers_lookup.

f2a274b061fc542eef9670d660ed2d9f21afae0a authored over 1 year ago by Todd C. Miller <[email protected]>
Split display_privs() and display_cmnd() out of parse.c into display.c

8b640329d38e4bd5a47507c8d69e9718e113ff0f authored over 1 year ago by Todd C. Miller <[email protected]>
No need to round up to page size with sudo_mmap_alloc().

1ba61cd13a5a726f77b35c82598b54d3af387531 authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #265 from AtariDreams/types

Avoid compiler casting warnings by assigning to variables of the same type where possible

f437c66a2a5520e9643d8f793c8f4932cbd01ec4 authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #277 from AtariDreams/debug_return_int(1);

We should be returning 0, not 1, when logservd finishes without errors

e0238ab210c839c42ba43d68137751dcf8bc9c82 authored over 1 year ago by Todd C. Miller <[email protected]>
We should be returning 0, not 1, when logservd finishes without errors

1 is for failure, 0 is for no failure, and this does not look like a failure.

2c13d7130c656d720f7fb0041e82fca7f0908d4c authored over 1 year ago by Rose <[email protected]>
Avoid compiler casting warnings by assigning to the same type where possible

This saves instructions that are related to casting as well as compiler warnings.

e54ba33ea07522261c893bfe9faef1288f8d78b6 authored over 1 year ago by Rose <[email protected]>
Fix undefined symbol on macOS for intercept mode and log_subcmds.

macOS does not support direct access to the environ pointer from a
shared object. We need to re...

a0b074cc9c90247419771ff639706715213cfd8f authored over 1 year ago by Todd C. Miller <[email protected]>
check_user_runcwd: allow -D option if it matches the cwd in sudoers

Previously, check_user_runcwd() would return true if the runcwd
matched the user's cwd, even if ...

e7d4c05acea3f15fd8bcc4949acb7e06940284c1 authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #275 from AtariDreams/emergency

Set command_info to NULL once it is freed

a2a87323eb4ba046f522f2c0c19acadee3aa2fa2 authored over 1 year ago by Todd C. Miller <[email protected]>
Set command_info to NULL once it is freed

The lack of setting to NULL is a holdover from when command_info was a local variable and not a ...

0bb41ed82a5849b0c64d7046662825d84e983e4d authored over 1 year ago by Rose <[email protected]>
Merge pull request #274 from bin-ly/main

Modify the is_script function for match_command.c

676066e2aad180923be9e434ecf8631e5969f5d0 authored over 1 year ago by Todd C. Miller <[email protected]>
Modify the is_script function for match_command.c

f8a45e8a54ab410a0eb8d98eed966077ec946f75 authored over 1 year ago by binlingyu <[email protected]>
Mention C99 requirement.

7fb98a9a335a5b7c6b70221a2e39c824e0f26874 authored over 1 year ago by Todd C. Miller <[email protected]>
Reference SETENV-related settings in the command environment section.

Based on GitHub PR #273 from Ilya Kulakov.

e0ee845dfcd92b864a649a9b750e86cc1e7e9e24 authored over 1 year ago by Todd C. Miller <[email protected]>
Sudo requires a C99 compiler due to the use of flexible array members.

733d5291b4ed2af74f6874f48e0e389951147d22 authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #266 from AtariDreams/c99

Do variable length arrays the C99 way

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

correct the return value type of function alias_find_used

69b486d462b67e5811ebaac61eb760da0d243ef6 authored over 1 year ago by Todd C. Miller <[email protected]>
Clarify that use_pty is on by default starting with 1.9.14.

5d2b1761f63e3787c6f956249e0bd7c075924e63 authored over 1 year ago by Todd C. Miller <[email protected]>
Sudo runs the command in a pty by default in 1.9.14 and above.

afb09e0044109a4c5f3ed30d7905b90527bb340d authored over 1 year ago by Todd C. Miller <[email protected]>
Add commented out example for disabling use_pty.

4da1f373de676a2cd6b84c5e61f5f63351edb90c authored over 1 year ago by Todd C. Miller <[email protected]>
Do variable length arrays the C99 way

Variable length arrays are supported by C99, but having it denoted as "1" confused the compiler ...

7fd680c983f8be61b11ecc438bcdb40afb0eb905 authored over 1 year ago by Rose <[email protected]>
Update Xcode version from 13.2.1 to 13.4.1.

64b666471a9010ad1f52533bac1e51db1d4d1882 authored over 1 year ago by Todd C. Miller <[email protected]>
Add plugins/sudoers/regress/testsudoers/passwd to MANIFEST.

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

c5c589da0426a98d529752b6782a9dfc14382d7d authored over 1 year ago by Todd C. Miller <[email protected]>
Document recent bug fixes.

4f9185f4c559df7167c7622d2b60b3f53fb19de5 authored over 1 year ago by Todd C. Miller <[email protected]>
Add tests to exercise recent runas user and group bug fixes.

baf482763ce0960983139aa2e771c8cdea60647d authored over 1 year ago by Todd C. Miller <[email protected]>
Add test to exercise the bug that prevented the group specified via

"sudo -g" from matching when a Runas_Alias was used in the user or
group portion of a Runas_Spec.

0d17325039807361a87cd4c82d4b24cc1fec6158 authored over 1 year ago by Todd C. Miller <[email protected]>
runaslist_matches: split out user_list and group_list matching.

This makes it possible to call the appropriate runas user or group
list match function when reso...

78e65e14ea18278a904beddd54b964609b715762 authored over 1 year ago by Todd C. Miller <[email protected]>
runaslist_matches: remove special case to handle "sudo -g group"

Now that we are guaranteed to have a runas user list for all sudoers
rules that contain a runas ...

8c1559e0e34fa83b061f148b63fc8e091a4b2517 authored over 1 year ago by Todd C. Miller <[email protected]>
Populate runasusers even when only a grouplist is specified.

When a sudoers rule permits the user to run commands as a group,
not a user, we should set the r...

64ab8cd23643feced561a1aabcc6be547e81ad58 authored over 1 year ago by Todd C. Miller <[email protected]>
runaslist_matches: fix bug when no runas list is specified in sudoers.

If a sudoers rule has no runas list, a user-specified runas group
should only be allowed if it m...

471028351650aa4477e59a1701608ffae5b1d4a2 authored over 1 year ago by Todd C. Miller <[email protected]>
Python may be built with 32-bit time_t support on 32-bit platforms.

We need to undef the SIZEOF_TIME_T from pyconfig.h so it does not
conflict with our own.

a28d2d412819a5d2f996fc5454eb7d809e8537d2 authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #272 from millert/main

Avoid use of variable length arrays and add ctype(3) casts.

ac46157e9457145cd67716a06245d5c9391ca087 authored over 1 year ago by Todd C. Miller <[email protected]>
Avoid use of variable length arrays and add ctype(3) casts.

8fbdd414ce515b3c032f9413257fb061f69d9260 authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #270 from moehanabi/main

Add %n$s support for sudo_lbuf_append_v1

ee4f210f32055832cc802244c9eeef4c16020697 authored over 1 year ago by Todd C. Miller <[email protected]>
Add %n$s support for sudo_lbuf_append_v1

932339ed9f4cc015e66cf3f2460f00471acb327a authored over 1 year ago by Brilliant Hanabi <[email protected]>
correct the return value type of function alias_find_used

b4dcac650fb5084e97401ec5d10bee40550ba865 authored over 1 year ago by bianguangze <[email protected]>
Updated translations from translationproject.org

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

2c58d807511c9b22f83dbad0fb3a24f258bf9d19 authored over 1 year ago by Todd C. Miller <[email protected]>
Mention Bug #1050 fix.

2077b5157460e8f5e261b39cc7dbac2d037c0ad4 authored over 1 year ago by Todd C. Miller <[email protected]>
Add NETGROUP_QUERY option for servers that can't match nisNetgroupTriple.

This can be used to support netgroup queries on systems that lack
the innetgr() function and wher...

3786654dbd37fa7f56d13c1e90464319fc2f2215 authored over 1 year ago by Todd C. Miller <[email protected]>
sudo_ldap_check_non_unix_group: pass nss pointer to netgr_matches()

This allows us to use the LDAP-specific version of innetgr() when
possible. Also enable "use_net...

6fddb2875c23c437f4fe911e92435b9fa3ac35c3 authored over 1 year ago by Todd C. Miller <[email protected]>
Only call ptrace_verify_post_exec() for intercept, not log_subcmds.

245c56bac1edc228983f0c4b9077de4328dde9c3 authored over 1 year ago by Todd C. Miller <[email protected]>
sudo 1.9.14

c7070b0475abd4e5a1bc7a3c565af92e4666c915 authored over 1 year ago by Todd C. Miller <[email protected]>
run_command: back out changes to run editor in its own process group.

It unnecessarily complicates things to work around bugs in an OS
almost no one runs.

2392ee9d7dae8689fa92efa6901a82ea0559c3a6 authored over 1 year ago by Todd C. Miller <[email protected]>
Make suspend_parent.c out of lib/util and into src.

Nothing else uses it now.

95cd40907989ae706001fb9e29de7cc79dfdae23 authored over 1 year ago by Todd C. Miller <[email protected]>
Initialize digest_type to SUDO_DIGEST_INVALID, not -1 and make it unsigned.

This makes the digest type consistently unsigned instead of a mix
of signed (for the -1 value in ...

1278e36ff38ba3bfda29d1fdd7e2dcdb4ba1aba3 authored over 1 year ago by Todd C. Miller <[email protected]>
Fix typos and update excluded/ignored codespell lists.

d633d82f228a0ff0fdcaae0daf0c30276c520223 authored over 1 year ago by Todd C. Miller <[email protected]>
run_command: check that ttyfd is not -1 before using it

0986a8846e5c11d332d44fdf63e2b35c05ebf817 authored over 1 year ago by Todd C. Miller <[email protected]>
Work around a macOS a kernel bug where tcsetpgrp() does not restart.

I reported this bug to Apple over 12 years ago.

4d417b46d9f9028c5050a55a62637ea61e807158 authored over 1 year ago by Todd C. Miller <[email protected]>
run_command: run editor in foreground if visudo is the foreground process

The command is now always run in its own process group. If visudo
is run in the foreground, the...

be20e1592f58f7d7e2972db835d0994e7a79ab2c authored over 1 year ago by Todd C. Miller <[email protected]>
Accept carriage return for EOL in addition to newline.

Since visudo doesn't alter the terminal settings it is possible for
the terminal to have the ONL...

7e28e60b56157fd49f3a284fea67ae5d2edaf7e4 authored over 1 year ago by Todd C. Miller <[email protected]>
check_fill: sudoers_strict() is now a function, not a global variable

91f100f5bc37949faf146a3cd56edfbb15b2d80e authored over 1 year ago by Todd C. Miller <[email protected]>
Move parser prototypes / externs from sudoers.h to parse.h or toke.h.

f352ef5d67995b1dcdb15d32c168fd4e7ceacbdc authored over 1 year ago by Todd C. Miller <[email protected]>
parse.h is already included by sudoers.h.

01ff7c476de43c345ab081bdb4b4d387b7c3ee36 authored over 1 year ago by Todd C. Miller <[email protected]>
Rename parser_conf -> sudoers_conf in all but the parser itself.

bde363e060417cdee37f4cd6afae3bf0ec0f7a70 authored over 1 year ago by Todd C. Miller <[email protected]>
Move sudoers search path to struct sudoers_parser_config.

That way we can avoid passing it to init_parser() directly.
We still need sudoers_search_path to...

8cbd5462a6dace8fb62b71a330b9f6d0bbe03a16 authored over 1 year ago by Todd C. Miller <[email protected]>
Add struct sudoers_parser_config and pass it to init_parser().

This struct contains parser configuration such as the sudoers file
uid/gid/mode and parse flags ...

9d7c30c5a85e3b9f80487cdc86ca23fe2ae25be6 authored over 1 year ago by Todd C. Miller <[email protected]>
push_include_int: Avoid passing close(2) a negative value on error.

Coverity CID 314108

fb9d0d79a7eb11dfe37073365efa780a4e950b0c authored over 1 year ago by Todd C. Miller <[email protected]>
Eliminate dead store. Coverity CID 315032.

f722272b7cbe0a0b4b509352922f54e2b9dde762 authored over 1 year ago by Todd C. Miller <[email protected]>
iolog_gets: change size parameter to int to match fgets/gzgets

Return an error, setting errno to EINVAL, for negative sizes.

2f4b4068097ee26b9a46f2d24a6782db65c74494 authored over 1 year ago by Todd C. Miller <[email protected]>
Rename force_umask to override_umask and make it private to sudoers.c.

Add getter for policy.c.

c0fa3a4d24ca2329c9c2454aa32a78a99fd46ac6 authored over 1 year ago by Todd C. Miller <[email protected]>
Make timestamp_uid and timestamp_gid private to timestamp.c.

Add getter (for set_perms.c) and setter (for sudoers.c).

72489d7a83e6d3d55c22d1c9cb30529e6efd5d36 authored over 1 year ago by Todd C. Miller <[email protected]>
Make login_style private to bsdauth.c

Add a setter for policy.c to handle auth_type from the front-end.

d5de5890f5134affd25702d4fe4d8eeb857e7bf2 authored over 1 year ago by Todd C. Miller <[email protected]>
Back out last change, len must be int, not size_t, for %.*s.

cda03ed13fc7a8a8c040282420c726f41ef29816 authored over 1 year ago by Todd C. Miller <[email protected]>
Use a "%s" format instead of using a translated string as the format.

27ea64bacd5aebfd2c8f4f58f2161475b766cf4a authored over 1 year ago by Todd C. Miller <[email protected]>
Merge pull request #260 from AtariDreams/size_t

Prefer size_t over int, as casting can take extra instructions

16191bb3d1b4e488f96f05345a17b35907c40dfe authored over 1 year ago by Todd C. Miller <[email protected]>
Prefer size_t over int, as casting can take extra instructions

459a49b1fe1ccd02e61ca0d793fcbe2f8872593b authored over 1 year ago by Rose <[email protected]>
Rename init_parser_ext() to init_parser() and remove old wrapper.

There was only one consumer of the init_parser() wrapper now that
reset_parser() has been introd...

bbbaea5b2f4ee92ca736dffb119b0015c8f5eee7 authored over 1 year ago by Todd C. Miller <[email protected]>
Add reset_parser() and use in place of init_parser(NULL).

f258a15df5e027f2d4f1d1081a81d0a57e5f6934 authored over 1 year ago by Todd C. Miller <[email protected]>
Make path_ldap_conf and path_ldap_secret private to policy.c.

Add getters for both so the ldap code can access them.

80768ed3a892ecd2cfdc5900ba7d5f7d763ef359 authored over 1 year ago by Todd C. Miller <[email protected]>
Make sudoers_file private to policy.c and visudo.c.

We just need a way for the policy (and visudo) to override the
default sudoers path. This adds ...

f553ddc4305be39967026999954955cddfd35560 authored over 1 year ago by Todd C. Miller <[email protected]>
Support adminconfdir for relative include paths in sudoers.

5446b009e3291c09d90b78c271152a8382706cfc authored over 1 year ago by Todd C. Miller <[email protected]>
Track the destination sudoers path for each parsed file.

When adminconfdir is enabled, the destination pathh may be different
from the path we opened. W...

7a6ac5d26e930fd3b681b4530ab679412031c823 authored over 1 year ago by Todd C. Miller <[email protected]>
Add adminconfdir and --enable-adminconf to set it.

Configuration paths in sudo are now a colon-separated list of files
with the adminconfdir instanc...

d4c6ef1222bbc3bbb01220e9dbf6b7296d235d84 authored over 1 year ago by Todd C. Miller <[email protected]>
Convert config file paths to colon-separated path list.

This means that _PATH_SUDO_CONF, _PATH_SUDOERS, _PATH_SUDO_LOGSRVD_CONF,
and _PATH_CVTSUDOERS_CON...

4363d03ef7c681ba2ec727562e076149691391db authored over 1 year ago by Todd C. Miller <[email protected]>
Support sudoers_file being a colon-separated path of files.

The first file found is used.

f17b35471f8c744772ffc3e997767a8baf3ec2e0 authored over 1 year ago by Todd C. Miller <[email protected]>
Regenerate with latest autoconf from git.

a7e906ff6604b2565a99e60c629698352dbd80de authored over 1 year ago by Todd C. Miller <[email protected]>
No longer need to set AI_NUMERICSERV while fuzzing.

Now that getaddrinfo() is stubbed out while fuzzing we can remove
the hack that set AI_NUMERICSERV.

978aa90021c439235a504b2405d0d6ca2cb15c1c authored over 1 year ago by Todd C. Miller <[email protected]>
getaddrinfo stub: set sin_port

d1f2452c08a052592fa0f43cc91f77ec777b71b0 authored over 1 year ago by Todd C. Miller <[email protected]>
Avoid NULL deref in stub getaddrinfo() when nodename is NULL.

Also add support for parsing servname. We only need to support a
subset of getaddrinfo() functio...

2898c85119660c07e4342957429ac8ae2bc782bd authored over 1 year ago by Todd C. Miller <[email protected]>
Add missing stdio.h include for the _FORTIFY_SOURCE=2 check.

Implementations of _FORTIFY_SOURCE require the header file to be
included. Also remove the usele...

075ee0f9dc234f9a7e680b16304809e5546965d5 authored over 1 year ago by Todd C. Miller <[email protected]>
Use ldap_msgfree() instead of ldap_init() for the lber.h test.

The ldap_init() function is marked as deprecated and not defined
by default on some systems. Thi...

b83140e0f18fb27d310a4839a14f5c3febd2770b authored over 1 year ago by Todd C. Miller <[email protected]>
Include arpa/inet.h for inet_pton() prototype.

47ae92d0341a61eb9676f5e778632055c682ce39 authored over 1 year ago by Todd C. Miller <[email protected]>
Add netdb.h for struct addrinfo and EAI_* error codes.

3d4dc19ecd4ebe90bec2a00facc14d7912a8dd70 authored over 1 year ago by Todd C. Miller <[email protected]>
Stub out getaddrinfo() and freeaddrinfo().

We may not be able have access to DNS in the fuzzing environment.

64f6d6fdbced3c5e2edbc53d1c38a5f50b15afa4 authored over 1 year ago by Todd C. Miller <[email protected]>
Plug memory leaks in store_sudo_test found by LSAN.

8c85fefaee0b43cba2d22be942f88f051eba9a9f authored over 1 year ago by Todd C. Miller <[email protected]>
disable_coredump: only change the soft limit, leave the hard limit as-is

This should avoid problems on Linux in cases where sudo does not
have CAP_SYS_RESOURCE which may ...

b1deffbe5bb18bb7a518b4fd78f8b39cc2548750 authored over 1 year ago by Todd C. Miller <[email protected]>
Add basic support for remote power on/off via net-snmp.

e2243e3737a24e9957317dbfafb4db2c41b29801 authored over 1 year ago by Todd C. Miller <[email protected]>
More accurate description of what happens for "sudo -b".

6c3c8acbac93a711111a44785f47093354633984 authored over 1 year ago by Todd C. Miller <[email protected]>
Better support for "sudo -b" when running the command in a pty.

When a command is run via "sudo -b" it has no access to terminal
input. In non-pty mode, the co...

fe80c27dec98a2be9599ff0bdd04621feabff0a6 authored over 1 year ago by Todd C. Miller <[email protected]>
Avoid calling isatty()/ttyname() on std{in,out,err} if not a char dev.

The user controls these fds so we should avoid calling ioctl(2) on
them unless they correspond t...

ab0f8dda31e8673515add19c8d8c14e715032a9f authored over 1 year ago by Todd C. Miller <[email protected]>
Hard-code usage() and help() for an 80-column terminal.

Trying to tailor the help and usage output to the terminal width
is simply not worth it and coul...

b24af7b3e6eb503fba3bb6c3a0de69dd3ac334ba authored over 1 year ago by Todd C. Miller <[email protected]>
Move CONFIGURE_ARGS from sudo_usage.h.in to config.h.in.

65c0b5a089e3b019bb1e118a28630efaa6f08062 authored over 1 year ago by Todd C. Miller <[email protected]>
get_user_info: call sudo_get_ttysize() even if no /dev/tty

We still want to initialize rows and cols based on the environment
if possible.

80b85bdd50acacc497141db34b291ce2fc007b02 authored over 1 year ago by Todd C. Miller <[email protected]>
Get the tty size using stdout, not stderr, when printing help output.

While usage() prints to stderr, help() prints to stdout.

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