Skip to content

Commit f55a58b

Browse files
committed
Merge sudo 1.9.11p2 from tip.
--HG-- branch : 1.9
2 parents 74133a3 + 04746d0 commit f55a58b

16 files changed

Lines changed: 64 additions & 55 deletions

File tree

NEWS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
What's new in Sudo 1.9.11p2
2+
3+
* Fixed a compilation error on Linux/x86_64 with the x32 ABI.
4+
5+
* Fixed a regression introduced in 1.9.11p1 that caused a warning
6+
when logging to sudo_logsrvd if the command returned no output.
7+
18
What's new in Sudo 1.9.11p1
29

310
* Correctly handle EAGAIN in the I/O read/right events. This fixes

configure

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for sudo 1.9.11p1.
3+
# Generated by GNU Autoconf 2.71 for sudo 1.9.11p2.
44
#
55
# Report bugs to <https://bugzilla.sudo.ws/>.
66
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
621621
# Identity of this package.
622622
PACKAGE_NAME='sudo'
623623
PACKAGE_TARNAME='sudo'
624-
PACKAGE_VERSION='1.9.11p1'
625-
PACKAGE_STRING='sudo 1.9.11p1'
624+
PACKAGE_VERSION='1.9.11p2'
625+
PACKAGE_STRING='sudo 1.9.11p2'
626626
PACKAGE_BUGREPORT='https://bugzilla.sudo.ws/'
627627
PACKAGE_URL=''
628628

@@ -1640,7 +1640,7 @@ if test "$ac_init_help" = "long"; then
16401640
# Omit some internal or obsolete options to make the list less imposing.
16411641
# This message is too long to be a string in the A/UX 3.1 sh.
16421642
cat <<_ACEOF
1643-
\`configure' configures sudo 1.9.11p1 to adapt to many kinds of systems.
1643+
\`configure' configures sudo 1.9.11p2 to adapt to many kinds of systems.
16441644

16451645
Usage: $0 [OPTION]... [VAR=VALUE]...
16461646

@@ -1706,7 +1706,7 @@ fi
17061706

17071707
if test -n "$ac_init_help"; then
17081708
case $ac_init_help in
1709-
short | recursive ) echo "Configuration of sudo 1.9.11p1:";;
1709+
short | recursive ) echo "Configuration of sudo 1.9.11p2:";;
17101710
esac
17111711
cat <<\_ACEOF
17121712

@@ -1996,7 +1996,7 @@ fi
19961996
test -n "$ac_init_help" && exit $ac_status
19971997
if $ac_init_version; then
19981998
cat <<\_ACEOF
1999-
sudo configure 1.9.11p1
1999+
sudo configure 1.9.11p2
20002000
generated by GNU Autoconf 2.71
20012001

20022002
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2653,7 +2653,7 @@ cat >config.log <<_ACEOF
26532653
This file contains any messages produced by compilers while
26542654
running configure, to aid debugging if configure makes a mistake.
26552655

2656-
It was created by sudo $as_me 1.9.11p1, which was
2656+
It was created by sudo $as_me 1.9.11p2, which was
26572657
generated by GNU Autoconf 2.71. Invocation command line was
26582658

26592659
$ $0$ac_configure_args_raw
@@ -33050,7 +33050,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3305033050
# report actual input values of CONFIG_FILES etc. instead of their
3305133051
# values after options handling.
3305233052
ac_log="
33053-
This file was extended by sudo $as_me 1.9.11p1, which was
33053+
This file was extended by sudo $as_me 1.9.11p2, which was
3305433054
generated by GNU Autoconf 2.71. Invocation command line was
3305533055

3305633056
CONFIG_FILES = $CONFIG_FILES
@@ -33118,7 +33118,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
3311833118
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3311933119
ac_cs_config='$ac_cs_config_escaped'
3312033120
ac_cs_version="\\
33121-
sudo config.status 1.9.11p1
33121+
sudo config.status 1.9.11p2
3312233122
configured by $0, generated by GNU Autoconf 2.71,
3312333123
with options \\"\$ac_cs_config\\"
3312433124

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1818
dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1919
dnl
2020
AC_PREREQ([2.70])
21-
AC_INIT([sudo], [1.9.11p1], [https://bugzilla.sudo.ws/], [sudo])
21+
AC_INIT([sudo], [1.9.11p2], [https://bugzilla.sudo.ws/], [sudo])
2222
AC_CONFIG_HEADERS([config.h pathnames.h])
2323
AC_CONFIG_SRCDIR([src/sudo.c])
2424
AC_CONFIG_AUX_DIR([scripts])

include/sudo_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
#endif
158158

159159
#if defined(HAVE_DECL_SSIZE_MAX) && !HAVE_DECL_SSIZE_MAX
160-
# define SIZE_MAX LONG_MAX
160+
# define SSIZE_MAX LONG_MAX
161161
#endif
162162

163163
#if defined(HAVE_DECL_PATH_MAX) && !HAVE_DECL_PATH_MAX

lib/protobuf-c/protobuf-c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,7 @@ parse_required_member(ScannedMember *scanned_member,
26182618
return FALSE;
26192619

26202620
def_mess = scanned_member->field->default_value;
2621-
if (len > pref_len) {
2621+
if (len >= pref_len) {
26222622
subm = protobuf_c_message_unpack(scanned_member->field->descriptor,
26232623
allocator,
26242624
len - pref_len,

plugins/sudoers/audit.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ sudoers_audit_open(unsigned int version, sudo_conv_t conversation,
158158

159159
sudo_conv = conversation;
160160
sudo_printf = plugin_printf;
161+
if (sudoers_audit.event_alloc != NULL)
162+
plugin_event_alloc = sudoers_audit.event_alloc;
161163

162164
bindtextdomain("sudoers", LOCALEDIR);
163165

@@ -284,7 +286,7 @@ log_server_accept(struct eventlog *evlog)
284286

285287
/* Open connection to log server, send hello and accept messages. */
286288
client_closure = log_server_open(&audit_details, &now, false,
287-
SEND_ACCEPT, NULL, sudoers_audit.event_alloc);
289+
SEND_ACCEPT, NULL);
288290
if (client_closure != NULL)
289291
ret = true;
290292
}
@@ -391,7 +393,7 @@ sudoers_audit_reject(const char *plugin_name, unsigned int plugin_type,
391393
if (!eventlog_reject(&evlog, 0, message, NULL, NULL))
392394
ret = false;
393395

394-
if (!log_server_reject(&evlog, message, sudoers_audit.event_alloc))
396+
if (!log_server_reject(&evlog, message))
395397
ret = false;
396398

397399
debug_return_int(ret);
@@ -424,8 +426,7 @@ sudoers_audit_error(const char *plugin_name, unsigned int plugin_type,
424426
if (!eventlog_alert(&evlog, 0, &now, message, NULL))
425427
ret = false;
426428

427-
if (!log_server_alert(&evlog, &now, message, NULL,
428-
sudoers_audit.event_alloc))
429+
if (!log_server_alert(&evlog, &now, message, NULL))
429430
ret = false;
430431

431432
debug_return_int(ret);

plugins/sudoers/env.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ rebuild_env(void)
986986
* env_check.
987987
*/
988988
for (ep = env.old_envp; *ep; ep++) {
989-
/* Add variable unless it matches a black list. */
989+
/* Add variable unless it matches a blocklist. */
990990
if (!env_should_delete(*ep)) {
991991
if (strncmp(*ep, "SUDO_PS1=", 9) == 0)
992992
ps1 = *ep + 5;

plugins/sudoers/iolog.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ sudoers_io_open_remote(struct timespec *now)
745745

746746
/* Open connection to log server, send hello and accept messages. */
747747
client_closure = log_server_open(&iolog_details, now, true, SEND_ACCEPT,
748-
NULL, sudoers_io.event_alloc);
748+
NULL);
749749
if (client_closure != NULL)
750750
debug_return_int(1);
751751

@@ -768,6 +768,8 @@ sudoers_io_open(unsigned int version, sudo_conv_t conversation,
768768

769769
sudo_conv = conversation;
770770
sudo_printf = plugin_printf;
771+
if (sudoers_io.event_alloc != NULL)
772+
plugin_event_alloc = sudoers_io.event_alloc;
771773

772774
bindtextdomain("sudoers", LOCALEDIR);
773775

@@ -1329,7 +1331,7 @@ sudoers_io_setops(void)
13291331
debug_decl(sudoers_io_setops, SUDOERS_DEBUG_PLUGIN);
13301332

13311333
#ifdef SUDOERS_LOG_CLIENT
1332-
if (sudoers_io.event_alloc != NULL && iolog_details.log_servers != NULL) {
1334+
if (plugin_event_alloc != NULL && iolog_details.log_servers != NULL) {
13331335
io_operations.open = sudoers_io_open_remote;
13341336
io_operations.close = sudoers_io_close_remote;
13351337
io_operations.log = sudoers_io_log_remote;

plugins/sudoers/log_client.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,12 +1964,17 @@ client_msg_cb(int fd, int what, void *v)
19641964
*/
19651965
static struct client_closure *
19661966
client_closure_alloc(struct log_details *details, struct timespec *now,
1967-
bool log_io, enum client_state initial_state, const char *reason,
1968-
struct sudo_plugin_event * (*event_alloc)(void))
1967+
bool log_io, enum client_state initial_state, const char *reason)
19691968
{
19701969
struct client_closure *closure;
19711970
debug_decl(client_closure_alloc, SUDOERS_DEBUG_UTIL);
19721971

1972+
if (plugin_event_alloc == NULL) {
1973+
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
1974+
"plugin_event_alloc is not set");
1975+
debug_return_ptr(NULL);
1976+
}
1977+
19731978
if ((closure = calloc(1, sizeof(*closure))) == NULL)
19741979
goto oom;
19751980

@@ -1990,10 +1995,10 @@ client_closure_alloc(struct log_details *details, struct timespec *now,
19901995
if (closure->read_buf.data == NULL)
19911996
goto oom;
19921997

1993-
if ((closure->read_ev = event_alloc()) == NULL)
1998+
if ((closure->read_ev = plugin_event_alloc()) == NULL)
19941999
goto oom;
19952000

1996-
if ((closure->write_ev = event_alloc()) == NULL)
2001+
if ((closure->write_ev = plugin_event_alloc()) == NULL)
19972002
goto oom;
19982003

19992004
closure->log_details = details;
@@ -2007,15 +2012,14 @@ client_closure_alloc(struct log_details *details, struct timespec *now,
20072012

20082013
struct client_closure *
20092014
log_server_open(struct log_details *details, struct timespec *now,
2010-
bool log_io, enum client_state initial_state, const char *reason,
2011-
struct sudo_plugin_event * (*event_alloc)(void))
2015+
bool log_io, enum client_state initial_state, const char *reason)
20122016
{
20132017
struct client_closure *closure;
20142018
static bool warned = false;
20152019
debug_decl(log_server_open, SUDOERS_DEBUG_UTIL);
20162020

20172021
closure = client_closure_alloc(details, now, log_io, initial_state,
2018-
reason, event_alloc);
2022+
reason);
20192023
if (closure == NULL)
20202024
goto bad;
20212025

plugins/sudoers/log_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct client_closure {
106106
};
107107

108108
/* iolog_client.c */
109-
struct client_closure *log_server_open(struct log_details *details, struct timespec *now, bool log_io, enum client_state initial_state, const char *reason, struct sudo_plugin_event * (*event_alloc)(void));
109+
struct client_closure *log_server_open(struct log_details *details, struct timespec *now, bool log_io, enum client_state initial_state, const char *reason);
110110
bool log_server_close(struct client_closure *closure, int exit_status, int error);
111111
bool fmt_client_message(struct client_closure *closure, ClientMessage *msg);
112112
bool fmt_accept_message(struct client_closure *closure, struct eventlog *evlog);

0 commit comments

Comments
 (0)