Skip to content

Commit be7da00

Browse files
committed
merge sudo 1.9.4p2 from tip
--HG-- branch : 1.9
2 parents 9dddd4f + 4151d8f commit be7da00

File tree

6 files changed

+34
-32
lines changed

6 files changed

+34
-32
lines changed

NEWS

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
What's new in Sudo 1.9.4p2
2+
3+
* Fixed a bug introduced in sudo 1.9.4p1 which could lead to a crash
4+
if the sudoers file contains a runas user-specific Defaults entry.
5+
Bug #951.
6+
17
What's new in Sudo 1.9.4p1
28

39
* Sudo on macOS now supports users with more than 16 groups without

configure

+9-9
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.69 for sudo 1.9.4p1.
3+
# Generated by GNU Autoconf 2.69 for sudo 1.9.4p2.
44
#
55
# Report bugs to <https://bugzilla.sudo.ws/>.
66
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
590590
# Identity of this package.
591591
PACKAGE_NAME='sudo'
592592
PACKAGE_TARNAME='sudo'
593-
PACKAGE_VERSION='1.9.4p1'
594-
PACKAGE_STRING='sudo 1.9.4p1'
593+
PACKAGE_VERSION='1.9.4p2'
594+
PACKAGE_STRING='sudo 1.9.4p2'
595595
PACKAGE_BUGREPORT='https://bugzilla.sudo.ws/'
596596
PACKAGE_URL=''
597597

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

15891589
Usage: $0 [OPTION]... [VAR=VALUE]...
15901590

@@ -1650,7 +1650,7 @@ fi
16501650

16511651
if test -n "$ac_init_help"; then
16521652
case $ac_init_help in
1653-
short | recursive ) echo "Configuration of sudo 1.9.4p1:";;
1653+
short | recursive ) echo "Configuration of sudo 1.9.4p2:";;
16541654
esac
16551655
cat <<\_ACEOF
16561656

@@ -1924,7 +1924,7 @@ fi
19241924
test -n "$ac_init_help" && exit $ac_status
19251925
if $ac_init_version; then
19261926
cat <<\_ACEOF
1927-
sudo configure 1.9.4p1
1927+
sudo configure 1.9.4p2
19281928
generated by GNU Autoconf 2.69
19291929

19301930
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2633,7 +2633,7 @@ cat >config.log <<_ACEOF
26332633
This file contains any messages produced by compilers while
26342634
running configure, to aid debugging if configure makes a mistake.
26352635

2636-
It was created by sudo $as_me 1.9.4p1, which was
2636+
It was created by sudo $as_me 1.9.4p2, which was
26372637
generated by GNU Autoconf 2.69. Invocation command line was
26382638

26392639
$ $0 $@
@@ -28755,7 +28755,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2875528755
# report actual input values of CONFIG_FILES etc. instead of their
2875628756
# values after options handling.
2875728757
ac_log="
28758-
This file was extended by sudo $as_me 1.9.4p1, which was
28758+
This file was extended by sudo $as_me 1.9.4p2, which was
2875928759
generated by GNU Autoconf 2.69. Invocation command line was
2876028760

2876128761
CONFIG_FILES = $CONFIG_FILES
@@ -28821,7 +28821,7 @@ _ACEOF
2882128821
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2882228822
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
2882328823
ac_cs_version="\\
28824-
sudo config.status 1.9.4p1
28824+
sudo config.status 1.9.4p2
2882528825
configured by $0, generated by GNU Autoconf 2.69,
2882628826
with options \\"\$ac_cs_config\\"
2882728827

configure.ac

+1-1
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.59])
21-
AC_INIT([sudo], [1.9.4p1], [https://bugzilla.sudo.ws/], [sudo])
21+
AC_INIT([sudo], [1.9.4p2], [https://bugzilla.sudo.ws/], [sudo])
2222
AC_CONFIG_HEADERS([config.h pathnames.h])
2323
AC_CONFIG_SRCDIR([src/sudo.c])
2424
dnl

etc/uncrustify-small.cfg

-4
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,6 @@ mod_remove_extra_semicolon = true # true/false
325325
# braces if there are no variable declarations in the block.
326326
mod_case_brace = remove # ignore/add/remove/force
327327

328-
# Whether to remove a void 'return;' that appears as the last statement in a
329-
# function.
330-
mod_remove_empty_return = true # true/false
331-
332328
# Add or remove the comma after the last value of an enumeration.
333329
mod_enum_last_comma = remove # ignore/add/remove/force
334330

etc/uncrustify.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -2837,7 +2837,7 @@ mod_case_brace = remove # ignore/add/remove/force
28372837

28382838
# Whether to remove a void 'return;' that appears as the last statement in a
28392839
# function.
2840-
mod_remove_empty_return = true # true/false
2840+
mod_remove_empty_return = false # true/false
28412841

28422842
# Add or remove the comma after the last value of an enumeration.
28432843
mod_enum_last_comma = remove # ignore/add/remove/force

plugins/sudoers/sudoers.c

+17-17
Original file line numberDiff line numberDiff line change
@@ -393,23 +393,6 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
393393
}
394394
}
395395

396-
/*
397-
* Set runas passwd/group entries based on command line or sudoers.
398-
* Note that if runas_group was specified without runas_user we
399-
* run the command as the invoking user.
400-
*/
401-
if (sudo_user.runas_group != NULL) {
402-
if (!set_runasgr(sudo_user.runas_group, false))
403-
goto done;
404-
if (!set_runaspw(sudo_user.runas_user ?
405-
sudo_user.runas_user : user_name, false))
406-
goto done;
407-
} else {
408-
if (!set_runaspw(sudo_user.runas_user ?
409-
sudo_user.runas_user : def_runas_default, false))
410-
goto done;
411-
}
412-
413396
/* If given the -P option, set the "preserve_groups" flag. */
414397
if (ISSET(sudo_mode, MODE_PRESERVE_GROUPS))
415398
def_preserve_groups = true;
@@ -875,6 +858,23 @@ init_vars(char * const envp[])
875858
debug_return_bool(false);
876859
}
877860

861+
/*
862+
* Set runas passwd/group entries based on command line or sudoers.
863+
* Note that if runas_group was specified without runas_user we
864+
* run the command as the invoking user.
865+
*/
866+
if (sudo_user.runas_group != NULL) {
867+
if (!set_runasgr(sudo_user.runas_group, false))
868+
debug_return_bool(false);
869+
if (!set_runaspw(sudo_user.runas_user ?
870+
sudo_user.runas_user : user_name, false))
871+
debug_return_bool(false);
872+
} else {
873+
if (!set_runaspw(sudo_user.runas_user ?
874+
sudo_user.runas_user : def_runas_default, false))
875+
debug_return_bool(false);
876+
}
877+
878878
debug_return_bool(true);
879879
}
880880

0 commit comments

Comments
 (0)