Skip to content

Commit ca72941

Browse files
committed
Merge sudo 1.8.25 from tip
--HG-- branch : 1.8
2 parents ec301d9 + 1a9b932 commit ca72941

76 files changed

Lines changed: 4047 additions & 2223 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.hgignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Makefile$
2828
^pathnames\.h$
2929
^src/sudo$
3030
^src/sesh$
31-
^src/check_ttyname$
31+
^src/check_(noexec|ttyname)$
3232
^src/sudo_usage\.h$
3333

3434
^lib/util/mksiglist$
@@ -41,3 +41,4 @@ Makefile$
4141

4242
^plugins/sudoers/(cvtsudoers|sudoers|sudoreplay|testsudoers|tsdump|visudo|check_[a-z0-9_]+)$
4343
^plugins/sudoers/.*\.(out|toke|err|json|ldif|sudo|ldif2sudo)$
44+
^plugins/sudoers/regress/iolog_plugin/iolog$

MANIFEST

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ plugins/sudoers/interfaces.h
315315
plugins/sudoers/iolog.c
316316
plugins/sudoers/iolog.h
317317
plugins/sudoers/iolog_path.c
318+
plugins/sudoers/iolog_util.c
319+
plugins/sudoers/iolog_util.h
318320
plugins/sudoers/ldap.c
319321
plugins/sudoers/ldap_conf.c
320322
plugins/sudoers/ldap_util.c
@@ -330,6 +332,7 @@ plugins/sudoers/mkdefaults
330332
plugins/sudoers/mkdir_parents.c
331333
plugins/sudoers/parse.c
332334
plugins/sudoers/parse.h
335+
plugins/sudoers/parse_ldif.c
333336
plugins/sudoers/po/README
334337
plugins/sudoers/po/ca.mo
335338
plugins/sudoers/po/ca.po
@@ -443,6 +446,10 @@ plugins/sudoers/regress/cvtsudoers/test26.out.ok
443446
plugins/sudoers/regress/cvtsudoers/test26.sh
444447
plugins/sudoers/regress/cvtsudoers/test27.out.ok
445448
plugins/sudoers/regress/cvtsudoers/test27.sh
449+
plugins/sudoers/regress/cvtsudoers/test28.out.ok
450+
plugins/sudoers/regress/cvtsudoers/test28.sh
451+
plugins/sudoers/regress/cvtsudoers/test29.out.ok
452+
plugins/sudoers/regress/cvtsudoers/test29.sh
446453
plugins/sudoers/regress/cvtsudoers/test3.out.ok
447454
plugins/sudoers/regress/cvtsudoers/test3.sh
448455
plugins/sudoers/regress/cvtsudoers/test4.out.ok
@@ -461,6 +468,8 @@ plugins/sudoers/regress/env_match/check_env_pattern.c
461468
plugins/sudoers/regress/env_match/data
462469
plugins/sudoers/regress/iolog_path/check_iolog_path.c
463470
plugins/sudoers/regress/iolog_path/data
471+
plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c
472+
plugins/sudoers/regress/iolog_util/check_iolog_util.c
464473
plugins/sudoers/regress/logging/check_wrap.c
465474
plugins/sudoers/regress/logging/check_wrap.in
466475
plugins/sudoers/regress/logging/check_wrap.out.ok
@@ -640,6 +649,8 @@ plugins/sudoers/solaris_audit.c
640649
plugins/sudoers/solaris_audit.h
641650
plugins/sudoers/sssd.c
642651
plugins/sudoers/starttime.c
652+
plugins/sudoers/strlist.c
653+
plugins/sudoers/strlist.h
643654
plugins/sudoers/stubs.c
644655
plugins/sudoers/sudo_ldap.h
645656
plugins/sudoers/sudo_ldap_conf.h

NEWS

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
What's new in Sudo 1.8.25
2+
3+
* Fixed a bug introduced in sudo 1.8.20 that broke formatting of
4+
I/O log timing file entries on systems without a C99-compatible
5+
snprintf() function. Our replacement snprintf() doesn't support
6+
floating point so we can't use the "%f" format directive.
7+
8+
* I/O log timing file entries now use a monotonic timer and include
9+
nanosecond precision. A monotonic timer that does not increment
10+
while the system is sleeping is used where available.
11+
12+
* Fixed a bug introduced in sudo 1.8.24 where sudoNotAfter in the LDAP
13+
backend was not being properly parsed. Bug #845.
14+
15+
* When sudo runs a command in a pseudo-tty, the slave device is
16+
now closed in the main process immediately after starting the
17+
monitor process. This removes the need for an AIX-specific
18+
workaround that was added in sudo 1.8.24.
19+
20+
* Added support for monotonic timers on HP-UX.
21+
22+
* Fixed a bug displaying timeout values the "sudo -V" output.
23+
The value displayed was 3600 times the actual value. Bug #846.
24+
25+
* Fixed a build issue on AIX 7.1 BOS levels that include memset_s()
26+
and define rsize_t in string.h. Bug #847.
27+
28+
* The testsudoers utility now supports querying an LDIF-format
29+
policy.
30+
31+
* Sudo now sets the LOGIN environment variable to the same value as
32+
LOGNAME on AIX systems. Bug #848.
33+
34+
* Fixed a regression introduced in sudo 1.8.24 where the LDAP and
35+
SSSD backends evaluated the rules in reverse sudoOrder. Bug #849.
36+
137
What's new in Sudo 1.8.24
238

339
* The LDAP and SSS back-ends now use the same rule evaluation code

aclocal.m4

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,120 @@
1212
# PARTICULAR PURPOSE.
1313

1414
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15+
# longlong.m4 serial 17
16+
dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
17+
dnl This file is free software; the Free Software Foundation
18+
dnl gives unlimited permission to copy and/or distribute it,
19+
dnl with or without modifications, as long as this notice is preserved.
20+
21+
dnl From Paul Eggert.
22+
23+
# Define HAVE_LONG_LONG_INT if 'long long int' works.
24+
# This fixes a bug in Autoconf 2.61, and can be faster
25+
# than what's in Autoconf 2.62 through 2.68.
26+
27+
# Note: If the type 'long long int' exists but is only 32 bits large
28+
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
29+
# defined. In this case you can treat 'long long int' like 'long int'.
30+
31+
AC_DEFUN([AC_TYPE_LONG_LONG_INT],
32+
[
33+
AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
34+
AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
35+
[ac_cv_type_long_long_int=yes
36+
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
37+
ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
38+
if test $ac_cv_type_long_long_int = yes; then
39+
dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
40+
dnl If cross compiling, assume the bug is not important, since
41+
dnl nobody cross compiles for this platform as far as we know.
42+
AC_RUN_IFELSE(
43+
[AC_LANG_PROGRAM(
44+
[[@%:@include <limits.h>
45+
@%:@ifndef LLONG_MAX
46+
@%:@ define HALF \
47+
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
48+
@%:@ define LLONG_MAX (HALF - 1 + HALF)
49+
@%:@endif]],
50+
[[long long int n = 1;
51+
int i;
52+
for (i = 0; ; i++)
53+
{
54+
long long int m = n << i;
55+
if (m >> i != n)
56+
return 1;
57+
if (LLONG_MAX / 2 < m)
58+
break;
59+
}
60+
return 0;]])],
61+
[],
62+
[ac_cv_type_long_long_int=no],
63+
[:])
64+
fi
65+
fi])
66+
if test $ac_cv_type_long_long_int = yes; then
67+
AC_DEFINE([HAVE_LONG_LONG_INT], [1],
68+
[Define to 1 if the system has the type 'long long int'.])
69+
fi
70+
])
71+
72+
# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
73+
# This fixes a bug in Autoconf 2.61, and can be faster
74+
# than what's in Autoconf 2.62 through 2.68.
75+
76+
# Note: If the type 'unsigned long long int' exists but is only 32 bits
77+
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
78+
# will not be defined. In this case you can treat 'unsigned long long int'
79+
# like 'unsigned long int'.
80+
81+
AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
82+
[
83+
AC_CACHE_CHECK([for unsigned long long int],
84+
[ac_cv_type_unsigned_long_long_int],
85+
[ac_cv_type_unsigned_long_long_int=yes
86+
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
87+
AC_LINK_IFELSE(
88+
[_AC_TYPE_LONG_LONG_SNIPPET],
89+
[],
90+
[ac_cv_type_unsigned_long_long_int=no])
91+
fi])
92+
if test $ac_cv_type_unsigned_long_long_int = yes; then
93+
AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
94+
[Define to 1 if the system has the type 'unsigned long long int'.])
95+
fi
96+
])
97+
98+
# Expands to a C program that can be used to test for simultaneous support
99+
# of 'long long' and 'unsigned long long'. We don't want to say that
100+
# 'long long' is available if 'unsigned long long' is not, or vice versa,
101+
# because too many programs rely on the symmetry between signed and unsigned
102+
# integer types (excluding 'bool').
103+
AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
104+
[
105+
AC_LANG_PROGRAM(
106+
[[/* For now, do not test the preprocessor; as of 2007 there are too many
107+
implementations with broken preprocessors. Perhaps this can
108+
be revisited in 2012. In the meantime, code should not expect
109+
#if to work with literals wider than 32 bits. */
110+
/* Test literals. */
111+
long long int ll = 9223372036854775807ll;
112+
long long int nll = -9223372036854775807LL;
113+
unsigned long long int ull = 18446744073709551615ULL;
114+
/* Test constant expressions. */
115+
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
116+
? 1 : -1)];
117+
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
118+
? 1 : -1)];
119+
int i = 63;]],
120+
[[/* Test availability of runtime routines for shift and division. */
121+
long long int llmax = 9223372036854775807ll;
122+
unsigned long long int ullmax = 18446744073709551615ull;
123+
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
124+
| (llmax / ll) | (llmax % ll)
125+
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
126+
| (ullmax / ull) | (ullmax % ull));]])
127+
])
128+
15129
m4_include([m4/ax_append_flag.m4])
16130
m4_include([m4/ax_check_compile_flag.m4])
17131
m4_include([m4/ax_check_link_flag.m4])

config.h.in

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
/* Define to 1 if you have the `auth_challenge' function. */
7070
#undef HAVE_AUTH_CHALLENGE
7171

72+
/* Define to 1 if the `au_close' functions takes 4 arguments like Solaris 11.
73+
*/
74+
#undef HAVE_AU_CLOSE_SOLARIS11
75+
7276
/* Define to 1 if you have the `bigcrypt' function. */
7377
#undef HAVE_BIGCRYPT
7478

@@ -298,6 +302,9 @@
298302
/* Define to 1 if you have the `getgrset' function. */
299303
#undef HAVE_GETGRSET
300304

305+
/* Define to 1 if you have the `gethrtime' function. */
306+
#undef HAVE_GETHRTIME
307+
301308
/* Define to 1 if you have the `getifaddrs' function. */
302309
#undef HAVE_GETIFADDRS
303310

@@ -464,13 +471,16 @@
464471
/* Define to 1 to enable Linux audit support. */
465472
#undef HAVE_LINUX_AUDIT
466473

474+
/* Define to 1 if you have the <linux/random.h> header file. */
475+
#undef HAVE_LINUX_RANDOM_H
476+
467477
/* Define to 1 if you have the `lockf' function. */
468478
#undef HAVE_LOCKF
469479

470480
/* Define to 1 if you have the <login_cap.h> header file. */
471481
#undef HAVE_LOGIN_CAP_H
472482

473-
/* Define to 1 if the system has the type `long long int'. */
483+
/* Define to 1 if the system has the type 'long long int'. */
474484
#undef HAVE_LONG_LONG_INT
475485

476486
/* Define to 1 if you have the `lrand48' function. */
@@ -479,6 +489,9 @@
479489
/* Define to 1 if you have the <machine/endian.h> header file. */
480490
#undef HAVE_MACHINE_ENDIAN_H
481491

492+
/* Define to 1 if you have the `mach_continuous_time' function. */
493+
#undef HAVE_MACH_CONTINUOUS_TIME
494+
482495
/* Define to 1 if you have the <maillock.h> header file. */
483496
#undef HAVE_MAILLOCK_H
484497

@@ -566,6 +579,9 @@
566579
/* Define to 1 if you have the `posix_spawnp' function. */
567580
#undef HAVE_POSIX_SPAWNP
568581

582+
/* Define to 1 if you have the `ppoll' function. */
583+
#undef HAVE_PPOLL
584+
569585
/* Define to 1 if you have the `pread' function. */
570586
#undef HAVE_PREAD
571587

@@ -581,6 +597,9 @@
581597
/* Define to 1 if you have the <project.h> header file. */
582598
#undef HAVE_PROJECT_H
583599

600+
/* Define to 1 if you have the `pselect' function. */
601+
#undef HAVE_PSELECT
602+
584603
/* Define to 1 if you have the `pstat_getproc' function. */
585604
#undef HAVE_PSTAT_GETPROC
586605

@@ -860,7 +879,7 @@
860879
/* Define to 1 if you have the `unsetenv' function. */
861880
#undef HAVE_UNSETENV
862881

863-
/* Define to 1 if the system has the type `unsigned long long int'. */
882+
/* Define to 1 if the system has the type 'unsigned long long int'. */
864883
#undef HAVE_UNSIGNED_LONG_LONG_INT
865884

866885
/* Define to 1 if you have the <util.h> header file. */

0 commit comments

Comments
 (0)