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

Set relay name string to NULL after dropping the reference.

Otherwise it is possible to decrement the reference more than once.

bc82430a6f86ccaad80831c5c2e19fb67d1574b0 authored over 3 years ago by Todd C. Miller <[email protected]>
Fix cut & pasto that prevented the verify_server option from being set.

The "log_server_verify" setting passed from the policy plugin was
applied to the "keepalive" opti...

af0345e2387831936cb7c59e90fb254d97e17cfb authored over 3 years ago by Todd C. Miller <[email protected]>
Write client and server information to debug file on SIGUSR1

This can be used to debug client problems such as a connection
not being closed as expected.

01bdfd3be2519033b13c77254c42d22e551711de authored over 3 years ago by Todd C. Miller <[email protected]>
Document journal file directories in store_first mode.

cefa72c6a6d0e4237894020ec9d784731ae9e3c6 authored over 3 years ago by Todd C. Miller <[email protected]>
Create journal files in an incoming directory, move to outgoing when complete.

This will make it possible to process completed journal files
periodically if the relay server is...

f92bb8840cf0d7e3b70612f3fce586bc9615c776 authored over 3 years ago by Todd C. Miller <[email protected]>
Add missing connection_close() call for relay-only connections.

For an immediate relay we will close the connection when the client
disconnects (or there is a ti...

5c593d5a4a3bb3f82a37cf0ee3218cab831617a7 authored over 3 years ago by Todd C. Miller <[email protected]>
regen

d883213f55c67b85fa8f0378fdae6b857eba333e authored over 3 years ago by Todd C. Miller <[email protected]>
Replace non-ascii characters in warning string.

d4bdc85d74934ca5dca1bd1bd8de030e73521290 authored over 3 years ago by Todd C. Miller <[email protected]>
Quiet clang analyzer false positive in regress tests.

ac878d3e271958f40e1e31b591dad83dd1e8681b authored over 3 years ago by Todd C. Miller <[email protected]>
Move local iolog log functions to logsrvd_local.c

84a01d3a935c161422cb4c5634396235355c14e7 authored over 3 years ago by Todd C. Miller <[email protected]>
Better client error reporting on relay server connection error.

More detailed error messages may be found in the debug log.

6d8942e82cf123e24e28e84289e685a2e5adc19d authored over 3 years ago by Todd C. Miller <[email protected]>
Update debug pid string when sudo_logsrvd becomes a daemon.

e55991f2443525133bf33c145d31aecb46165d09 authored over 3 years ago by Todd C. Miller <[email protected]>
Must call SSL_shutdown() before closing the underlying socket.

This got broken by some code rearrangement when relay mode was added.

f25275ad5b25c3502891e3a4fbe46692f72dff1f authored over 3 years ago by Todd C. Miller <[email protected]>
Recover if the client or relay server closes the TLS connection uncleanly.

The other end of the connection should perform a proper TLS shutdown
but as long as we are in the...

67029f3cc41e4f72670155ec851a25bcb0a881cb authored over 3 years ago by Todd C. Miller <[email protected]>
Sudo 1.9.7

66c6edada205840e19dce8dfbd93b3bc3b816619 authored over 3 years ago by Todd C. Miller <[email protected]>
Add a suppression file for the libpython leaks.

This is a big hammer but it seems like the best we can do for now.
Allows "make check" to succeed...

8a65893435aa859bda75ddaec610a9bceb4c04a2 authored over 3 years ago by Todd C. Miller <[email protected]>
When spliting EDITOR check for escaped quote characters.

Also add check_editor to sudoers "make check".

6907376ae93ffaf23a44a8b9efea4a3f7c4e14f2 authored over 3 years ago by Todd C. Miller <[email protected]>
Treat a lone backslash at the end of a string as a literal backslash.

GitHub issue #99

5e5131dec3c30d5e768a4e59567232cb56dcd53a authored over 3 years ago by Todd C. Miller <[email protected]>
Fix typo.

d6d2e3488bffb14b82965924d5bc5b332d5489d2 authored over 3 years ago by Todd C. Miller <[email protected]>
Avoid a potential NULL dereference when mutating args_str.

Coverit CID 221401

a85c6b41a68714f55622d83c94b76c902b251546 authored over 3 years ago by Todd C. Miller <[email protected]>
Avoid calling fread() with a NUL buffer if msg_len is 0.

Coverity CID 221399

65a55497ec6df6934d5895b9b57a8898abe47278 authored over 3 years ago by Todd C. Miller <[email protected]>
Set a restrictive umask so new files are only read/write by owner.

Coverity CID 221402

d9f0eba1faf11d108dccded942059cba09bc8cc5 authored over 3 years ago by Todd C. Miller <[email protected]>
In connection_closure_free() only close sock if it is not -1.

When relaying from a journal there will be no socket.
Coverity CID 221403

bfd5803bd2a49f507a2d56ca7f27bead2b544833 authored over 3 years ago by Todd C. Miller <[email protected]>
Avoid potential NULL dereference in get_free_buf().

Coverity CID 221400

57b8122cf31a3fa5643044ceca302007600d8663 authored over 3 years ago by Todd C. Miller <[email protected]>
Remove some now-dead code in the error path.

Coverity CID 221397 and 221398

21641a27e4c2e0df196c7b24fed190e9ff5d2393 authored over 3 years ago by Todd C. Miller <[email protected]>
Use function pointers for each client message type instead of conditionals.

This separats out the message handler from the functions that store
or relay the message contents.

761b02d34f7909925652875064a157edc6212fdd authored over 3 years ago by Todd C. Miller <[email protected]>
Add enqueue_error_message() helper function.

Formats and enqueues an error message and enables the write event.

64ac63918eb8f80d40d36a79c0efc66d3c2679c4 authored over 3 years ago by Todd C. Miller <[email protected]>
Forward the journaled entry after it has been stored locally.

050e91f8d15bbbf3b31e31bc3bf823ab461d61a0 authored over 3 years ago by Todd C. Miller <[email protected]>
Stash the value of the store_first config setting in connection_closure.

If the configuration changes it should not affect a connection that
is already in progress.

280fabac3854a63a7d15a9c0af2a12c8fa6e7fe3 authored over 3 years ago by Todd C. Miller <[email protected]>
Journal messages to disk when store_first is set in the relay section.

Instead of forwarding messages immediately, they are journaled
locally in wire format.
This will ...

c2d3070fa17661cba9d1e4f6405d962cfd1b5c01 authored over 3 years ago by Todd C. Miller <[email protected]>
Add configuration for sudo_logsrvd store-and-forward mode.

Adds "relay_dir" and "store_first" settings to sudo_logsrvd.conf
in the [relay] section. Also ad...

6f5b353e871133a9cf2166ee351a47028dea3e55 authored over 3 years ago by Todd C. Miller <[email protected]>
Make sure SIGCHLD is not ignored when sudo is executed.

If SIGCHLD is ignored there is a race condition between when the
process is executed and when the...

727056e0c9519d8eecde801e950b35f2f69c72e2 authored over 3 years ago by Todd C. Miller <[email protected]>
Remove the HP-UX 11.0 pread64() hack, it causes problems on modern HP-UX.

b0a32fe738af5c20594e2f8320e72f64a83f63c9 authored over 3 years ago by Todd C. Miller <[email protected]>
Add minimum value to consider when overriding resource limits.

Currently only used for RLIMIT_DATA and RLIMIT_AS.

This works around a problem on HP-UX where se...

6717415e7375d3af830a645c1087410432dcc107 authored over 3 years ago by Todd C. Miller <[email protected]>
Don't use msg_len as a length after converting it to network byte order.

32f742389b310401c5004b1fdce7117e7a1c75e1 authored over 3 years ago by Todd C. Miller <[email protected]>
Use the packed message buffer when relaying if possible.

There's no need to rebuild the message buffer for anything but
RestartMessage and ClientHello.

110d9667e5143616d36399992af5e42bc871b617 authored over 3 years ago by Todd C. Miller <[email protected]>
Allocate the data buffer in get_free_buf() too.

We always know the size of the data buffer we need at allocation time.

935daf6b7e1b1bd4fbdd5d8a7a6b2ddb78c17d4d authored over 3 years ago by Todd C. Miller <[email protected]>
Relay ChangeWindowSize and CommandSuspend events too.

3dce67ec100e8885110fb4b625f8586fb66a7471 authored over 3 years ago by Todd C. Miller <[email protected]>
Regenerate test output with python 3.10a7

Also adjust debug tests so they pass on older python versions

7c2224584d163d179b8b69a84069f70576be3c4c authored over 3 years ago by Todd C. Miller <[email protected]>
determine Python (3.10) version number correctly.

from upstream automake

5ffa915c9c36956f4cd7ca304e363d2060dc38a2 authored over 3 years ago by Todd C. Miller <[email protected]>
Move python.m4 and runlog.m4 to the m4 directory.

Previously they were inline in aclocal.m4.

fbbf602664879993256b06c581d4b88c3d257c11 authored over 3 years ago by Todd C. Miller <[email protected]>
Add hiuxmpp where we have hpux for special cases.

Also move the HP-UX 11.00 pread(2) workaround into the section where
pread(2) is tested for, not ...

d76cc96af6f4bd302dfee4ecc1983a2c6271a5c6 authored over 3 years ago by Todd C. Miller <[email protected]>
Only replace the last instance of "sudo" in example and doc dir.

Otherwise we end up with weird paths for a prefix like /opt/sudo.

620b0dec86de8ca523faea95d0fdb88c7c9680ab authored over 3 years ago by Todd C. Miller <[email protected]>
Fix lint warning.

a1323ba43bfa169a8062426f1aa375bc57541de0 authored over 3 years ago by Todd C. Miller <[email protected]>
Mention relay mode and update TLS example.

556b8f62cb42f07a44f3d836350434c2d2a31d13 authored over 3 years ago by Todd C. Miller <[email protected]>
If libssl_dep was not passed in, use ldd to determine its value.

Normally, mkpkg will figure this out, but if the user does "make
package" outside of the mkpkg sc...

d028410bf7fc84f0be3a122f9e0241e669cd42cc authored over 3 years ago by Todd C. Miller <[email protected]>
Enable the use of OpenSSL if log client/server not disabled.

This adds a dependency on OpenSSL unless it is explicitly disabled
(--disable-openssl) or the sud...

28d41cecad397f71fa61fd4be647c5665f0474e3 authored over 3 years ago by Todd C. Miller <[email protected]>
configure aux scripts moved to the scripts directory

b8fda5b0a97099ccb017e143f8ecf5f71bc10c63 authored over 3 years ago by Todd C. Miller <[email protected]>
Set logsrvd_config to NULL in logsrvd_conf_cleanup() after freeing it.

Fixes a double free in fuzz_logsrvd_conf (but not sudo_logsrvd itself).
Also fix linking fuzz_log...

4e9baba2b5a151eae9169306b1275e321b2ffc2e authored over 3 years ago by Todd C. Miller <[email protected]>
Update sudo_logsrvd.conf fuzzer to match configuration changes.

e4e0e734b90dccda1223a131a8722e3ed464e236 authored over 3 years ago by Todd C. Miller <[email protected]>
Document relay configuration changes.

ae77355eda796dd1510a53b81b4812d7fa53f386 authored over 3 years ago by Todd C. Miller <[email protected]>
Move relay configuration into its own section and add TLS options.

TLS options in the relay section will be used if specified, otherwise
the TLS options from the se...

163a5f08b5ce0c898e12633369dab1e19a3cd6a3 authored over 3 years ago by Todd C. Miller <[email protected]>
Add "server" and "relay" to getters/callbacks specific to server and relay.

25d4dd8e6d09d37c663605ef76317cec90c509f3 authored over 3 years ago by Todd C. Miller <[email protected]>
Remove struct logsrvd_tls_config.

Now that the SSL context is initialized in logsrvd_conf.c there's
no need to export TLS configura...

90770794db5396f08c913cc14a6815c54de326d8 authored over 3 years ago by Todd C. Miller <[email protected]>
No longer need struct logsrvd_tls_runtime, use SSL_CTX instead.

9779996c3c6d9cfcace36736217f283f368cdcdc authored over 3 years ago by Todd C. Miller <[email protected]>
Move allocation of the TLS context to logsrvd_conf_apply().

This way we get certificate errors at configuration time, not after.
It also means that a change ...

990fa4f5ad32b84f2f6c5deb47694f087b5ce45c authored over 3 years ago by Todd C. Miller <[email protected]>
Only initialize the SSL library once.

8f0c16f06ee93f14540d9c4203cc8c148bbe0048 authored over 3 years ago by Todd C. Miller <[email protected]>
Sanity check struct timespec in timestamp file.

Coverity CID 220564

c2909e20ee76529e374f277302ac45a6f6af48a3 authored over 3 years ago by Todd C. Miller <[email protected]>
Check lseek(fd, 0, SEEK_CUR) for -1 return value.

Not actually possible in practice. Coverity CID 220568.

394673cbf5db51c8cbbbd63252ad62eabfc9de80 authored over 3 years ago by Todd C. Miller <[email protected]>
Check for NULL ifa->ifa_addr and ifa->ifa_netmask in both loops.

42865567d7acd8976f6c595c1e68dd355ab2665a authored over 3 years ago by Todd C. Miller <[email protected]>
Plug memory leak on overflow; Coverity CID 220556

52c29aa7a0f002ff5acd8587f6097efaa8727a48 authored over 3 years ago by Todd C. Miller <[email protected]>
In schedule_commit_point() do not free the closure on error.

It is the caller's responsibility to free resources on error.
Coverity CID 220557

37e8b58684b13b610a7c2f60ec43eb3f88765a72 authored over 3 years ago by Todd C. Miller <[email protected]>
Cast NULL terminator argument to char * when calling sudo_mkgrent().

Avoids a portability issue on systems where NULL is not a pointer.

a2e4f53642b9b4237937a7370473d12a4dedd97b authored over 3 years ago by Todd C. Miller <[email protected]>
Rename LOGSRVD_DEFAULT_CIPHER_LST13 to DEFAULT_CIPHER_LST13

d92610ee437a037562917ae32dcbc0605262e213 authored over 3 years ago by Todd C. Miller <[email protected]>
Include string.h for strerror(3) prototype.

5cb5a45bab478bf4e16364f719417129a96d0d56 authored over 3 years ago by Todd C. Miller <[email protected]>
Move connect_relay_tls() so we don't need a prototype for it.

Fixes a warning when sudo is not configured to use OpenSSL.

3f1a76cb83a89e35dc54da8e0f689dfd6fd95c9f authored over 3 years ago by Todd C. Miller <[email protected]>
Document relay and connect_timeout server settings.

3aec794b75be726f4686ca05eba197fb7dcb6892 authored over 3 years ago by Todd C. Miller <[email protected]>
Add logsrvd_conf_cleanup() to free the conf data structures on exit.

There is no longer a need to do anything in shutdown_cb() other
than break out of the event loop.

86c815fd6154564739af21e231790d5c6a86482d authored over 3 years ago by Todd C. Miller <[email protected]>
Rename listen_address -> server_address and add reference counting.

This will be used by the upcoming relay mode.

8101b23e544357e3c59e96920e360231f486bd1c authored over 3 years ago by Todd C. Miller <[email protected]>
Move reference-counted string code from sudoers to libsudo_util.

It will be used by sudo_logsrvd too.

2db9e642148e0f3eb683b5b9a666d8b42eeda455 authored over 3 years ago by Todd C. Miller <[email protected]>
Add sa_host to struct server_address as a ref counted string.

Also convert sa_str to ref counted string.

30f57bcdce3f2109f7c63c0e57104d834b64c6e3 authored over 3 years ago by Todd C. Miller <[email protected]>
Split most of server_commit_cb() out into schedule_commit_point().

This allows it to be used by the relay code too.

343100307dc8537f6a3aa96368bc44a07cb8ef06 authored over 3 years ago by Todd C. Miller <[email protected]>
Try to send an error message to client for some client_msg_cb() failures.

533fcc3f02e0d3ea49b9d1c01804bf76901e2d2f authored over 3 years ago by Todd C. Miller <[email protected]>
Don't allow a wildcard address for the relay parameter.

ec52810c0b46586d298d41236065d96dcb54256b authored over 3 years ago by Todd C. Miller <[email protected]>
Add support for relaying to another sudo_logsrvd via TLS.

b1c4de2088365e1d24409d21d4df5c6a01dcdcea authored over 3 years ago by Todd C. Miller <[email protected]>
Add a relay mode to sudo_logsrvd where it forwards instead of stores.

Relay hosts are be specified in the server section of sudo_logsrvd.conf.

d60b8a791cf47237294192560921a4c8fce70ae1 authored over 3 years ago by Todd C. Miller <[email protected]>
Move common TLS client code to tls_client.c and use it in sendlog.c.

72c40ae0e164493dde6940efd1ed36c2e13414f2 authored over 3 years ago by Todd C. Miller <[email protected]>
Use a tailq of write buffers instead of a single one per connection.

This allows us to queue up multiple messages for writing like the
sudoers client supports. Curre...

7bb5eef9d9b066a552ac321af55501b10c495f5c authored over 3 years ago by Todd C. Miller <[email protected]>
Set user group list when executing the askpass helper.

Under normal circumstances the existing group list will match the
list fetched by sudo. However,...

e3ff4e663ce34d57bac81c94f3d885c58e56b9b4 authored over 3 years ago by Todd C. Miller <[email protected]>
Increase autoconf minimum version to 2.70.

Some of the macros deprecated in 2.70 are required by older versions.
For example, AC_PROG_CC now...

f1f8515bd6297abbfbeb618e88604537f28e0203 authored over 3 years ago by Todd C. Miller <[email protected]>
Move autoconf auxiliary files to the scripts directory.

d4517e0a1c60749cc7eb0e8993dca4d02a5ddead authored over 3 years ago by Todd C. Miller <[email protected]>
Removed depricated security_context_t

Signed-off-by: Radovan Sroka <[email protected]>

c2a63690c8f78bf019a4e8295ff642aea272699e authored over 3 years ago by Radovan Sroka <[email protected]>
Document SUCCESS=return support in sudoers nsswitch.conf entries.

Based on a patch from Dennis Filder. Bug #971.

28d65159ed2dd3fd4c7b880b6c48c7e46f105512 authored over 3 years ago by Todd C. Miller <[email protected]>
Move log_server_accept() out from under the #ifdef SUDOERS_LOG_CLIENT

Fixes a link error when sudo is configured with --disable-log-client.

8fa897d3ae8a2a783686924cebaedb8f04205b3a authored over 3 years ago by Todd C. Miller <[email protected]>
Return NULL if init_tls_client_context() fails.

Otherwise, we will call SSL_new with a freed SSL context.
Bug #970

5a798412087d665ecca9fcf988ac104448eccafc authored over 3 years ago by Todd C. Miller <[email protected]>
Use separate getopt config for sudoedit.

Avoids a problem where the user gets an exclusive usage error message
when using a sudo-specific ...

a40e4b386741d5f3e4a826eac12950f7e7c51c42 authored over 3 years ago by Todd C. Miller <[email protected]>
Add -h and -V to sudoedit usage and customize help output for sudoedit.

Also add missing -B option to usage strings.

a4c710ccfdbd8d1e8af726ac6afe4ed3ca0feba7 authored over 3 years ago by Todd C. Miller <[email protected]>
Don't report a usage error for "sudo -V".

GitHub issue #95

b9a0c72fd1ffa668b2e725f01fce66e3a2c82b05 authored over 3 years ago by Todd C. Miller <[email protected]>
Do not include parent directories in rpm and deb files.

Fixes a directory conflict with the AIX sudo rpm package.
Other deb/rpm packages were not affecte...

4f9d2374c820ab53655d2fda52140430da562ce2 authored over 3 years ago by Todd C. Miller <[email protected]>
SCO OpenServer uses SIOCGIFANUM, not SIOCGIFNUM.

On OpenServer, SIOCGIFNUM is the number of network interfaces,
not the number of ifreq structs.

ce1f0da845cb535d4e2b17baec8f9e6bfe0533c7 authored over 3 years ago by Todd C. Miller <[email protected]>
Add support for HP-UX SIOCGLIFNUM and SIOCGLIFCONF ioctls.

We need to use both SIOCGIFCONF and SIOCGLIFCONF since SIOCGLIFCONF
only returns IPv6 addresses.

b269da75b8c1cda75ceb8d3febd343297af18f3d authored over 3 years ago by Todd C. Miller <[email protected]>
Move get_net_ifs stub to the top and remove unused INET_ADDRSTRLEN def.

00cdc83cb672afb3a2bab93bfe57552c9b60ea6b authored over 3 years ago by Todd C. Miller <[email protected]>
No longer need ifr_tmp variable, just reuse ifr.

Now that we store the string version of the address before fetching
the netmask we can just re-us...

0e49dd2381d95cc654f0aba3a0d4e97a1ac67806 authored over 3 years ago by Todd C. Miller <[email protected]>
SCO OpenServer 5 returns a bogus value for SIOCGIFNUM.

Gleaned from sendmail.

423e231229f7db9feeb3c9498508a1dfe45cfce1 authored over 3 years ago by Todd C. Miller <[email protected]>
Use SIOCGSIZIFCONF or SIOCGIFNUM where available.

Still falls back to a loop if not but now maxes out at 2048
interfaces instead of potentially loo...

45ca46d735185c242318e60afbf6b26f39d9479d authored over 3 years ago by Todd C. Miller <[email protected]>
Remove support for obsolete ISC UNIX and MIPS RISC/OS systems.

They were getting in the way of net_its.c simplification.

cf8feb2876762a24f0ee7b7991a7a53e7567537c authored over 3 years ago by Todd C. Miller <[email protected]>
Use SIOCGLIFCONF to get interface list where supported (Solaris).

HP-UX has a SIOCGLIFCONF but it is incompatible (and appears to only
return IPv6 addresses).
Also...

9d6a37a49bba0b142ae1f8466f06c41d75adc722 authored over 3 years ago by Todd C. Miller <[email protected]>
Add simple regress check to display the network interfaces found.

06df3a1b47540318bfe4cfaf2f2c67b6282b467e authored over 3 years ago by Todd C. Miller <[email protected]>
Suggest clang 11 or higher, some fuzzers may hang when used with clang 10.

009069115cfe7e2a39836053675bba121679480d authored over 3 years ago by Todd C. Miller <[email protected]>
Add dictionary file for fuzz_logsrvd_conf.

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